IProfile Interface
This is the standard interface for a settings profile. The constructor will contain any specific settings needed for the storage provider.
Namespace: ASCOM.Common.InterfacesAssembly: ASCOM.Common (in ASCOM.Common.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
public interface IProfile
Public Interface IProfile
| Clear |
This will clear all settings. In addition it should remove any artefacts from the computer. For example it should delete any created files, database, or registry keys.
This is useful for a clean uninstall.
|
| ContainsKey |
Check if the profile provider has a given key
|
| DeleteValue |
Deletes a key / value pair from the profile.
|
| GetProfile |
This returns a string version of all of the profile settings. If this is passed into SetProfile it will recreate the profile in its current state. This can be used during upgrades to preserve settings or to back them up.
|
| GetValue(String) |
Gets the value associated with a key. Throws an exception if that key does not exist.
|
| GetValue(String, String) |
Gets the value associated with a key. Returns the defaultValue if that key does not exist. This will not store that key / value pair in the profile.
|
| Keys |
Returns all Keys used in the profile
|
| SetProfile |
This sets and saves the profile from the rawProfile string returned from GetProfile. This can be used to restore after an install or from a backup.
|
| Values |
Returns all Values within the profile
|
| WriteValue |
Write a value to the profile
|
Supported in: 2.0