Table of Contents

Struct XmlSerializedDateTimeOffset

Namespace
Cryville.EEW
Assembly
Cryville.EEW.dll
A DateTimeOffset serialized in XML.
public record struct XmlSerializedDateTimeOffset : IXmlSerializable, IComparable<XmlSerializedDateTimeOffset>, IComparable, IFormattable, IEquatable<XmlSerializedDateTimeOffset>
Implements
Inherited Members

Constructors

XmlSerializedDateTimeOffset(DateTimeOffset)

Creates an instance of the XmlSerializedDateTimeOffset struct.
public XmlSerializedDateTimeOffset(DateTimeOffset value)

Parameters

value DateTimeOffset
The date time offset value.

Properties

Value

The date time offset value.
public DateTimeOffset Value { readonly get; set; }

Property Value

DateTimeOffset

Methods

CompareTo(XmlSerializedDateTimeOffset)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public readonly int CompareTo(XmlSerializedDateTimeOffset other)

Parameters

other XmlSerializedDateTimeOffset
An object to compare with this instance.

Returns

int
A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes other in the sort order. Zero This instance occurs in the same position in the sort order as other. Greater than zero This instance follows other in the sort order.

CompareTo(object?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public readonly int CompareTo(object? obj)

Parameters

obj object
An object to compare with this instance.

Returns

int
A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes obj in the sort order. Zero This instance occurs in the same position in the sort order as obj. Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException
obj is not the same type as this instance.

FromDateTimeOffset(DateTimeOffset)

Converts an instance of the DateTimeOffset struct to an instance of the XmlSerializedDateTimeOffset struct.
public static XmlSerializedDateTimeOffset FromDateTimeOffset(DateTimeOffset value)

Parameters

value DateTimeOffset
An instance of the DateTimeOffset struct.

Returns

XmlSerializedDateTimeOffset
An instance of the XmlSerializedDateTimeOffset struct.

GetSchema()

This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class.
public readonly XmlSchema? GetSchema()

Returns

XmlSchema
An XmlSchema that describes the XML representation of the object that is produced by the WriteXml(XmlWriter) method and consumed by the ReadXml(XmlReader) method.

ReadXml(XmlReader)

Generates an object from its XML representation.
public void ReadXml(XmlReader reader)

Parameters

reader XmlReader
The XmlReader stream from which the object is deserialized.

ToDateTimeOffset()

Converts the current instance to an instance of the DateTimeOffset struct.
public readonly DateTimeOffset ToDateTimeOffset()

Returns

DateTimeOffset
An instance of the DateTimeOffset struct.

ToString()

Returns the fully qualified type name of this instance.
public override readonly string ToString()

Returns

string
The fully qualified type name.

ToString(IFormatProvider?)

public readonly string ToString(IFormatProvider? formatProvider)

Parameters

formatProvider IFormatProvider

Returns

string

ToString(string?)

public readonly string ToString(string? format)

Parameters

format string

Returns

string

ToString(string?, IFormatProvider?)

Formats the value of the current instance using the specified format.
public readonly string ToString(string? format, IFormatProvider? formatProvider)

Parameters

format string
The format to use. -or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.
formatProvider IFormatProvider
The provider to use to format the value. -or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string
The value of the current instance in the specified format.

WriteXml(XmlWriter)

Converts an object into its XML representation.
public readonly void WriteXml(XmlWriter writer)

Parameters

writer XmlWriter
The XmlWriter stream to which the object is serialized.

Operators

operator >(XmlSerializedDateTimeOffset, XmlSerializedDateTimeOffset)

public static bool operator >(XmlSerializedDateTimeOffset left, XmlSerializedDateTimeOffset right)

Parameters

left XmlSerializedDateTimeOffset
right XmlSerializedDateTimeOffset

Returns

bool

operator >=(XmlSerializedDateTimeOffset, XmlSerializedDateTimeOffset)

public static bool operator >=(XmlSerializedDateTimeOffset left, XmlSerializedDateTimeOffset right)

Parameters

left XmlSerializedDateTimeOffset
right XmlSerializedDateTimeOffset

Returns

bool

implicit operator DateTimeOffset(XmlSerializedDateTimeOffset)

Converts an instance of the XmlSerializedDateTimeOffset struct to an instance of the DateTimeOffset struct.
public static implicit operator DateTimeOffset(XmlSerializedDateTimeOffset value)

Parameters

value XmlSerializedDateTimeOffset
An instance of the XmlSerializedDateTimeOffset struct.

Returns

DateTimeOffset

implicit operator XmlSerializedDateTimeOffset(DateTimeOffset)

Converts an instance of the DateTimeOffset struct to an instance of the XmlSerializedDateTimeOffset struct.
public static implicit operator XmlSerializedDateTimeOffset(DateTimeOffset value)

Parameters

value DateTimeOffset
An instance of the DateTimeOffset struct.

Returns

XmlSerializedDateTimeOffset

operator <(XmlSerializedDateTimeOffset, XmlSerializedDateTimeOffset)

public static bool operator <(XmlSerializedDateTimeOffset left, XmlSerializedDateTimeOffset right)

Parameters

left XmlSerializedDateTimeOffset
right XmlSerializedDateTimeOffset

Returns

bool

operator <=(XmlSerializedDateTimeOffset, XmlSerializedDateTimeOffset)

public static bool operator <=(XmlSerializedDateTimeOffset left, XmlSerializedDateTimeOffset right)

Parameters

left XmlSerializedDateTimeOffset
right XmlSerializedDateTimeOffset

Returns

bool