Click or drag to resize

MetadataFile Class

Represents a file containing MetadataRecords.
Inheritance Hierarchy
System.Object
  GSF.IO.IsamDataFileBase<MetadataRecord>
    GSF.Historian.Files.MetadataFile

Namespace: GSF.Historian.Files
Assembly: GSF.Historian (in GSF.Historian.dll) Version: 2.4.239-beta
Syntax
[ToolboxBitmapAttribute(typeof(MetadataFile))]
public class MetadataFile : IsamDataFileBase<MetadataRecord>
View Source

The MetadataFile type exposes the following members.

Constructors
 NameDescription
Public methodMetadataFile Initializes a new instance of the MetadataFile class.
Top
Properties
 NameDescription
Public propertyAutoSaveInterval Gets or sets the interval in milliseconds at which the records loaded in memory are to be persisted to disk.
(Inherited from IsamDataFileBase<T>)
Public propertyEnabled Gets or sets a boolean value that indicates whether the file is currently enabled.
(Inherited from IsamDataFileBase<T>)
Public propertyFileAccessMode Gets or sets the FileAccess value to use when opening the file.
(Inherited from IsamDataFileBase<T>)
Protected propertyFileData Gets the underlying FileStream of the file.
(Inherited from IsamDataFileBase<T>)
Protected propertyFileDataLock Gets the locking object for the FileData stream.
(Inherited from IsamDataFileBase<T>)
Public propertyFileName Gets or sets the name of the file.
(Overrides IsamDataFileBase<T>.FileName)
Public propertyIsCorrupt Gets a boolean value that indicates whether the file data on disk is corrupt.
(Overrides IsamDataFileBase<T>.IsCorrupt)
Public propertyIsDisposed Gets a flag that indicates whether the object has been disposed.
(Inherited from IsamDataFileBase<T>)
Public propertyIsOpen Gets a boolean value that indicates whether the file is open.
(Inherited from IsamDataFileBase<T>)
Public propertyLegacyMode Determines legacy operation mode for the MetadataFile.
Public propertyLoadOnOpen Gets or sets a boolean value that indicates whether records are to be loaded automatically in memory when the file is opened.
(Inherited from IsamDataFileBase<T>)
Protected propertyLoadWaitHandle Gets wait handle for loading data.
(Inherited from IsamDataFileBase<T>)
Public propertyMemoryUsage Gets the approximate memory consumption (in KB) of the file.
(Inherited from IsamDataFileBase<T>)
Public propertyName Gets the unique identifier of the file.
(Inherited from IsamDataFileBase<T>)
Public propertyPersistSettings Gets or sets a boolean value that indicates whether the file settings are to be saved to the config file.
(Inherited from IsamDataFileBase<T>)
Public propertyRecordsInMemory Gets the number of file records loaded in memory.
(Overrides IsamDataFileBase<T>.RecordsInMemory)
Public propertyRecordsOnDisk Gets the number of file records on the disk.
(Overrides IsamDataFileBase<T>.RecordsOnDisk)
Public propertyReloadOnModify Gets or sets a boolean value that indicates whether records loaded in memory are to be re-loaded when the file is modified on disk.
(Inherited from IsamDataFileBase<T>)
Public propertySaveOnClose Gets or sets a boolean value that indicates whether records loaded in memory are to be persisted to disk when the file is closed.
(Inherited from IsamDataFileBase<T>)
Protected propertySaveWaitHandle Gets wait handle for saving data.
(Inherited from IsamDataFileBase<T>)
Public propertySettingsCategory Gets or sets the category under which the file settings are to be saved to the config file if the PersistSettings property is set to true.
(Inherited from IsamDataFileBase<T>)
Public propertyStatus Gets the descriptive status of the MetadataFile.
(Overrides IsamDataFileBase<T>.Status)
Top
Methods
 NameDescription
Public methodClose Closes the file.
(Inherited from IsamDataFileBase<T>)
Protected methodCreateNewRecord Creates a new MetadataRecord with the specified recordIndex.
(Overrides IsamDataFileBase<T>.CreateNewRecord(Int32))
Public methodDispose() Releases all the resources used by the file.
(Inherited from IsamDataFileBase<T>)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the file and optionally releases the managed resources.
(Inherited from IsamDataFileBase<T>)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Releases the unmanaged resources before the file is reclaimed by GC.
(Inherited from IsamDataFileBase<T>)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Protected methodGetRecordSize Gets the binary size of a MetadataRecord.
(Overrides IsamDataFileBase<T>.GetRecordSize())
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodInitialize Initializes the file.
(Inherited from IsamDataFileBase<T>)
Public methodLoad Loads records from disk into memory.
(Overrides IsamDataFileBase<T>.Load())
Public methodLoadSettings Loads saved settings of the file from the config file if the PersistSettings property is set to true.
(Overrides IsamDataFileBase<T>.LoadSettings())
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Protected methodOnDataLoaded Raises the DataLoaded event.
(Inherited from IsamDataFileBase<T>)
Protected methodOnDataLoading Raises the DataLoading event.
(Inherited from IsamDataFileBase<T>)
Protected methodOnDataSaved Raises the DataSaved event.
(Inherited from IsamDataFileBase<T>)
Protected methodOnDataSaving Raises the DataSaving event.
(Inherited from IsamDataFileBase<T>)
Protected methodOnFileModified Raises the FileModified event.
(Inherited from IsamDataFileBase<T>)
Public methodOpen Opens the file.
(Overrides IsamDataFileBase<T>.Open())
Public methodRead() Reads file records from disk if records were not loaded in memory otherwise returns the records in memory.
(Overrides IsamDataFileBase<T>.Read())
Public methodRead(Int32) Reads specified file record from disk if records were not loaded in memory otherwise returns the record in memory.
(Overrides IsamDataFileBase<T>.Read(Int32))
Public methodRead(String) Reads MetadataRecords that matches the searchPattern.
Public methodSave Saves records loaded in memory to disk.
(Overrides IsamDataFileBase<T>.Save())
Public methodSaveSettings Saves settings of the file to the config file if the PersistSettings property is set to true.
(Overrides IsamDataFileBase<T>.SaveSettings())
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodWrite(IEnumerable<MetadataRecord>) Writes specified records to disk if records were not loaded in memory otherwise updates the records in memory.
(Overrides IsamDataFileBase<T>.Write(IEnumerable<T>))
Public methodWrite(Int32, MetadataRecord) Writes specified record to disk if records were not loaded in memory otherwise updates the record in memory.
(Overrides IsamDataFileBase<T>.Write(Int32, T))
Top
Events
 NameDescription
Public eventDataLoaded Occurs when data has been read from disk into memory.
(Inherited from IsamDataFileBase<T>)
Public eventDataLoading Occurs when data is being read from disk into memory.
(Inherited from IsamDataFileBase<T>)
Public eventDataSaved Occurs when data has been saved from memory onto disk.
(Inherited from IsamDataFileBase<T>)
Public eventDataSaving Occurs when data is being saved from memory onto disk.
(Inherited from IsamDataFileBase<T>)
Public eventDisposed Occurs when the class has been disposed.
(Inherited from IsamDataFileBase<T>)
Public eventFileModified Occurs when file data on the disk is modified.
(Inherited from IsamDataFileBase<T>)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefault<T> Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
See Also