Show / Hide Table of Contents

Class PropertyBuildInfo

Contains information about the construction of a property.

Inheritance
object
MemberBuildInfo<PropertyBuilder>
PropertyBuildInfo
Inherited Members
MemberBuildInfo<PropertyBuilder>.TypeBuilder
MemberBuildInfo<PropertyBuilder>.Member
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Types
Assembly: MCART.TypeFactory.dll
Syntax
public class PropertyBuildInfo : MemberBuildInfo<PropertyBuilder>

Constructors

| Edit this page View Source

PropertyBuildInfo(TypeBuilder, PropertyBuilder, FieldBuilder)

Initializes a new instance of the PropertyBuildInfo class.

Declaration
public PropertyBuildInfo(TypeBuilder typeBuilder, PropertyBuilder property, FieldBuilder field)
Parameters
Type Name Description
TypeBuilder typeBuilder

The TypeBuilder instance where the property was defined.

PropertyBuilder property

The PropertyBuilder that describes the property that has been created.

FieldBuilder field

The backing field defined for the property.

| Edit this page View Source

PropertyBuildInfo(TypeBuilder, PropertyBuilder, ILGenerator)

Initializes a new instance of the PropertyBuildInfo class.

Declaration
public PropertyBuildInfo(TypeBuilder typeBuilder, PropertyBuilder property, ILGenerator getter)
Parameters
Type Name Description
TypeBuilder typeBuilder

The TypeBuilder instance where the property was defined.

PropertyBuilder property

The PropertyBuilder that describes the property that has been created.

ILGenerator getter

The ILGenerator that allows the code for the property's get block to be defined.

| Edit this page View Source

PropertyBuildInfo(TypeBuilder, PropertyBuilder, ILGenerator?, ILGenerator?)

Initializes a new instance of the PropertyBuildInfo class.

Declaration
public PropertyBuildInfo(TypeBuilder typeBuilder, PropertyBuilder property, ILGenerator? getter, ILGenerator? setter)
Parameters
Type Name Description
TypeBuilder typeBuilder

Instance of TypeBuilder where the property was defined.

PropertyBuilder property

PropertyBuilder that describes the property that has been created.

ILGenerator getter

ILGenerator that allows the code for the property's get block to be defined.

ILGenerator setter

ILGenerator that allows the code for the property's set block to be defined.

Properties

| Edit this page View Source

Field

Reference to the FieldBuilder used to create the backing field for the property, if one is employed.

Declaration
public FieldBuilder? Field { get; }
Property Value
Type Description
FieldBuilder

The FieldBuilder of the backing field, or null if the property does not use a field to store its current value.

| Edit this page View Source

Getter

Reference to the ILGenerator of the property's get method.

Declaration
public ILGenerator? Getter { get; }
Property Value
Type Description
ILGenerator

An ILGenerator that can be used to define the property's get method, or null if the property is auto‑implemented or if the property has no get method.

| Edit this page View Source

Setter

Reference to the ILGenerator of the property's set method.

Declaration
public ILGenerator? Setter { get; }
Property Value
Type Description
ILGenerator

An ILGenerator that can be used to define the property's set method, or null if the property is auto‑implemented or if the property has no set method.

Methods

| Edit this page View Source

Create(TypeBuilder, string, Type, bool, MemberAccess, bool)

Creates a property in the type with no get or set implementations initially defined.

Declaration
public static PropertyBuildInfo Create(TypeBuilder tb, string name, Type type, bool writable, MemberAccess access, bool @virtual)
Parameters
Type Name Description
TypeBuilder tb

Type builder in which to create the new property.

string name

Name of the new property.

Type type

Type of the new property.

bool writable

true to create a property that contains a write accessor (set accessor); false to omit a write accessor.

MemberAccess access

Access level of the new property.

bool virtual

If true, the property is defined as virtual, allowing it to be overridden in a derived class.

Returns
Type Description
PropertyBuildInfo

A PropertyBuildInfo that contains information about the constructed property.

Remarks

The generated property will require the accessors to be implemented before the type is created.

| Edit this page View Source

CreateWriteOnly(TypeBuilder, string, Type, MemberAccess, bool)

Creates a write‑only property in the type.

Declaration
public static PropertyBuildInfo CreateWriteOnly(TypeBuilder tb, string name, Type type, MemberAccess access, bool @virtual)
Parameters
Type Name Description
TypeBuilder tb

Type builder in which to create the new property.

string name

Name of the new property.

Type type

Type of the new property.

MemberAccess access

Access level of the new property.

bool virtual

If true, the property is defined as virtual and can be overridden in a derived class.

Returns
Type Description
PropertyBuildInfo

A PropertyBuildInfo that contains information about the constructed property.

Operators

| Edit this page View Source

implicit operator FieldInfo?(PropertyBuildInfo)

Implicitly converts a PropertyBuildInfo to a FieldInfo.

Declaration
public static implicit operator FieldInfo?(PropertyBuildInfo buildInfo)
Parameters
Type Name Description
PropertyBuildInfo buildInfo

The PropertyBuildInfo from which to extract the FieldInfo.

Returns
Type Description
FieldInfo

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>)
PropertyBuildInfoExtensions.BuildNpcPropSetterSkeleton(PropertyBuildInfo, IlBlockWithExitLabel, IlBlockWithExitLabel, Type)
PropertyBuildInfoExtensions.WithBackingField(PropertyBuildInfo, out FieldBuilder)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX