SettingsStore Class
Abstract class for reading or enumerating the selected scope's collections and properties. It is obtained from GetReadOnlySettingsStore method.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Settings.SettingsStore
Microsoft.VisualStudio.Settings.WritableSettingsStore
Namespace: Microsoft.VisualStudio.Settings
Assemblies: Microsoft.VisualStudio.Settings (in Microsoft.VisualStudio.Settings.dll)
Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'宣言
Public MustInherit Class SettingsStore
public abstract class SettingsStore
The SettingsStore type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SettingsStore |
Top
Methods
Name | Description | |
---|---|---|
CollectionExists | Checks the existence of the collection passed in to this method. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBoolean(String, String) | Returns the value of the requested property whose data type is [!:SettingsType.Int32] as boolean. | |
GetBoolean(String, String, Boolean) | Returns the value of the requested property whose data type is [!:SettingsType.Int32] as boolean. | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetInt32(String, String) | Returns the value of the requested property whose data type is [!:SettingsType.Int32]. | |
GetInt32(String, String, Int32) | Returns the value of the requested property whose data type is [!:SettingsType.Int32]. | |
GetInt64(String, String) | Returns the value of the requested property whose data type is [!:SettingsType.Int64]. | |
GetInt64(String, String, Int64) | Returns the value of the requested property whose data type is [!:SettingsType.Int64]. | |
GetLastWriteTime | Provides the last write time of the properties and sub-collections immediate to the given collection. | |
GetMemoryStream | Returns the value of the requested property whose data type is [!:SettingsType.Binary]. In order to access the underlying byte array at once [!:MemoryStream.ToArray] method can be used. | |
GetPropertyCount | Returns the number of properties under the given collection. | |
GetPropertyNames | Returns the names of properties under the given collection. | |
GetPropertyType | Returns the type of the requested property. | |
GetString(String, String) | Returns the value of the requested property whose data type is [!:SettingsType.String]. | |
GetString(String, String, String) | Returns the value of the requested property whose data type is [!:SettingsType.String]. | |
GetSubCollectionCount | Returns the number of sub-collections under the given collection. | |
GetSubCollectionNames | Returns the names of sub-collections under the given collection. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUInt32(String, String) | Returns the value of the requested property whose data type is [!:SettingsType.Int32]. | |
GetUInt32(String, String, UInt32) | Returns the value of the requested property whose data type is [!:SettingsType.Int32]. | |
GetUInt64(String, String) | Returns the value of the requested property whose data type is [!:SettingsType.Int64]. | |
GetUInt64(String, String, UInt64) | Returns the value of the requested property whose data type is [!:SettingsType.Int64]. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
PropertyExists | Checks the existance of the property passed in to this method. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
In the methods of this class, if the collection path is provided as the empty string (""), then it denotes the top level collection. If the property name is empty string, then it denotes the default property of the collection.
Collections can contain properties and sub-collections. Sub-collections paths are described with the separators like directories in the file system. Likewise, the separator is '\' (back-slash) character.
Examples
Example of a sub-collection path would be: "Root Collection\Internal Collection\Leaf Collection".
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.