Struct SqlObjectBuilderReferenceSource<T>
Represents a source that references an ISqlObjectBuilder instance.
public readonly struct SqlObjectBuilderReferenceSource<T> : IEquatable<SqlObjectBuilderReferenceSource<T>> where T : class, ISqlObjectBuilder
Type Parameters
T
SQL object builder type.
- Implements
- Inherited Members
Properties
Object
Referencing object.
public T Object { get; }
Property Value
- T
Property
Optional name of the referencing property of Object.
public string? Property { get; }
Property Value
Methods
Equals(SqlObjectBuilderReferenceSource<T>)
Indicates whether the current object is equal to another object of the same type.
[Pure]
public bool Equals(SqlObjectBuilderReferenceSource<T> other)
Parameters
other
SqlObjectBuilderReferenceSource<T>An object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
[Pure]
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
[Pure]
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns a string representation of this SqlObjectBuilderReferenceSource<T> instance.
[Pure]
public override string ToString()
Returns
- string
String representation.
UnsafeReinterpretAs<TDestination>()
Converts this instance to another type that implements the ISqlObjectBuilder interface.
[Pure]
public SqlObjectBuilderReferenceSource<TDestination> UnsafeReinterpretAs<TDestination>() where TDestination : class, ISqlObjectBuilder
Returns
- SqlObjectBuilderReferenceSource<TDestination>
New SqlObjectBuilderReferenceSource<T> instance.
Type Parameters
TDestination
SQL object builder type to convert to.
Remarks
Be careful while using this method, because it does not actually validate the type's correctness.
WithProperty(string?)
Creates a new SqlObjectBuilderReferenceSource<T> instance with changed Property.
[Pure]
public SqlObjectBuilderReferenceSource<T> WithProperty(string? property)
Parameters
Returns
- SqlObjectBuilderReferenceSource<T>
New SqlObjectBuilderReferenceSource<T> instance.
Operators
operator ==(SqlObjectBuilderReferenceSource<T>, SqlObjectBuilderReferenceSource<T>)
Checks if a
is equal to b
.
[Pure]
public static bool operator ==(SqlObjectBuilderReferenceSource<T> a, SqlObjectBuilderReferenceSource<T> b)
Parameters
a
SqlObjectBuilderReferenceSource<T>First operand.
b
SqlObjectBuilderReferenceSource<T>Second operand.
Returns
- bool
true when operands are equal, otherwise false.
implicit operator SqlObjectBuilderReferenceSource<ISqlObjectBuilder>(SqlObjectBuilderReferenceSource<T>)
Converts source
to the base ISqlObjectBuilder type.
[Pure]
public static implicit operator SqlObjectBuilderReferenceSource<ISqlObjectBuilder>(SqlObjectBuilderReferenceSource<T> source)
Parameters
source
SqlObjectBuilderReferenceSource<T>Source to convert.
Returns
operator !=(SqlObjectBuilderReferenceSource<T>, SqlObjectBuilderReferenceSource<T>)
Checks if a
is not equal to b
.
[Pure]
public static bool operator !=(SqlObjectBuilderReferenceSource<T> a, SqlObjectBuilderReferenceSource<T> b)
Parameters
a
SqlObjectBuilderReferenceSource<T>First operand.
b
SqlObjectBuilderReferenceSource<T>Second operand.
Returns
- bool
true when operands are not equal, otherwise false.