Click or drag to resize

FormatConverterT, TFormatType Class

Converts between different formats of a given type, where a format is specified as an indexed format object. This class can chain conversions in cases where a direct conversion is not possible.
Inheritance Hierarchy
SystemObject
  AGI.Foundation.InfrastructureFormatConverterT, TFormatType

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public class FormatConverter<T, TFormatType>
where TFormatType : IIndexedFormat

Type Parameters

T
The type of object that this class converts the format of.
TFormatType
The class of the format object itself. This can be a base class.

The FormatConverterT, TFormatType type exposes the following members.

Constructors
Methods
  NameDescription
Public methodConvert
Converts the specified instance from one format to another.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetConversionCallback
Gets the callback that converts from one format to another.
Public methodGetConversionDistance
Gets the number of intermediate conversions that must be done to convert from from to to. For example, if a conversion function is defined to directly convert between the types, 1 will be returned. If the two types are identical, 0 will be returned. If no conversion exists at all, MaxValue will be returned.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRegisterConversion(TFormatType, TFormatType, FormatConversionCallbackT, TFormatType)
Registers a conversion between formats.
Public methodRegisterConversion(TFormatType, TFormatType, FormatConversionCallbackT, TFormatType, TryFormatConversionCallbackT, TFormatType)
Registers a conversion between formats.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryConvert
Tries to convert the specified instance from one format to another, returning success or failure.
Top
See Also