Show / Hide Table of Contents

Class ConstantLoader<T>

Abstract class that defines an object capable of loading a constant value into the MSIL instruction sequence.

Inheritance
object
ConstantLoader<T>
BoolConstantLoader
ByteConstantLoader
CharConstantLoader
DecimalConstantLoader
DoubleConstantLoader
Int16ConstantLoader
Int32ConstantLoader
Int64ConstantLoader
SByteConstantLoader
SingleConstantLoader
StringConstantLoader
TypeConstantLoader
UInt16ConstantLoader
UInt32ConstantLoader
UInt64ConstantLoader
Implements
IConstantLoader
IEquatable<IConstantLoader>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types.Extensions.ConstantLoaders
Assembly: MCART.TypeFactory.dll
Syntax
public abstract class ConstantLoader<T> : IConstantLoader, IEquatable<IConstantLoader>
Type Parameters
Name Description
T

Type of constant to load.

Properties

| Edit this page View Source

ConstantType

Gets a reference to the constant type that this instance can load into the MSIL instruction sequence.

Declaration
public Type ConstantType { get; }
Property Value
Type Description
Type

Methods

| Edit this page View Source

CanLoadConstant(object?)

Indicates if the specified value can be loaded using this instance.

Declaration
public bool CanLoadConstant(object? value)
Parameters
Type Name Description
object value

Value to be loaded.

Returns
Type Description
bool

true if the specified value can be loaded using this instance, false otherwise.

| Edit this page View Source

Emit(ILGenerator, object?)

Loads a constant value into the MSIL instruction sequence.

Declaration
public void Emit(ILGenerator il, object? value)
Parameters
Type Name Description
ILGenerator il

Code generator to use.

object value

Constant value to load. Must be of type T.

| Edit this page View Source

Emit(ILGenerator, T)

Loads a T constant value into the MSIL instruction sequence.

Declaration
public abstract void Emit(ILGenerator il, T value)
Parameters
Type Name Description
ILGenerator il

The IL generator to use.

T value

The constant value to load into the instruction sequence.

| Edit this page View Source

Equals(IConstantLoader?)

Determines whether this instance and another IConstantLoader are equal based on the constant type that they can both load.

Declaration
public bool Equals(IConstantLoader? other)
Parameters
Type Name Description
IConstantLoader other

An instance of IConstantLoader to compare against.

Returns
Type Description
bool

true if both IConstantLoader instances can load the same type of values, false otherwise.

Implements

IConstantLoader
IEquatable<T>

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX