Class SnapshotFieldAccessors
Helper class providing static methods to access fields of ISystemConfigurationSnapshot based on SnapshotFieldId.
Inherited Members
Namespace: Serenity.SystemConfiguration.Application.Helpers
Assembly: Serenity.SystemConfiguration.Application.dll
Syntax
public static class SnapshotFieldAccessors
Methods
ReadBool(ISystemConfigurationSnapshot, SnapshotFieldId)
Reads a boolean field from the snapshot.
Declaration
public static bool ReadBool(ISystemConfigurationSnapshot snapshot, SnapshotFieldId fieldId)
Parameters
| Type | Name | Description |
|---|---|---|
| ISystemConfigurationSnapshot | snapshot | The system configuration snapshot. |
| SnapshotFieldId | fieldId | The field identifier. |
Returns
| Type | Description |
|---|---|
| bool | The boolean value of the specified field, or false if not applicable. |
ReadInt(ISystemConfigurationSnapshot, SnapshotFieldId)
Reads an integer field from the snapshot.
Declaration
public static int ReadInt(ISystemConfigurationSnapshot snapshot, SnapshotFieldId fieldId)
Parameters
| Type | Name | Description |
|---|---|---|
| ISystemConfigurationSnapshot | snapshot | The system configuration snapshot. |
| SnapshotFieldId | fieldId | The field identifier. |
Returns
| Type | Description |
|---|---|
| int | The integer value of the specified field, or 0 if not applicable. |
ReadString(ISystemConfigurationSnapshot, SnapshotFieldId)
Reads a string field from the snapshot.
Declaration
public static string ReadString(ISystemConfigurationSnapshot snapshot, SnapshotFieldId fieldId)
Parameters
| Type | Name | Description |
|---|---|---|
| ISystemConfigurationSnapshot | snapshot | The system configuration snapshot. |
| SnapshotFieldId | fieldId | The field identifier. |
Returns
| Type | Description |
|---|---|
| string | The string value of the specified field, or null if not applicable. |