Class PackageStore
Creates an instance of IMetadataStore that stores update metadata locally in a specified directory.
Inheritance
System.Object
PackageStore
Namespace: Microsoft.PackageGraph.Storage.Local
Assembly: package-graph-microsoft-update.dll
Syntax
public abstract class PackageStore
Methods
| Improve this Doc View SourceExists(String)
Checks if a IMetadataStore exists in the specified directory
Declaration
public static bool Exists(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to the directory to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if a store exists under the directory, false otherwise |
Open(String)
Opens an exiting IMetadataStore from the specified directory.
Declaration
public static IMetadataStore Open(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to the directory containing the IMetadataStore to open. |
Returns
Type | Description |
---|---|
IMetadataStore | An instance of IMetadataStore |
Exceptions
Type | Condition |
---|---|
System.IO.DirectoryNotFoundException | If the directory does not exist or does not contain a valid IMetadataStore. |
OpenOrCreate(String)
Opens an existing IMetadataStore from the specified directory. If a store does not exist, or the directory does not exist, a new store is created.
Declaration
public static IMetadataStore OpenOrCreate(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to the directory to open or create |
Returns
Type | Description |
---|---|
IMetadataStore | An instance of IMetadataStore |