Table of Contents

Class AssemblyUtils

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains Assembly, PropertyInfo and Type related static methods.

public static class AssemblyUtils
Inheritance
AssemblyUtils

Fields

Default

Gets initialized instance of the BaseObject for the different purposes.

DefaultByte

Gets default value for the byte type as object.

DefaultDateTime

Gets default value for the DateTime type as object.

DefaultDecimal

Gets default value for the decimal type as object.

DefaultDouble

Gets default value for the double type as object.

DefaultInt16

Gets default value for the short type as object.

DefaultInt32

Gets default value for the int type as object.

DefaultInt64

Gets default value for the long type as object.

DefaultSByte

Gets default value for the sbyte type as object.

DefaultSingle

Gets default value for the float type as object.

DefaultUInt16

Gets default value for the ushort type as object.

DefaultUInt32

Gets default value for the uint type as object.

DefaultUInt64

Gets default value for the ulong type as object.

False

Gets false value as object.

MaxValueByte

Gets maximal possible variable value for the byte type as object.

MaxValueDateTime

Gets maximal possible variable value for the DateTime type as object.

MaxValueDecimal

Gets maximal possible variable value for the decimal type as object.

MaxValueDouble

Gets maximal possible variable value for the double type as object.

MaxValueInt16

Gets maximal possible variable value for the short type as object.

MaxValueInt32

Gets maximal possible variable value for the int type as object.

MaxValueInt64

Gets maximal possible variable value for the long type as object.

MaxValueSByte

Gets maximal possible variable value for the sbyte type as object.

MaxValueSingle

Gets maximal possible variable value for the float type as object.

MaxValueUInt16

Gets maximal possible variable value for the ushort type as object.

MaxValueUInt32

Gets maximal possible variable value for the uint type as object.

MaxValueUInt64

Gets maximal possible variable value for the ulong type as object.

MinValueByte

Gets minimal possible variable value for the byte type as object.

MinValueDateTime

Gets minimal possible variable value for the DateTime type as object.

MinValueDecimal

Gets minimal possible variable value for the decimal type as object.

MinValueDouble

Gets minimal possible variable value for the double type as object.

MinValueInt16

Gets minimal possible variable value for the short type as object.

MinValueInt32

Gets minimal possible variable value for the int type as object.

MinValueInt64

Gets minimal possible variable value for the long type as object.

MinValueSByte

Gets minimal possible variable value for the sbyte type as object.

MinValueSingle

Gets minimal possible variable value for the float type as object.

MinValueUInt16

Gets minimal possible variable value for the ushort type as object.

MinValueUInt32

Gets minimal possible variable value for the uint type as object.

MinValueUInt64

Gets minimal possible variable value for the ulong type as object.

True

Gets true value as object.

Properties

AllControlDescendants

Gets or sets list of all Control descendants.

AllControlEvents

Gets or sets list of events for all Control descendants.

Methods

CompareByName(EventInfo, EventInfo)

Compares two specified EventInfo objects by their names and returns an integer that indicates their relative position in the sort order.

CompareByName(PropertyInfo, PropertyInfo)

Compares two specified PropertyInfo objects by their names and returns an integer that indicates their relative position in the sort order.

CreateAction(object, MethodInfo)

Creates Action for the specified MethodInfo.

EnumEvents(Type, bool, BindingFlags)

Enumerates event information for the specified Type.

EnumIsFlags(Type)

Returns whether enumeration has FlagsAttribute.

EnumProps(Type, bool, BindingFlags)

Enumerates property information for the specified Type.

EnumPublicObjectsForNamespace(Assembly, string)

Enumerates public objects declared in the specified namespace.

FindAssemblyForResource(string)

Finds assembly for the specified resource name.

GetAllDescendantsEvents(Type, BindingFlags)

Enumerates events in all descendants of the specified type.

GetAssemblyResPrefix(Assembly)

Gets prefix string for the embedded resource.

GetBrowsable(PropertyInfo)

Returns whether property is browsable.

GetControlCategory(Type)

Returns toolbox category of the control.

GetDefaultNumberStyles(TypeCode)

Gets default NumberStyles for the specified typeCode.

GetDefaultValue(PropertyInfo, out object?)

Gets default value of the property using DefaultValueAttribute.

GetDefaultValue(TypeCode)

Gets default value for the given TypeCode.

GetImageUrlInAssembly(Assembly, string?)

Gets image url for loading image resource from the specified assembly using "embres" protocol.

GetMaxValue(TypeCode)

Gets maximal possible variable value for the given TypeCode.

GetMinMaxRangeStr(TypeCode, string?, object?, object?)

Returns minimal and maximal possible values for the given TypeCode as a range string using specified format.

GetMinValue(TypeCode)

Gets minimal possible variable value for the given TypeCode.

GetNullable(PropertyInfo)

Returns whether property is nullable (for example byte?).

GetPropInfo(object?, string?)

Gets property info.

GetPropValue<T>(object?, PropertyInfo, T)

Gets property value.

GetRealType(Type)

Gets real type, using GetUnderlyingType(Type).

GetRealTypeCode(Type)

Gets TypeCode of the real type using GetRealType(Type) and GetTypeCode(Type).

GetResetPropMethod(object, string)

Gets reset method for the specified property.

GetSortedTypeDescendantsWithFullNames(Type)

Returns list of types which descend from specified type. Result is sorted by FullName and uses it as keys.

GetTypeDescendants(Type)

Returns list of types which descend from specified type.

HasConstructorNoParams(Type)

Gets whether Type has constructor without parameters.

HasOwnEvents(Type?)

Gets whether specified type has declared events (events declared in the parent types are not counted).

IsControlDescendantEventName(string)

Gets whether specified string is name of the event declared in any descendant of the Control.

IsReadOnly(PropertyInfo)

Gets whether property is readonly.

IsStruct(Type?)

Gets whether Type is struct.

IsTypeCodeFloat(TypeCode)

Returns true if typeCode is a floating point number type (float, double or decimal).

IsTypeCodeNumber(TypeCode)

Returns true if typeCode is number type.

IsTypeCodeSignedInt(TypeCode)

Returns true if typeCode is a signed integer number type (sbyte, short, int, long).

IsTypeCodeUnsignedInt(TypeCode)

Returns true if typeCode is an unsigned integer number type (byte, ushort, uint, ulong).

TypeIsDescendant(Type, Type)

Returns true if specified type is a descendant of another type.

TypeIsDescendant(Type, Type[])

Returns true if type is a descendant of any type in the array of types.

UpgradeNumberType(object)

Upgrades signed inegers to long, unsigned integers to ulong and returns all other types as is.