GH_SettingsServer
ReferencesA single instance of this class is maintained at module level under the accessor "Settings".
Constructors
GH_SettingsServer
#Create a new instance of the GH_SettingsServer class. The server will be associated with a settings xml file in the %ApplicationData%\Grasshopper\ directory.
GH_SettingsServer
#Create a new instance of the GH_SettingsServer class. The server will be associated with a settings xml file in the %ApplicationData%\Grasshopper\ directory. If a file with the same name already exists, its settings will be automatically loaded.
Parameters:
| databaseName (string) | The name of the settings server (equals the name of the xml file so it must adhere to FAT, FAT32 and NTFS naming conventions). |
Properties
Methods
ConstainsEntry
#Tests to see if a given entry is stored in this settings database.
Parameters:
| name (string) | Entry name to query. |
Returns: True if the entry exists, false otherwise.
EntryType
#Gets the type of a specific entry.
Parameters:
| name (string) | Name of entry. |
Returns: Type of entry. If entry doesn't exist, GH_SettingsType._unknown is returned.
GetValue
#GetValue
#Read
#Low-level deserializer.
Parameters:
| reader (GH_IReader) | Object to read from. |
Returns: True on success, false on failure.
Implements: Read
Write
#Low-level serializer.
Parameters:
| writer (GH_IWriter) | Object to write with. Writer must represent an empty archive chunk. |
Returns: True on success, false on failure.
Implements: Write
WritePersistentSettings
#public void WritePersistentSettings()
Store all settings in the xml file now. You must call this function if you want the current settings to persist between sessions.