Class PropertyKey
A class that represents a tag propety.
[DataContract]
[DataSerializer(typeof(PropertyKeySerializer<>), Mode = DataSerializerGenericMode.Type)]
public abstract class PropertyKey : IComparable
- Inheritance
-
objectPropertyKey
- Implements
- Derived
Constructors
PropertyKey(string, Type, Type, params PropertyKeyMetadata[])
Initializes a new instance of the PropertyKey class.
protected PropertyKey(string name, Type propertyType, Type ownerType, params PropertyKeyMetadata[] metadatas)
Parameters
namestringThe name.
propertyTypeTypeType of the property.
ownerTypeTypeType of the owner.
metadatasPropertyKeyMetadata[]The metadatas.
Fields
name
protected string name
Field Value
Properties
IsValueType
public abstract bool IsValueType { get; }
Property Value
Metadatas
Gets the metadatas.
public PropertyKeyMetadata[] Metadatas { get; }
Property Value
Name
Gets the name of this key.
public string Name { get; init; }
Property Value
OwnerType
Gets the type of the owner.
public Type OwnerType { get; protected set; }
Property Value
- Type
The type of the owner.
PropertyType
Gets the type of the property.
public Type PropertyType { get; protected set; }
Property Value
- Type
The type of the property.
Methods
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 int CompareTo(object? obj)
Parameters
objobjectAn 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 objin the sort order.Zero This instance occurs in the same position in the sort order as obj.Greater than zero This instance follows objin the sort order.
Exceptions
- ArgumentException
objis not the same type as this instance.
SetupMetadata(PropertyKeyMetadata)
protected virtual void SetupMetadata(PropertyKeyMetadata metadata)
Parameters
metadataPropertyKeyMetadata
SetupMetadatas()
protected virtual void SetupMetadatas()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.