Struct PrimaryKeyId

Represent primary key id value.

Implements
System.IConvertible
System.IComparable
System.IComparable<PrimaryKeyId>
System.IEquatable<PrimaryKeyId>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Mediachase.BusinessFoundation.Data
Assembly: Mediachase.BusinessFoundation.Data.dll
Version: 10.8.0
Syntax
public struct PrimaryKeyId : IConvertible, IComparable, IComparable<PrimaryKeyId>, IEquatable<PrimaryKeyId>

Constructors

PrimaryKeyId(Guid)

Initializes a new instance of the PrimaryKeyId struct.

Declaration
public PrimaryKeyId(Guid uid)
Parameters
Type Name Description
System.Guid uid

The uid.

PrimaryKeyId(Int32)

Initializes a new instance of the PrimaryKeyId struct.

Declaration
public PrimaryKeyId(int id)
Parameters
Type Name Description
System.Int32 id

The id.

Fields

Empty

Defines empty primary key.

Declaration
public static readonly PrimaryKeyId Empty
Field Value
Type Description
PrimaryKeyId

Properties

InnerType

Gets the type of the inner.

Declaration
public PrimaryKeyIdValueType InnerType { get; }
Property Value
Type Description
PrimaryKeyIdValueType

The type of the inner.

Methods

CompareTo(PrimaryKeyId)

Compares the current object with another object of the same type.

Declaration
public int CompareTo(PrimaryKeyId other)
Parameters
Type Name Description
PrimaryKeyId other

An object to compare with this object.

Returns
Type Description
System.Int32

A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other.

CompareTo(Object)

Compares the current instance with another object of the same type.

Declaration
public int CompareTo(object obj)
Parameters
Type Name Description
System.Object obj

An object to compare with this instance.

Returns
Type Description
System.Int32

A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj.

Exceptions
Type Condition
System.ArgumentException

obj is not the same type as this instance.

Equals(PrimaryKeyId)

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(PrimaryKeyId other)
Parameters
Type Name Description
PrimaryKeyId other

An object to compare with this object.

Returns
Type Description
System.Boolean

true if the current object is equal to the other parameter; otherwise, false.

Equals(Object)

Indicates whether this instance and a specified object are equal.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Another object to compare to.

Returns
Type Description
System.Boolean

true if obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Returns the hash code for this instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A 32-bit signed integer that is the hash code for this instance.

Overrides
System.ValueType.GetHashCode()

Parse(String)

Parses the specified string.

Declaration
public static PrimaryKeyId Parse(string s)
Parameters
Type Name Description
System.String s

A string containing a primary key value time to convert.

Returns
Type Description
PrimaryKeyId

ToString()

Returns the fully qualified type name of this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String containing a fully qualified type name.

Overrides
System.ValueType.ToString()

TryParse(String, out PrimaryKeyId)

Tries the parse.

Declaration
public static bool TryParse(string s, out PrimaryKeyId result)
Parameters
Type Name Description
System.String s

A string containing a primary key value time to convert.

PrimaryKeyId result

The primary key value.

Returns
Type Description
System.Boolean

Operators

Equality(PrimaryKeyId, PrimaryKeyId)

Implements the operator ==.

Declaration
public static bool operator ==(PrimaryKeyId left, PrimaryKeyId right)
Parameters
Type Name Description
PrimaryKeyId left

The left.

PrimaryKeyId right

The right.

Returns
Type Description
System.Boolean

The result of the operator.

Explicit(Guid to PrimaryKeyId)

Performs an explicit conversion from System.Guid to PrimaryKeyId.

Declaration
public static explicit operator PrimaryKeyId(Guid value)
Parameters
Type Name Description
System.Guid value

The value.

Returns
Type Description
PrimaryKeyId

The result of the conversion.

Implicit(PrimaryKeyId to Guid)

Performs an implicit conversion from PrimaryKeyId to System.Guid.

Declaration
public static implicit operator Guid(PrimaryKeyId value)
Parameters
Type Name Description
PrimaryKeyId value

The value.

Returns
Type Description
System.Guid

The result of the conversion.

Implicit(PrimaryKeyId to Int32)

Performs an implicit conversion from PrimaryKeyId to System.Int32.

Declaration
public static implicit operator int (PrimaryKeyId value)
Parameters
Type Name Description
PrimaryKeyId value

The value.

Returns
Type Description
System.Int32

The result of the conversion.

Implicit(Int32 to PrimaryKeyId)

Performs an implicit conversion from System.Int32 to PrimaryKeyId.

Declaration
public static implicit operator PrimaryKeyId(int value)
Parameters
Type Name Description
System.Int32 value

The value.

Returns
Type Description
PrimaryKeyId

The result of the conversion.

Inequality(PrimaryKeyId, PrimaryKeyId)

Implements the operator !=.

Declaration
public static bool operator !=(PrimaryKeyId left, PrimaryKeyId right)
Parameters
Type Name Description
PrimaryKeyId left

The left.

PrimaryKeyId right

The right.

Returns
Type Description
System.Boolean

The result of the operator.

Explicit Interface Implementations

IConvertible.GetTypeCode()

Returns the System.TypeCode for this instance.

Declaration
TypeCode IConvertible.GetTypeCode()
Returns
Type Description
System.TypeCode

The enumerated constant that is the System.TypeCode of the class or value type that implements this interface.

IConvertible.ToBoolean(IFormatProvider)

Converts the value of this instance to an equivalent Boolean value using the specified culture-specific formatting information.

Declaration
bool IConvertible.ToBoolean(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Boolean

A Boolean value equivalent to the value of this instance.

IConvertible.ToByte(IFormatProvider)

Converts the value of this instance to an equivalent 8-bit unsigned integer using the specified culture-specific formatting information.

Declaration
byte IConvertible.ToByte(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Byte

An 8-bit unsigned integer equivalent to the value of this instance.

IConvertible.ToChar(IFormatProvider)

Converts the value of this instance to an equivalent Unicode character using the specified culture-specific formatting information.

Declaration
char IConvertible.ToChar(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Char

A Unicode character equivalent to the value of this instance.

IConvertible.ToDateTime(IFormatProvider)

Converts the value of this instance to an equivalent System.DateTime using the specified culture-specific formatting information.

Declaration
DateTime IConvertible.ToDateTime(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.DateTime

A System.DateTime instance equivalent to the value of this instance.

IConvertible.ToDecimal(IFormatProvider)

Converts the value of this instance to an equivalent System.Decimal number using the specified culture-specific formatting information.

Declaration
decimal IConvertible.ToDecimal(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Decimal

A System.Decimal number equivalent to the value of this instance.

IConvertible.ToDouble(IFormatProvider)

Converts the value of this instance to an equivalent double-precision floating-point number using the specified culture-specific formatting information.

Declaration
double IConvertible.ToDouble(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Double

A double-precision floating-point number equivalent to the value of this instance.

IConvertible.ToInt16(IFormatProvider)

Converts the value of this instance to an equivalent 16-bit signed integer using the specified culture-specific formatting information.

Declaration
short IConvertible.ToInt16(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Int16

An 16-bit signed integer equivalent to the value of this instance.

IConvertible.ToInt32(IFormatProvider)

Converts the value of this instance to an equivalent 32-bit signed integer using the specified culture-specific formatting information.

Declaration
int IConvertible.ToInt32(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Int32

An 32-bit signed integer equivalent to the value of this instance.

IConvertible.ToInt64(IFormatProvider)

Converts the value of this instance to an equivalent 64-bit signed integer using the specified culture-specific formatting information.

Declaration
long IConvertible.ToInt64(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Int64

An 64-bit signed integer equivalent to the value of this instance.

IConvertible.ToSByte(IFormatProvider)

Converts the value of this instance to an equivalent 8-bit signed integer using the specified culture-specific formatting information.

Declaration
sbyte IConvertible.ToSByte(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.SByte

An 8-bit signed integer equivalent to the value of this instance.

IConvertible.ToSingle(IFormatProvider)

Converts the value of this instance to an equivalent single-precision floating-point number using the specified culture-specific formatting information.

Declaration
float IConvertible.ToSingle(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Single

A single-precision floating-point number equivalent to the value of this instance.

IConvertible.ToString(IFormatProvider)

Converts the value of this instance to an equivalent System.String using the specified culture-specific formatting information.

Declaration
string IConvertible.ToString(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.String

A System.String instance equivalent to the value of this instance.

IConvertible.ToType(Type, IFormatProvider)

Converts the value of this instance to an System.Object of the specified System.Type that has an equivalent value, using the specified culture-specific formatting information.

Declaration
object IConvertible.ToType(Type conversionType, IFormatProvider provider)
Parameters
Type Name Description
System.Type conversionType

The System.Type to which the value of this instance is converted.

System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.Object

An System.Object instance of type conversionType whose value is equivalent to the value of this instance.

IConvertible.ToUInt16(IFormatProvider)

Converts the value of this instance to an equivalent 16-bit unsigned integer using the specified culture-specific formatting information.

Declaration
ushort IConvertible.ToUInt16(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.UInt16

An 16-bit unsigned integer equivalent to the value of this instance.

IConvertible.ToUInt32(IFormatProvider)

Converts the value of this instance to an equivalent 32-bit unsigned integer using the specified culture-specific formatting information.

Declaration
uint IConvertible.ToUInt32(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.UInt32

An 32-bit unsigned integer equivalent to the value of this instance.

IConvertible.ToUInt64(IFormatProvider)

Converts the value of this instance to an equivalent 64-bit unsigned integer using the specified culture-specific formatting information.

Declaration
ulong IConvertible.ToUInt64(IFormatProvider provider)
Parameters
Type Name Description
System.IFormatProvider provider

An System.IFormatProvider interface implementation that supplies culture-specific formatting information.

Returns
Type Description
System.UInt64

An 64-bit unsigned integer equivalent to the value of this instance.

Implements

System.IConvertible
System.IComparable
System.IComparable<T>
System.IEquatable<T>