Outage
|
public class OutageLog : IProvideStatus, IDisposable
The OutageLog type exposes the following members.
Name | Description | |
---|---|---|
Count | Gets the number of outages in the log. | |
FileName | Gets or sets the file name for the outage log; file name can be set with a relative path. | |
IsDisposed | Gets a flag that indicates whether the object has been disposed. | |
Outages | Gets the full list of outages in the log. | |
Status | Gets the current status details about OutageLog. |
Name | Description | |
---|---|---|
Add(Outage) | Adds an outage to the OutageLog. | |
Add(DateTimeOffset, DateTimeOffset) | Adds an outage to the OutageLog. | |
Dispose | Releases all the resources used by the OutageLog object. | |
Dispose(Boolean) | Releases the unmanaged resources used by the OutageLog object and optionally releases the managed resources. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
Finalize |
Releases the unmanaged resources before the OutageLog object is reclaimed by GC.
(Overrides ObjectFinalize) | |
First | Gets the first outage in the list of outages. | |
GetHashCode | Serves as the default hash function. (Inherited from Object) | |
GetType | Gets the Type of the current instance. (Inherited from Object) | |
Initialize | Initialize the outage log. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) | |
Remove | Removes the given outage from the outage log. | |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Name | Description | |
---|---|---|
Disposed | Raised after the outage log has been properly disposed. | |
LogModified | Event is raised when the outage log is modified. | |
ProcessException | Event is raised when there is an exception encountered while processing outage log. |
Name | Description | |
---|---|---|
DateTimeFormat | Date-time format used by OutageLog. |
Name | Description | |
---|---|---|
GetEnumValueOrDefault |
Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) | |
GetEnumValueOrDefaultT |
Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions) |
This class serializes a list of outages (e.g., a connection outage or data loss) where each outage consists of a start and end time. The outages are persisted in a log file so that the log can be operated on even through host application restarts until the outages are processed.
All members in the OutageLog are guaranteed to be thread safe. File locks are used to provide synchronization so that the file can stay up-to-date with changes made in the application.