ContentProviderClient 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
用於與特定 ContentProvider. 互動的公開介面物件
[Android.Runtime.Register("android/content/ContentProviderClient", DoNotGenerateAcw=true)]
public class ContentProviderClient : Java.Lang.Object, IDisposable, Java.Lang.IAutoCloseable
[<Android.Runtime.Register("android/content/ContentProviderClient", DoNotGenerateAcw=true)>]
type ContentProviderClient = class
inherit Object
interface IAutoCloseable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- 繼承
- 屬性
- 實作
備註
用於與特定 ContentProvider. 互動的公開介面物件
實例可透過呼叫 ContentResolver#acquireContentProviderClient 或 ContentResolver#acquireUnstableContentProviderClient取得。 必須透過 實 #close() 例釋放,以向系統表明底層 ContentProvider 不再需要,且可被殺死以釋放資源。
請注意,通常你應該為每個執行緒建立一個新的 ContentProviderClient 實例。 與 ContentResolver不同,這裡 #query 的方法如 和 #openFile 並非執行緒安全——你不得在 ContentProviderClient 上呼叫 #close() 這些呼叫,直到你處理完他們回傳的資料為止。
Java 文件 android.content.ContentProviderClient。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
建構函式
| 名稱 | Description |
|---|---|
| ContentProviderClient(IntPtr, JniHandleOwnership) |
用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。 |
屬性
| 名稱 | Description |
|---|---|
| Class |
回傳此 |
| Handle |
底層 Android 實例的帳號。 (繼承來源 Object) |
| JniIdentityHashCode |
取得由互通執行時指派給此 Java 對等端的身份雜湊碼。 (繼承來源 Object) |
| JniManagedPeerState |
用於與特定 |
| JniPeerMembers |
取得用於調用此 Java 節點成員的 JNI 元資料。 |
| LocalContentProvider |
取得與該客戶相關的推薦信 |
| PeerReference |
取得這個 Java 節點的 JNI 物件參考。 (繼承來源 Object) |
| ThresholdClass |
此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。 |
| ThresholdType |
此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。 |
方法
| 名稱 | Description |
|---|---|
| ApplyBatch(IList<ContentProviderOperation>) |
請參閱 |
| ApplyBatch(String, IList<ContentProviderOperation>) |
請參閱 |
| BulkInsert(Uri, ContentValues[]) |
請參閱 |
| Call(String, String, Bundle) |
請參閱 |
| Call(String, String, String, Bundle) |
請參閱 |
| Canonicalize(Uri) |
請參閱 |
| Clone() |
建立並回傳此物件的副本。 (繼承來源 Object) |
| Close() |
關閉此用戶端連線,向系統表示底層 |
| Construct(JniObjectReference, JniObjectReferenceOptions) |
用於與特定 |
| Delete(Uri, Bundle) |
請參閱 |
| Delete(Uri, String, String[]) |
請參閱 |
| Dispose() |
釋放該 Java 節點所持有的資源。 (繼承來源 Object) |
| Dispose(Boolean) |
釋放該 Java 節點所持有的資源。 (繼承來源 Object) |
| DisposeUnlessReferenced() |
用於與特定 |
| Equals(Object) |
用於與特定 |
| Equals(Object) |
表示是否有其他物體「等同」於此物。 (繼承來源 Object) |
| GetHashCode() |
回傳物件的雜湊碼值。 (繼承來源 Object) |
| GetStreamTypes(Uri, String) |
請參閱 |
| GetType(Uri) |
請參閱 |
| Insert(Uri, ContentValues, Bundle) |
請參閱 |
| Insert(Uri, ContentValues) |
請參閱 |
| JavaFinalize() |
已淘汰.
當垃圾回收判定該物件不再有相關參考時,由垃圾回收器呼叫。 (繼承來源 Object) |
| Notify() |
喚醒一個正在該物件監視器上等待的執行緒。 (繼承來源 Object) |
| NotifyAll() |
喚醒所有等待該物件監視器的執行緒。 (繼承來源 Object) |
| OpenAssetFile(Uri, String, CancellationSignal) |
參見 |
| OpenAssetFile(Uri, String) |
參見 |
| OpenFile(Uri, String, CancellationSignal) |
參見 |
| OpenFile(Uri, String) |
參見 |
| OpenTypedAssetFile(Uri, String, Bundle, CancellationSignal) |
開啟一個與內容 URI 相關的類型資產檔案。 |
| OpenTypedAssetFileDescriptor(Uri, String, Bundle, CancellationSignal) |
請參閱 |
| OpenTypedAssetFileDescriptor(Uri, String, Bundle) |
請參閱 |
| Query(Uri, String[], Bundle, CancellationSignal) |
請參閱 |
| Query(Uri, String[], String, String[], String, CancellationSignal) |
請參閱 |
| Query(Uri, String[], String, String[], String) |
請參閱 |
| Refresh(Uri, Bundle, CancellationSignal) |
請參閱 |
| Release() |
已淘汰.
釋放這個客戶端連線。 此會員已被棄用; |
| SetHandle(IntPtr, JniHandleOwnership) |
設定 Handle 屬性。 (繼承來源 Object) |
| SetPeerReference(JniObjectReference, JniObjectReferenceOptions) |
用於與特定 |
| ToArray<T>() |
從這個 Java 陣列包裝器建立一個受管理陣列。 (繼承來源 Object) |
| ToString() |
回傳物件的字串表示。 (繼承來源 Object) |
| Uncanonicalize(Uri) |
請參閱 |
| UnregisterFromRuntime() |
將此 Java 節點從互通執行時中取消註冊。 (繼承來源 Object) |
| Update(Uri, ContentValues, Bundle) |
請參閱 |
| Update(Uri, ContentValues, String, String[]) |
請參閱 |
| Wait() |
導致目前執行緒等待被喚醒,通常是透過 <em>通知</><em 或 em>中斷</em> 來喚醒。 (繼承來源 Object) |
| Wait(Int64, Int32) |
會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。 (繼承來源 Object) |
| Wait(Int64) |
會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。 (繼承來源 Object) |
明確介面實作
| 名稱 | Description |
|---|---|
| IJavaPeerable.Disposed() |
用於與特定 |
| IJavaPeerable.Finalized() |
用於與特定 |
| IJavaPeerable.JniObjectReferenceControlBlock |
用於與特定 |
| IJavaPeerable.SetJniIdentityHashCode(Int32) |
用於與特定 |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
用於與特定 |
| IJavaPeerable.SetPeerReference(JniObjectReference) |
用於與特定 |
| IJavaPeerable.UnregisterFromRuntime() |
用於與特定 |
擴充方法
| 名稱 | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
取得實例 |
| JavaAs<TResult>(IJavaPeerable) |
試著強制 |
| JavaCast<TResult>(IJavaObject) |
執行 Android 執行時檢查型別轉換。 |
| JavaCast<TResult>(IJavaObject) |
用於與特定 |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
試著強制 |