ResourceExplorer 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
類別,提供對內容資源的標準存取。
public class ResourceExplorer : IDisposable
type ResourceExplorer = class
interface IDisposable
Public Class ResourceExplorer
Implements IDisposable
- 繼承
-
ResourceExplorer
- 實作
建構函式
| 名稱 | Description |
|---|---|
| ResourceExplorer() |
初始化 ResourceExplorer 類別的新執行個體。 |
| ResourceExplorer(IEnumerable<ResourceProvider>, IEnumerable<IComponentDeclarativeTypes>) |
已淘汰.
初始化 ResourceExplorer 類別的新執行個體。 |
| ResourceExplorer(IEnumerable<ResourceProvider>) |
已淘汰.
初始化 ResourceExplorer 類別的新執行個體。 |
| ResourceExplorer(ResourceExplorerOptions) |
初始化 ResourceExplorer 類別的新執行個體。 |
屬性
| 名稱 | Description |
|---|---|
| ResourceProviders |
取得資源提供者。 |
| ResourceTypes |
它會取得你想管理的資源類型 id 擴充。 |
方法
| 名稱 | Description |
|---|---|
| AddResourceProvider(ResourceProvider) |
為資源探索器管理的資源新增資源提供者。 |
| AddResourceType(String) |
在資源清單中新增資源類型。 |
| BuildType<T>(String, JToken, JsonSerializer) |
以 JToken/串列器為來源$kind的建置類型。 |
| Dispose() |
處理內部資源。 |
| Dispose(Boolean) |
類別使用的異議處理。 |
| GetKindsForType(Type) |
取得一種$kind。 |
| GetKindsForType<T>() |
取得一種$kind。 |
| GetResource(String) |
透過 ID 取得資源。 |
| GetResources(String) |
取得特定類型的資源。 |
| GetTypeForKind(String) |
買適合$kind的類型。 |
| IsRef(JToken) |
判斷代幣是否是推薦人。 |
| LoadType<T>(Resource) |
從資源建立類型。 |
| LoadType<T>(String) |
從資源建立類型。 |
| LoadTypeAsync<T>(Resource, CancellationToken) |
從資源建立類型。 |
| OnChanged(Resource[]) |
事件變更時的處理者。 |
| Refresh() |
重載任何快取的數據。 |
| RegisterType(String, Type, ICustomDeserializer) |
向資源載入器系統註冊宣告式類型。 |
| RegisterType<T>(String, ICustomDeserializer) |
向資源載入器系統註冊宣告式類型。 |
| ResolveRefAsync(JToken, SourceContext, CancellationToken) |
解析出一個參考到實際物件。 |
| TryGetResource(String, Resource) |
試著用 ID 取得資源。 |
事件
| 名稱 | Description |
|---|---|
| Changed |
當資源變更時會觸發的事件。 |
擴充方法
| 名稱 | Description |
|---|---|
| AddFolder(ResourceExplorer, String, Boolean, Boolean) |
新增資料夾資源。 |
| AddFolders(ResourceExplorer, String, String[], Boolean) |
新增資料夾資源。 |
| LoadProject(ResourceExplorer, String, String[], Boolean) |
新增 .csproj 作為資源(新增專案、參考專案和參考套件)。 |