ObjectEx ​
Kind: Static class
Namespace: CrowdControl.Common
Public Static Functions
byte[]
GetBytes(object value)
int
GetUnmanagedSize(object value)
long
ToLong(object value)
object
CastTo(object value, Type toType)
TTo
CastTo<TTo>(object value)
TTo
CastTo<TTo, TFrom>(TFrom value)
T
FieldCopy<T>(T ref parent)
T
FieldCopy<T>(T parent)
TChild
FieldCopy<TParent, TChild>(TParent parent)
void
FieldCopy<TParent, TChild>(TParent ref parent, TChild ref child)
void
FieldCopy<TParent, TChild>(TParent parent, TChild child)
bool
IsObsolete<T>(string name)
FieldInfo
GetField(object obj, string fieldName)
object
GetFieldValue(object obj, string fieldName)
void
SetFieldValue(object obj, string fieldName, object value)
PropertyInfo
GetProperty(object obj, string propertyName)
object
GetPropertyValue(object obj, string propertyName)
void
SetPropertyValue(object obj, string propertyName, object value)
T2
IfNotNull<T1, T2>(T1 value, Func selector)
T2?
IfNotNull<T1, T2>(T1 value, Func selector)
SingletonEnumerable
AsSingletonEnumerable<T>(T value)
IEnumerable
GetTypes(IEnumerable objects)
Type[]
GetTypes(IList objects)
void
CallInterfaceDefaultMethod<TInterface>(TInterface obj, Span params)
Allows calling the default method of an interface regardless of whether the derived class implements it or not.
TReturn
CallInterfaceDefaultMethod<TInterface, TReturn>(TInterface obj, Span params)
Allows calling the default method of an interface regardless of whether the derived class implements it or not.
