Compartilhar via


SettingsStore Class

Abstract class for reading or enumerating the selected scope's collections and properties. It is obtained from GetReadOnlySettingsStore method.

Inheritance Hierarchy

Object
  Microsoft.VisualStudio.Settings.SettingsStore
    Microsoft.VisualStudio.Settings.WritableSettingsStore

Namespace:  Microsoft.VisualStudio.Settings
Assemblies:   Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
  Microsoft.VisualStudio.Settings (in Microsoft.VisualStudio.Settings.dll)

Syntax

'Declaration
Public MustInherit Class SettingsStore
public abstract class SettingsStore
public ref class SettingsStore abstract
[<AbstractClass>]
type SettingsStore =  class end
public abstract class SettingsStore

The SettingsStore type exposes the following members.

Constructors

  Name Description
Protected method SettingsStore Initializes a new instance of the SettingsStore.

Top

Methods

  Name Description
Public method CollectionExists Checks the existence of the collection passed in to this method.
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetBoolean(String, String) Returns the value of the requested property whose data type is [!:SettingsType.Int32] as boolean.
Public method GetBoolean(String, String, Boolean) Returns the value of the requested property whose data type is [!:SettingsType.Int32] as boolean.
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetInt32(String, String) Returns the value of the requested property whose data type is [!:SettingsType.Int32].
Public method GetInt32(String, String, Int32) Returns the value of the requested property whose data type is [!:SettingsType.Int32].
Public method GetInt64(String, String) Returns the value of the requested property whose data type is [!:SettingsType.Int64].
Public method GetInt64(String, String, Int64) Returns the value of the requested property whose data type is [!:SettingsType.Int64].
Public method GetLastWriteTime Provides the last write time of the properties and sub-collections immediate to the given collection.
Public method 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.
Public method GetPropertyCount Returns the number of properties under the given collection.
Public method GetPropertyNames Returns the names of properties under the given collection.
Public method GetPropertyType Returns the type of the requested property.
Public method GetString(String, String) Returns the value of the requested property whose data type is [!:SettingsType.String].
Public method GetString(String, String, String) Returns the value of the requested property whose data type is [!:SettingsType.String].
Public method GetSubCollectionCount Returns the number of sub-collections under the given collection.
Public method GetSubCollectionNames Returns the names of sub-collections under the given collection.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetUInt32(String, String) Returns the value of the requested property whose data type is [!:SettingsType.Int32].
Public method GetUInt32(String, String, UInt32) Returns the value of the requested property whose data type is [!:SettingsType.Int32].
Public method GetUInt64(String, String) Returns the value of the requested property whose data type is [!:SettingsType.Int64].
Public method GetUInt64(String, String, UInt64) Returns the value of the requested property whose data type is [!:SettingsType.Int64].
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method PropertyExists Checks the existance of the property passed in to this method.
Public 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.

See Also

Reference

Microsoft.VisualStudio.Settings Namespace