Show / Hide Table of Contents

Class Field<V>

Provides typed access to static field declared in type V.

Inheritance
Object
FieldBase<V>
Field<V>
Implements
IEquatable<FieldInfo>
IField<V>
IField
IMember<FieldInfo>
ICustomAttributeProvider
Inherited Members
FieldBase<V>.DeclaringType
FieldBase<V>.MemberType
FieldBase<V>.Name
FieldBase<V>.ReflectedType
FieldBase<V>.GetCustomAttributes(Boolean)
FieldBase<V>.GetCustomAttributes(Type, Boolean)
FieldBase<V>.IsDefined(Type, Boolean)
FieldBase<V>.MetadataToken
FieldBase<V>.Module
FieldBase<V>.GetCustomAttributesData()
FieldBase<V>.CustomAttributes
FieldBase<V>.Attributes
FieldBase<V>.FieldHandle
FieldBase<V>.FieldType
FieldBase<V>.GetOptionalCustomModifiers()
FieldBase<V>.GetRawConstantValue()
FieldBase<V>.GetRequiredCustomModifiers()
FieldBase<V>.GetValueDirect(TypedReference)
FieldBase<V>.IsSecurityCritical
FieldBase<V>.IsSecuritySafeCritical
FieldBase<V>.IsSecurityTransparent
FieldBase<V>.SetValueDirect(TypedReference, Object)
FieldBase<V>.IsReadOnly
FieldBase<V>.IMember<FieldInfo>.RuntimeMember
FieldBase<V>.Equals(FieldInfo)
FieldBase<V>.GetHashCode()
FieldBase<V>.Equals(Object)
FieldBase<V>.ToString()
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public sealed class Field<V> : FieldBase<V>, IEquatable<FieldInfo>, IField<V>, IField, IMember<FieldInfo>, ICustomAttributeProvider
Type Parameters
Name Description
V

Type of field value.

Properties

| Improve this Doc View Source

Value

Obtains managed pointer to the static field.

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

The managed pointer to the static field.

Methods

| Improve this Doc View Source

GetValue(Object)

Returns the value of a field supported by a given object.

Declaration
public override object GetValue(object obj)
Parameters
Type Name Description
Object obj

Must be null.

Returns
Type Description
Object

An object containing the value of the field reflected by this instance.

Overrides
DotNext.Reflection.FieldBase<V>.GetValue(System.Object)
| Improve this Doc View Source

GetValue(Object, out V)

Returns the value of a field supported by a given object.

Declaration
public override bool GetValue(object obj, out V value)
Parameters
Type Name Description
Object obj

Must be null.

V value

An object containing the value of the field reflected by this instance.

Returns
Type Description
Boolean

true, if field value is obtained successfully; otherwise, false.

Overrides
DotNext.Reflection.FieldBase<V>.GetValue(System.Object, V)
| Improve this Doc View Source

SetValue(Object, V)

Sets the value of the field supported by the given object.

Declaration
public override bool SetValue(object obj, V value)
Parameters
Type Name Description
Object obj

Must be null.

V value

The value to assign to the field.

Returns
Type Description
Boolean

true, if field value is modified successfully; otherwise, false.

Overrides
DotNext.Reflection.FieldBase<V>.SetValue(System.Object, V)
| Improve this Doc View Source

SetValue(Object, Object, BindingFlags, Binder, CultureInfo)

Sets the value of the field supported by the given object.

Declaration
public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
Parameters
Type Name Description
Object obj

Must be null.

Object value

The value to assign to the field.

BindingFlags invokeAttr

The type of binding that is desired.

Binder binder

A set of properties that enables the binding, coercion of argument types, and invocation of members through reflection.

CultureInfo culture

The software preferences of a particular culture.

Overrides
DotNext.Reflection.FieldBase<V>.SetValue(System.Object, System.Object, BindingFlags, Binder, CultureInfo)

Operators

| Improve this Doc View Source

Implicit(Field<V> to MemberGetter<V>)

Obtains field getter in the form of the delegate instance.

Declaration
public static implicit operator MemberGetter<V>(Field<V> field)
Parameters
Type Name Description
Field<V> field

The reflected field.

Returns
Type Description
MemberGetter<V>
| Improve this Doc View Source

Implicit(Field<V> to MemberSetter<V>)

Obtains field setter in the form of the delegate instance.

Declaration
public static implicit operator MemberSetter<V>(Field<V> field)
Parameters
Type Name Description
Field<V> field

The reflected field.

Returns
Type Description
MemberSetter<V>

Implements

IEquatable<>
IField<F>
IField
IMember<M>
ICustomAttributeProvider

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
ExpressionBuilder.Const<T>(T)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX