> module
std::re::dotnet
read, construct and write .NET assemblies
std::re::dotnet reads, builds and writes .NET (ECMA-335) assemblies. open and parse give a Module, which holds every type, method, field, property and event, and can be written back out or decompiled to C#. new starts an empty one to build.
Module, TypeDefEntry, MethodEntry, FieldEntry, PropertyEntry, EventEntry, ParamEntry, BaseTypeRef, MethodBody, MemberToken, TypeSigDef and MethodSigDef are handles with the methods below. They share what they point at: a TypeDefEntry changed through one handle is changed for all. Plain data reachable from them (custom attributes, constants, enums) are records and enums read through reflection.
Flags come back as integers. For each flags set there are two functions: name_names(bits) lists the names of the flags set in bits, and name(names) combines a list of names into an integer, failing on an unknown one. Names are hao's, which follow the ECMA-335 spelling, such as "Public", "Static" or "BeforeFieldInit". Access and layout are multi-bit fields, so the names of a value list every name whose bits are all set: a public method lists "FamANDAssem", "Family" and "Public".
Backed by hao.
Where a function takes a TypeName it accepts a full "Namespace.Name" string (nested types as "Namespace.Outer/Inner"), a (namespace, name) pair, a SystemType such as SystemType::Object (a type in the System namespace), or a WellKnown such as WellKnown::System(SystemType::Uri).
Where it takes an AssemblyName it accepts an assembly name string, a WellKnownModule such as WellKnownModule::SystemConsole (which carries the assembly's public-key token), or either of those paired with a (major, minor, build, revision) version. Without a version the reference is to version 0.0.0.0.
An AnyWellKnownMethod is a WellKnownMethod such as WellKnownMethod::Console(ConsoleMethod::WriteLineStr), or one of its inner enums on its own, such as ConsoleMethod::WriteLineStr. These name common base class library methods with their signatures built in.
> functions
add_method(typedef: TypeDefEntry, method: MethodEntry) -> MethodEntryAdd a copy of method to typedef and return the added method, which is the one to pass to Module.set_entry_point().
Combine assembly flag names into an integer. The assembly flag names set in bits.
Combine assembly flag names into an integer. The assembly flag names set in bits.
assembly_name(w: WellKnownModule) -> strThe assembly name of a well-known module, such as "System.Console" for WellKnownModule::SystemConsole.
attribute_is_type(attr: CustomAttribute, name: TypeName) -> boolWhether a custom attribute's type is name.
attribute_type_name(attr: CustomAttribute) -> strThe full name of a custom attribute's type.
Combine event attribute names into an integer. The event attribute names set in bits, for example from EventEntry.flags().
Combine event attribute names into an integer. The event attribute names set in bits, for example from EventEntry.flags().
Combine field attribute names into an integer. The field attribute names set in bits.
Combine field attribute names into an integer. The field attribute names set in bits.
Combine generic parameter attribute names into an integer. The generic parameter attribute names set in bits.
Combine generic parameter attribute names into an integer. The generic parameter attribute names set in bits.
Combine method attribute names into an integer. The method attribute names set in bits, for example from MethodEntry.flags().
Combine method attribute names into an integer. The method attribute names set in bits, for example from MethodEntry.flags().
module_of(w: WellKnown) -> WellKnownModuleThe assembly a well-known type lives in. It is worked out per namespace, so a type that lives outside its namespace's main assembly gets that main assembly.
name(v: WellKnownModule | WellKnown | SystemType) -> strThe name of a well-known value: a type's name such as "Uri" for SystemType::Uri, or a module's variant name such as "SystemConsole".
Start an empty module named name that targets .NET 9. kind is "dll" (the default), "console" (or "exe") or "windows"; anything else raises an error.
Load the assembly at path, resolving the assemblies it references from the same directory.
Combine parameter attribute names into an integer. The parameter attribute names set in bits, for example from ParamEntry.flags().
Combine parameter attribute names into an integer. The parameter attribute names set in bits, for example from ParamEntry.flags().
Parse an assembly held in memory, without resolving its references.
Combine property attribute names into an integer. The property attribute names set in bits, for example from PropertyEntry.flags().
Combine property attribute names into an integer. The property attribute names set in bits, for example from PropertyEntry.flags().
public_static_method(name: str, sig: MethodSigDef, body: MethodBody) -> MethodEntryA new public static method with signature sig (from dotnet::sig) and IL body (from dotnet::il).
static_class(module: Module, namespace: str, name: str) -> TypeDefEntryA new public static class (abstract and sealed, extending System.Object). Add it to the module with Module.add_type().
Combine type attribute names into an integer. The type attribute names set in bits.
> types
| AppDomainMethod::GetCurrentDomain | |
| AppDomainMethod::GetAssemblies |
| ArrayListMethod::New | |
| ArrayListMethod::Add | |
| ArrayListMethod::ToArray |
| ArrayMethod::GetLength |
The assembly manifest of the current module.
| hash_alg_id | u32 | |
| version | Version | |
| flags | AssemblyFlags | |
| public_key | bytes | |
| name | str | |
| culture | str | |
| security | list<DeclSecurity> | |
| custom_attributes | list<CustomAttribute> |
An opaque value; see the functions that return it.
| AssemblyMethod::LoadFrom | |
| AssemblyMethod::GetName | |
| AssemblyMethod::GetTypeStr | |
| AssemblyMethod::GetTypes |
| AssemblyNameMethod::GetName |
| version | Version | |
| flags | AssemblyFlags | |
| public_key_or_token | bytes | |
| name | str | |
| culture | str | |
| hash_value | bytes | |
| custom_attributes | list<CustomAttribute> | |
| resolved | Option<Module> | Set by [`Module::load_dependancies`]. |
A reference to a type: one defined in this module, one in another assembly, or a generic instance.
base_type_ref.resolve() -> Option<TypeDefEntry>The type's definition, if it is in this module or a loaded referenced one. None for a generic instance.
| ConsoleMethod::WriteLine | |
| ConsoleMethod::WriteLineStr | |
| ConsoleMethod::WriteLineObj | |
| ConsoleMethod::WriteLineI32 | |
| ConsoleMethod::WriteLineBool | |
| ConsoleMethod::WriteLineChar | |
| ConsoleMethod::WriteStr | |
| ConsoleMethod::ReadLine |
A compile time constant for a field, parameter or property (ECMA-335 II.22.9). [`value`](Self::value) is the raw little-endian blob; [`decode`](Self::decode) turns it into a typed [`ConstantValue`].
| element_type | ElementType | |
| value | bytes |
A decoded [`Constant`] value.
| ConstantValue::Bool(bool) | |
| ConstantValue::Char(u16) | A UTF-16 code unit (`System.Char`). |
| ConstantValue::I1(i8) | |
| ConstantValue::U1(u8) | |
| ConstantValue::I2(i16) | |
| ConstantValue::U2(u16) | |
| ConstantValue::I4(i32) | |
| ConstantValue::U4(u32) | |
| ConstantValue::I8(i64) | |
| ConstantValue::U8(u64) | |
| ConstantValue::R4(f32) | |
| ConstantValue::R8(f64) | |
| ConstantValue::String(str) | |
| ConstantValue::Null | A `null` reference constant (element type `Class`). |
| ConvertMethod::ToStringObj | |
| ConvertMethod::ToInt32Str | |
| ConvertMethod::ToBooleanStr |
A custom attribute. The value is kept as the raw blob (II.23.3).
| constructor | CustomAttributeCtor | |
| value | bytes |
Declarative security (II.22.11). The permission set is the raw blob.
| action | u16 | |
| permission_set | bytes | |
| custom_attributes | list<CustomAttribute> |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
| rid | RidCell | |
| value | ModuleRef |
| rid | RidCell | |
| value | Assembly |
| rid | RidCell | |
| value | AssemblyRef |
| rid | RidCell | |
| value | Event |
| rid | RidCell | |
| value | ExportedType |
| rid | RidCell | |
| value | Field |
| rid | RidCell | |
| value | File |
| rid | RidCell | |
| value | GenericParam |
| rid | RidCell | |
| value | ManifestResource |
| rid | RidCell | |
| value | MemberRef |
| rid | RidCell | |
| value | Method |
| rid | RidCell | |
| value | MethodSpec |
| rid | RidCell | |
| value | ModuleDef |
| rid | RidCell | |
| value | Param |
| rid | RidCell | |
| value | Property |
| rid | RidCell | |
| value | TypeDef |
| rid | RidCell | |
| value | TypeRef |
| rid | RidCell | |
| value | TypeSpec |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
A shared handle to a metadata entry (a type, method, field, ...). Cloning an `Entry` is cheap and produces another handle to the same value. Entries compare and hash by identity.
| 0 | EntryInner |
| EnvironmentMethod::GetNewLine | |
| EnvironmentMethod::GetMachineName | |
| EnvironmentMethod::GetProcessorCount | |
| EnvironmentMethod::GetEnvironmentVariableStr | |
| EnvironmentMethod::Exit |
| flags | EventFlags | |
| name | str | |
| event_type | Option<TypeDefOrRef> | |
| add | Option<Entry> | |
| remove | Option<Entry> | |
| fire | Option<Entry> | |
| other_methods | list<Entry> | |
| custom_attributes | list<CustomAttribute> |
event_entry.add() -> Option<MethodEntry>The add accessor.
event_entry.event_type() -> Option<BaseTypeRef>The event's delegate type.
event_entry.fire() -> Option<MethodEntry>The raise accessor, which C# never emits.
event_entry.remove() -> Option<MethodEntry>The remove accessor.
An opaque value; see the functions that return it.
| ExceptionMethod::GetHResult |
A type exported (or forwarded) by this assembly.
| flags | TypeAttributes | |
| type_def_id | u32 | |
| name | str | |
| namespace | str | |
| implementation | Option<Implementation> | |
| custom_attributes | list<CustomAttribute> |
field_entry.constant() -> Option<ConstantValue>The field's compile-time constant (a const or enum member), if it has one.
field_entry.custom_attributes() -> list<CustomAttribute>The field's custom attributes.
field_entry.field_type() -> TypeSigDefThe field's type.
field_entry.is_static() -> boolWhether it is static.
field_entry.signature() -> TypeSigDefThe field's type; the same as field_type().
An opaque value; see the functions that return it.
| flags | FileFlags | |
| name | str | |
| hash_value | bytes | |
| custom_attributes | list<CustomAttribute> |
An opaque value; see the functions that return it.
| GcMethod::Collect | |
| GcMethod::CollectGen | |
| GcMethod::SuppressFinalize | |
| GcMethod::TryStartNoGCRegion | |
| GcMethod::EndNoGCRegion |
| number | u16 | |
| flags | GenericParamFlags | |
| name | str | |
| constraints | list<GenericParamConstraint> | |
| custom_attributes | list<CustomAttribute> |
| constraint | TypeDefOrRef | |
| custom_attributes | list<CustomAttribute> |
An opaque value; see the functions that return it.
| IEnumerableMethod::GetEnumerator |
| IEnumeratorMethod::MoveNext | |
| IEnumeratorMethod::GetCurrent |
P/Invoke information for a method or field.
| flags | PInvokeMapFlags | |
| import_name | str | |
| scope | Entry |
| interface | TypeDefOrRef | |
| custom_attributes | list<CustomAttribute> |
| flags | ManifestResourceFlags | |
| name | str | |
| data | ResourceData | |
| custom_attributes | list<CustomAttribute> |
An opaque value; see the functions that return it.
| MarshalMethod::PtrToStringAuto | |
| MarshalMethod::StringToCoTaskMemUni | |
| MarshalMethod::FreeCoTaskMem | |
| MarshalMethod::UnsafeAddrOfPinnedArrayElement |
| MathMethod::MaxI32 | |
| MathMethod::MinI32 | |
| MathMethod::AbsI32 |
| MemberInfoMethod::GetName |
A reference to a field or method, usually in another assembly.
| parent | MemberRefParent | |
| name | str | |
| signature | MemberRefSig | |
| custom_attributes | list<CustomAttribute> |
An opaque value; see the functions that return it.
| flags | MethodFlags | |
| impl_flags | MethodImplFlags | |
| name | str | |
| signature | MethodSig | |
| params | list<Entry> | |
| body | Option<MethodBody> | |
| generic_params | list<Entry> | |
| impl_map | Option<ImplMap> | |
| security | list<DeclSecurity> | |
| custom_attributes | list<CustomAttribute> | |
| declaring_type | WeakEntry |
| MethodBaseMethod::GetMethodHandle | |
| MethodBaseMethod::GetParameters |
method_entry.body() -> Option<MethodBody>Its IL body; None for abstract, extern and runtime methods.
method_entry.custom_attributes() -> list<CustomAttribute>The method's custom attributes.
method_entry.is_abstract() -> boolWhether it is abstract.
method_entry.is_cctor() -> boolWhether it is a static constructor (.cctor).
method_entry.is_ctor() -> boolWhether it is an instance constructor (.ctor).
method_entry.is_public() -> boolWhether its access is public.
method_entry.is_static() -> boolWhether it is static.
method_entry.is_virtual() -> boolWhether it is virtual.
The name of parameter index (from 0, not counting this), or argindex if it has no name.
method_entry.parameters() -> list<ParamEntry>Its parameter rows.
method_entry.return_type() -> TypeSigDefThe return type from its signature.
method_entry.signature() -> MethodSigDefThe method's signature.
An opaque value; see the functions that return it.
An explicit interface method implementation (II.22.27).
| body | MethodDefOrRef | |
| declaration | MethodDefOrRef |
An opaque value; see the functions that return it.
An opaque value; see the functions that return it.
An instantiation of a generic method.
| method | MethodDefOrRef | |
| instantiation | list<TypeSig> | |
| custom_attributes | list<CustomAttribute> |
| MicrosoftCSharpRuntimeBinderType::Binder | |
| MicrosoftCSharpRuntimeBinderType::CSharpArgumentInfo | |
| MicrosoftCSharpRuntimeBinderType::CSharpArgumentInfoFlags | |
| MicrosoftCSharpRuntimeBinderType::CSharpBinderFlags |
| MicrosoftVisualBasicApplicationServicesType::ApplicationBase | |
| MicrosoftVisualBasicApplicationServicesType::WindowsFormsApplicationBase |
| MicrosoftVisualBasicCompilerServicesType::Conversions | |
| MicrosoftVisualBasicCompilerServicesType::Operators | |
| MicrosoftVisualBasicCompilerServicesType::NewLateBinding | |
| MicrosoftVisualBasicCompilerServicesType::EmbeddedOperators | |
| MicrosoftVisualBasicCompilerServicesType::StandardModuleAttribute | |
| MicrosoftVisualBasicCompilerServicesType::Utils | |
| MicrosoftVisualBasicCompilerServicesType::LikeOperator | |
| MicrosoftVisualBasicCompilerServicesType::ProjectData | |
| MicrosoftVisualBasicCompilerServicesType::ObjectFlowControl | |
| MicrosoftVisualBasicCompilerServicesType::StaticLocalInitFlag | |
| MicrosoftVisualBasicCompilerServicesType::StringType | |
| MicrosoftVisualBasicCompilerServicesType::IncompleteInitialization | |
| MicrosoftVisualBasicCompilerServicesType::Versioned |
| MicrosoftVisualBasicType::CallType | |
| MicrosoftVisualBasicType::Embedded | |
| MicrosoftVisualBasicType::CompareMethod | |
| MicrosoftVisualBasicType::Strings | |
| MicrosoftVisualBasicType::ErrObject | |
| MicrosoftVisualBasicType::FileSystem | |
| MicrosoftVisualBasicType::Information | |
| MicrosoftVisualBasicType::Interaction | |
| MicrosoftVisualBasicType::Conversion |
module.add_assembly_ref(assembly: AssemblyName)Add a reference to an assembly, unless there already is one.
module.add_type(typedef: TypeDefEntry)Add a type built with static_class() to the module.
module.all_fields() -> list<FieldEntry>Every field of every type.
module.all_methods() -> list<MethodEntry>Every method of every type.
module.all_types() -> list<TypeDefEntry>Every type, nested ones included, depth first. The first is <Module>, which holds global fields and methods.
module.corlib_type(ty: TypeName) -> Result<BaseTypeRef, str>A reference to a type in the core library, such as "System.Object".
module.find_field(ty: TypeName, name: str) -> Option<FieldEntry>The field named name in the type named ty.
module.find_method(ty: TypeName, name: str) -> Option<MethodEntry>The first method named name in the type named ty (found as by find_type_by_full_name()).
module.find_type(ty: TypeName) -> Option<TypeDefEntry>The top-level type named ty.
module.find_type_by_full_name(ty: TypeName) -> Option<TypeDefEntry>The type named ty, nested types included ("Namespace.Outer/Inner").
module.global_type() -> Option<TypeDefEntry>The <Module> type, which holds global fields and methods.
module.import_corlib_method(ty: TypeName, name: str, sig: MethodSigDef) -> Result<MemberToken, str>A token for method name with signature sig on a core library type, such as System.Math::Max.
module.import_method(assembly: AssemblyName, type_name: TypeName, method_name: str, sig: MethodSigDef) -> Result<MemberToken, str>A token for method method_name with signature sig on type type_name in assembly, for Emitter.call(). Add the assembly with add_assembly_ref() first.
module.import_well_known_method(method: AnyWellKnownMethod) -> Result<MemberToken, str>A token for a well-known method, such as ConsoleMethod::WriteLineStr, with no assembly, type or signature to spell out.
module.import_well_known_type(ty: WellKnown) -> Result<BaseTypeRef, str>A reference to a well-known type, adding a reference to the assembly it lives in (see module_of()).
module.resolve_type(ty: TypeName) -> Option<TypeDefEntry>Like find_type(), but also follows type forwarders into the loaded assemblies this one references.
module.set_entry_point(method: MethodEntry)Make method the program's entry point.
| generation | u16 | |
| name | str | |
| mvid | Uuid | |
| enc_id | Uuid | |
| enc_base_id | Uuid | |
| custom_attributes | list<CustomAttribute> |
| ModuleKind::Dll | |
| ModuleKind::Console | |
| ModuleKind::Windows |
| name | str | |
| custom_attributes | list<CustomAttribute> |
| ObjectMethod::ToString | |
| ObjectMethod::GetHashCode | |
| ObjectMethod::GetType | |
| ObjectMethod::EqualsObj | |
| ObjectMethod::ReferenceEquals |
An opaque value; see the functions that return it.
| flags | ParamFlags | |
| sequence | u16 | |
| name | str | |
| constant | Option<Constant> | |
| marshal | Option<bytes> | |
| custom_attributes | list<CustomAttribute> |
param_entry.constant() -> Option<ConstantValue>Its default value, if it has one.
Its parameter attributes (in, out, optional...); see param_flags_names().
An opaque value; see the functions that return it.
| flags | PropertyFlags | |
| name | str | |
| signature | PropertySig | |
| constant | Option<Constant> | |
| getter | Option<Entry> | |
| setter | Option<Entry> | |
| other_methods | list<Entry> | |
| custom_attributes | list<CustomAttribute> |
property_entry.constant() -> Option<ConstantValue>The property's default value, if it has one.
property_entry.getter() -> Option<MethodEntry>The get accessor, if any.
property_entry.setter() -> Option<MethodEntry>The set accessor, if any.
An opaque value; see the functions that return it.
| ResourceData::Embedded(bytes) | |
| ResourceData::Linked(implementation:Implementation,offset:u32) |
| RuntimeHelpersMethod::PrepareMethod |
| RuntimeMethodHandleMethod::GetFunctionPointer |
| StringBuilderMethod::New | |
| StringBuilderMethod::NewStr | |
| StringBuilderMethod::AppendStr | |
| StringBuilderMethod::AppendChar | |
| StringBuilderMethod::AppendI32 | |
| StringBuilderMethod::AppendObj | |
| StringBuilderMethod::AppendLineStr | |
| StringBuilderMethod::Clear | |
| StringBuilderMethod::ToString |
| StringExtMethod::OpEquality |
| StringMethod::Concat2 | |
| StringMethod::FormatObj | |
| StringMethod::IsNullOrEmpty | |
| StringMethod::EqualsStr | |
| StringMethod::GetLength | |
| StringMethod::SubstringI32 | |
| StringMethod::ToUpper | |
| StringMethod::ToLower | |
| StringMethod::ContainsStr | |
| StringMethod::ReplaceStr |
| SystemCollectionsGenericType::HashSet_1 | |
| SystemCollectionsGenericType::Queue_1 | |
| SystemCollectionsGenericType::Stack_1 | |
| SystemCollectionsGenericType::LinkedList_1 | |
| SystemCollectionsGenericType::SortedDictionary_2 | |
| SystemCollectionsGenericType::SortedList_2 | |
| SystemCollectionsGenericType::SortedSet_1 | |
| SystemCollectionsGenericType::ISet_1 | |
| SystemCollectionsGenericType::IReadOnlySet_1 | |
| SystemCollectionsGenericType::IComparer_1 | |
| SystemCollectionsGenericType::IEqualityComparer_1 | |
| SystemCollectionsGenericType::Comparer_1 | |
| SystemCollectionsGenericType::IEnumerable_1 | |
| SystemCollectionsGenericType::IList_1 | |
| SystemCollectionsGenericType::ICollection_1 | |
| SystemCollectionsGenericType::IEnumerator_1 | |
| SystemCollectionsGenericType::IReadOnlyList_1 | |
| SystemCollectionsGenericType::IReadOnlyCollection_1 | |
| SystemCollectionsGenericType::EqualityComparer_1 | |
| SystemCollectionsGenericType::List_1 | |
| SystemCollectionsGenericType::IDictionary_2 | |
| SystemCollectionsGenericType::Dictionary_2 | |
| SystemCollectionsGenericType::IReadOnlyDictionary_2 | |
| SystemCollectionsGenericType::KeyValuePair_2 | |
| SystemCollectionsGenericType::IAsyncEnumerable_1 | |
| SystemCollectionsGenericType::IAsyncEnumerator_1 |
| SystemCollectionsObjectModelType::Collection_1 | |
| SystemCollectionsObjectModelType::ReadOnlyCollection_1 |
| SystemCollectionsSpecializedType::INotifyCollectionChanged |
| SystemCollectionsType::Hashtable | |
| SystemCollectionsType::ArrayList | |
| SystemCollectionsType::IDictionary | |
| SystemCollectionsType::IComparer | |
| SystemCollectionsType::IEqualityComparer | |
| SystemCollectionsType::Queue | |
| SystemCollectionsType::Stack | |
| SystemCollectionsType::BitArray | |
| SystemCollectionsType::DictionaryEntry | |
| SystemCollectionsType::IEnumerator | |
| SystemCollectionsType::IEnumerable | |
| SystemCollectionsType::IList | |
| SystemCollectionsType::ICollection |
| SystemComponentModelType::DesignerSerializationVisibilityAttribute | |
| SystemComponentModelType::INotifyPropertyChanged | |
| SystemComponentModelType::EditorBrowsableAttribute | |
| SystemComponentModelType::EditorBrowsableState |
| SystemDiagnosticsType::Stopwatch | |
| SystemDiagnosticsType::Debug | |
| SystemDiagnosticsType::Trace | |
| SystemDiagnosticsType::ConditionalAttribute | |
| SystemDiagnosticsType::StackTrace | |
| SystemDiagnosticsType::StackFrame | |
| SystemDiagnosticsType::Process | |
| SystemDiagnosticsType::ProcessStartInfo | |
| SystemDiagnosticsType::DebuggerTypeProxyAttribute | |
| SystemDiagnosticsType::Debugger | |
| SystemDiagnosticsType::DebuggerDisplayAttribute | |
| SystemDiagnosticsType::DebuggerNonUserCodeAttribute | |
| SystemDiagnosticsType::DebuggerHiddenAttribute | |
| SystemDiagnosticsType::DebuggerBrowsableAttribute | |
| SystemDiagnosticsType::DebuggerStepThroughAttribute | |
| SystemDiagnosticsType::DebuggerBrowsableState | |
| SystemDiagnosticsType::DebuggableAttribute |
| SystemGlobalizationType::CultureInfo | |
| SystemGlobalizationType::NumberStyles | |
| SystemGlobalizationType::DateTimeStyles | |
| SystemGlobalizationType::NumberFormatInfo | |
| SystemGlobalizationType::DateTimeFormatInfo | |
| SystemGlobalizationType::CompareInfo | |
| SystemGlobalizationType::RegionInfo | |
| SystemGlobalizationType::TextInfo | |
| SystemGlobalizationType::Calendar |
| SystemIoType::Path | |
| SystemIoType::File | |
| SystemIoType::Directory | |
| SystemIoType::FileInfo | |
| SystemIoType::DirectoryInfo | |
| SystemIoType::Stream | |
| SystemIoType::MemoryStream | |
| SystemIoType::FileStream | |
| SystemIoType::StreamReader | |
| SystemIoType::StreamWriter | |
| SystemIoType::BinaryReader | |
| SystemIoType::BinaryWriter | |
| SystemIoType::TextReader | |
| SystemIoType::TextWriter | |
| SystemIoType::FileMode | |
| SystemIoType::FileAccess | |
| SystemIoType::FileShare | |
| SystemIoType::SeekOrigin | |
| SystemIoType::IOException | |
| SystemIoType::FileNotFoundException | |
| SystemIoType::DirectoryNotFoundException |
| SystemLinqExpressionsType::Expression | |
| SystemLinqExpressionsType::Expression_1 | |
| SystemLinqExpressionsType::ParameterExpression | |
| SystemLinqExpressionsType::ElementInit | |
| SystemLinqExpressionsType::MemberBinding | |
| SystemLinqExpressionsType::ExpressionType |
| SystemLinqType::Enumerable | |
| SystemLinqType::IQueryable | |
| SystemLinqType::IQueryable_1 | |
| SystemLinqType::SystemCore_EnumerableDebugView | |
| SystemLinqType::SystemCore_EnumerableDebugView_1 |
| SystemReflectionType::PropertyInfo | |
| SystemReflectionType::EventInfo | |
| SystemReflectionType::ParameterInfo | |
| SystemReflectionType::Module | |
| SystemReflectionType::AssemblyName | |
| SystemReflectionType::TypeInfo | |
| SystemReflectionType::CustomAttributeData | |
| SystemReflectionType::Pointer | |
| SystemReflectionType::BindingFlags | |
| SystemReflectionType::MethodAttributes | |
| SystemReflectionType::FieldAttributes | |
| SystemReflectionType::TypeAttributes | |
| SystemReflectionType::PropertyAttributes | |
| SystemReflectionType::ParameterAttributes | |
| SystemReflectionType::MethodImplAttributes | |
| SystemReflectionType::CallingConventions | |
| SystemReflectionType::MethodInfo | |
| SystemReflectionType::ConstructorInfo | |
| SystemReflectionType::MethodBase | |
| SystemReflectionType::FieldInfo | |
| SystemReflectionType::MemberInfo | |
| SystemReflectionType::Missing | |
| SystemReflectionType::AssemblyKeyFileAttribute | |
| SystemReflectionType::AssemblyKeyNameAttribute | |
| SystemReflectionType::DefaultMemberAttribute | |
| SystemReflectionType::Assembly |
| SystemRuntimeCompilerServicesType::MethodImplAttribute | |
| SystemRuntimeCompilerServicesType::MethodImplOptions | |
| SystemRuntimeCompilerServicesType::Unsafe | |
| SystemRuntimeCompilerServicesType::CallerMemberNameAttribute | |
| SystemRuntimeCompilerServicesType::CallerLineNumberAttribute | |
| SystemRuntimeCompilerServicesType::CallerFilePathAttribute | |
| SystemRuntimeCompilerServicesType::CallerArgumentExpressionAttribute | |
| SystemRuntimeCompilerServicesType::ModuleInitializerAttribute | |
| SystemRuntimeCompilerServicesType::SkipLocalsInitAttribute | |
| SystemRuntimeCompilerServicesType::StrongBox_1 | |
| SystemRuntimeCompilerServicesType::ConditionalWeakTable_2 | |
| SystemRuntimeCompilerServicesType::IsVolatile | |
| SystemRuntimeCompilerServicesType::FormattableStringFactory | |
| SystemRuntimeCompilerServicesType::RuntimeHelpers | |
| SystemRuntimeCompilerServicesType::DateTimeConstantAttribute | |
| SystemRuntimeCompilerServicesType::DecimalConstantAttribute | |
| SystemRuntimeCompilerServicesType::IUnknownConstantAttribute | |
| SystemRuntimeCompilerServicesType::IDispatchConstantAttribute | |
| SystemRuntimeCompilerServicesType::ExtensionAttribute | |
| SystemRuntimeCompilerServicesType::INotifyCompletion | |
| SystemRuntimeCompilerServicesType::InternalsVisibleToAttribute | |
| SystemRuntimeCompilerServicesType::CompilerGeneratedAttribute | |
| SystemRuntimeCompilerServicesType::AccessedThroughPropertyAttribute | |
| SystemRuntimeCompilerServicesType::CompilationRelaxationsAttribute | |
| SystemRuntimeCompilerServicesType::RuntimeCompatibilityAttribute | |
| SystemRuntimeCompilerServicesType::UnsafeValueTypeAttribute | |
| SystemRuntimeCompilerServicesType::FixedBufferAttribute | |
| SystemRuntimeCompilerServicesType::DynamicAttribute | |
| SystemRuntimeCompilerServicesType::CallSiteBinder | |
| SystemRuntimeCompilerServicesType::CallSite | |
| SystemRuntimeCompilerServicesType::CallSite_1 | |
| SystemRuntimeCompilerServicesType::ICriticalNotifyCompletion | |
| SystemRuntimeCompilerServicesType::IAsyncStateMachine | |
| SystemRuntimeCompilerServicesType::AsyncVoidMethodBuilder | |
| SystemRuntimeCompilerServicesType::AsyncTaskMethodBuilder | |
| SystemRuntimeCompilerServicesType::AsyncTaskMethodBuilder_1 | |
| SystemRuntimeCompilerServicesType::AsyncStateMachineAttribute | |
| SystemRuntimeCompilerServicesType::IteratorStateMachineAttribute | |
| SystemRuntimeCompilerServicesType::TupleElementNamesAttribute | |
| SystemRuntimeCompilerServicesType::ReferenceAssemblyAttribute | |
| SystemRuntimeCompilerServicesType::TypeForwardedToAttribute | |
| SystemRuntimeCompilerServicesType::IsReadOnlyAttribute | |
| SystemRuntimeCompilerServicesType::IsByRefLikeAttribute | |
| SystemRuntimeCompilerServicesType::AsyncIteratorMethodBuilder | |
| SystemRuntimeCompilerServicesType::AsyncIteratorStateMachineAttribute | |
| SystemRuntimeCompilerServicesType::NullableAttribute | |
| SystemRuntimeCompilerServicesType::IsUnmanagedAttribute | |
| SystemRuntimeCompilerServicesType::CallConvCdecl | |
| SystemRuntimeCompilerServicesType::CallConvStdcall | |
| SystemRuntimeCompilerServicesType::CallConvThiscall | |
| SystemRuntimeCompilerServicesType::CallConvFastcall | |
| SystemRuntimeCompilerServicesType::CallConvSuppressGCTransition | |
| SystemRuntimeCompilerServicesType::CallConvMemberFunction |
| SystemRuntimeExceptionServicesType::ExceptionDispatchInfo |
| SystemRuntimeInteropServicesType::StructLayoutAttribute | |
| SystemRuntimeInteropServicesType::UnknownWrapper | |
| SystemRuntimeInteropServicesType::DispatchWrapper | |
| SystemRuntimeInteropServicesType::CallingConvention | |
| SystemRuntimeInteropServicesType::ClassInterfaceAttribute | |
| SystemRuntimeInteropServicesType::ClassInterfaceType | |
| SystemRuntimeInteropServicesType::CoClassAttribute | |
| SystemRuntimeInteropServicesType::ComAwareEventInfo | |
| SystemRuntimeInteropServicesType::ComEventInterfaceAttribute | |
| SystemRuntimeInteropServicesType::ComInterfaceType | |
| SystemRuntimeInteropServicesType::ComSourceInterfacesAttribute | |
| SystemRuntimeInteropServicesType::ComVisibleAttribute | |
| SystemRuntimeInteropServicesType::DispIdAttribute | |
| SystemRuntimeInteropServicesType::GuidAttribute | |
| SystemRuntimeInteropServicesType::InterfaceTypeAttribute | |
| SystemRuntimeInteropServicesType::Marshal | |
| SystemRuntimeInteropServicesType::TypeIdentifierAttribute | |
| SystemRuntimeInteropServicesType::BestFitMappingAttribute | |
| SystemRuntimeInteropServicesType::DefaultParameterValueAttribute | |
| SystemRuntimeInteropServicesType::LCIDConversionAttribute | |
| SystemRuntimeInteropServicesType::UnmanagedFunctionPointerAttribute | |
| SystemRuntimeInteropServicesType::ComImportAttribute | |
| SystemRuntimeInteropServicesType::DllImportAttribute | |
| SystemRuntimeInteropServicesType::FieldOffsetAttribute | |
| SystemRuntimeInteropServicesType::InAttribute | |
| SystemRuntimeInteropServicesType::MarshalAsAttribute | |
| SystemRuntimeInteropServicesType::OptionalAttribute | |
| SystemRuntimeInteropServicesType::OutAttribute | |
| SystemRuntimeInteropServicesType::PreserveSigAttribute | |
| SystemRuntimeInteropServicesType::CharSet | |
| SystemRuntimeInteropServicesType::UnmanagedType | |
| SystemRuntimeInteropServicesType::VarEnum | |
| SystemRuntimeInteropServicesType::GCHandle | |
| SystemRuntimeInteropServicesType::GCHandleType | |
| SystemRuntimeInteropServicesType::UnmanagedCallersOnlyAttribute | |
| SystemRuntimeInteropServicesType::LayoutKind | |
| SystemRuntimeInteropServicesType::SafeHandle | |
| SystemRuntimeInteropServicesType::HandleRef | |
| SystemRuntimeInteropServicesType::NativeLibrary | |
| SystemRuntimeInteropServicesType::MemoryMarshal | |
| SystemRuntimeInteropServicesType::CollectionsMarshal | |
| SystemRuntimeInteropServicesType::NativeMemory | |
| SystemRuntimeInteropServicesType::RuntimeInformation | |
| SystemRuntimeInteropServicesType::OSPlatform | |
| SystemRuntimeInteropServicesType::Architecture | |
| SystemRuntimeInteropServicesType::ComWrappers |
| SystemRuntimeInteropServicesWindowsRuntimeType::EventRegistrationToken | |
| SystemRuntimeInteropServicesWindowsRuntimeType::EventRegistrationTokenTable_1 | |
| SystemRuntimeInteropServicesWindowsRuntimeType::WindowsRuntimeMarshal | |
| SystemRuntimeInteropServicesWindowsRuntimeType::RuntimeClass |
| SystemRuntimeType::GCLatencyMode |
| SystemSecurityPermissionsType::SecurityAction | |
| SystemSecurityPermissionsType::SecurityAttribute | |
| SystemSecurityPermissionsType::SecurityPermissionAttribute | |
| SystemSecurityPermissionsType::PermissionSetAttribute |
| SystemSecurityType::UnverifiableCodeAttribute |
| SystemTextType::Encoding | |
| SystemTextType::StringBuilder | |
| SystemTextType::Rune | |
| SystemTextType::UTF8Encoding | |
| SystemTextType::UnicodeEncoding | |
| SystemTextType::ASCIIEncoding | |
| SystemTextType::NormalizationForm |
| SystemThreadingTasksSourcesType::ManualResetValueTaskSourceCore_1 | |
| SystemThreadingTasksSourcesType::ValueTaskSourceStatus | |
| SystemThreadingTasksSourcesType::ValueTaskSourceOnCompletedFlags | |
| SystemThreadingTasksSourcesType::IValueTaskSource_1 | |
| SystemThreadingTasksSourcesType::IValueTaskSource |
| SystemThreadingTasksType::TaskCompletionSource | |
| SystemThreadingTasksType::TaskCompletionSource_1 | |
| SystemThreadingTasksType::TaskScheduler | |
| SystemThreadingTasksType::Parallel | |
| SystemThreadingTasksType::TaskFactory | |
| SystemThreadingTasksType::TaskStatus | |
| SystemThreadingTasksType::TaskCreationOptions | |
| SystemThreadingTasksType::TaskContinuationOptions | |
| SystemThreadingTasksType::Task | |
| SystemThreadingTasksType::Task_1 | |
| SystemThreadingTasksType::ValueTask_1 | |
| SystemThreadingTasksType::ValueTask |
| SystemThreadingType::Interlocked | |
| SystemThreadingType::Monitor | |
| SystemThreadingType::Thread | |
| SystemThreadingType::CancellationToken | |
| SystemThreadingType::CancellationTokenSource | |
| SystemThreadingType::SemaphoreSlim | |
| SystemThreadingType::ManualResetEventSlim | |
| SystemThreadingType::ManualResetEvent | |
| SystemThreadingType::AutoResetEvent | |
| SystemThreadingType::Mutex | |
| SystemThreadingType::Volatile | |
| SystemThreadingType::WaitHandle | |
| SystemThreadingType::ThreadPool | |
| SystemThreadingType::SynchronizationContext | |
| SystemThreadingType::ThreadStart | |
| SystemThreadingType::ParameterizedThreadStart | |
| SystemThreadingType::ReaderWriterLockSlim | |
| SystemThreadingType::EventWaitHandle |
| SystemType::Object | |
| SystemType::Enum | |
| SystemType::MulticastDelegate | |
| SystemType::Delegate | |
| SystemType::ValueType | |
| SystemType::Void | |
| SystemType::Boolean | |
| SystemType::Char | |
| SystemType::SByte | |
| SystemType::Byte | |
| SystemType::Int16 | |
| SystemType::UInt16 | |
| SystemType::Int32 | |
| SystemType::UInt32 | |
| SystemType::Int64 | |
| SystemType::UInt64 | |
| SystemType::Decimal | |
| SystemType::Single | |
| SystemType::Double | |
| SystemType::String | |
| SystemType::IntPtr | |
| SystemType::UIntPtr | |
| SystemType::Array | |
| SystemType::Nullable_1 | |
| SystemType::DateTime | |
| SystemType::IDisposable | |
| SystemType::TypedReference | |
| SystemType::ArgIterator | |
| SystemType::RuntimeArgumentHandle | |
| SystemType::RuntimeFieldHandle | |
| SystemType::RuntimeMethodHandle | |
| SystemType::RuntimeTypeHandle | |
| SystemType::IAsyncResult | |
| SystemType::AsyncCallback | |
| SystemType::Math | |
| SystemType::Attribute | |
| SystemType::CLSCompliantAttribute | |
| SystemType::Convert | |
| SystemType::Exception | |
| SystemType::FlagsAttribute | |
| SystemType::FormattableString | |
| SystemType::Guid | |
| SystemType::IFormattable | |
| SystemType::MarshalByRefObject | |
| SystemType::Type | |
| SystemType::Func_1 | |
| SystemType::Func_2 | |
| SystemType::Func_3 | |
| SystemType::Func_4 | |
| SystemType::Func_5 | |
| SystemType::Func_6 | |
| SystemType::Func_7 | |
| SystemType::Func_8 | |
| SystemType::Func_9 | |
| SystemType::Func_10 | |
| SystemType::Func_11 | |
| SystemType::Func_12 | |
| SystemType::Func_13 | |
| SystemType::Func_14 | |
| SystemType::Func_15 | |
| SystemType::Func_16 | |
| SystemType::Func_17 | |
| SystemType::Action | |
| SystemType::Action_1 | |
| SystemType::Action_2 | |
| SystemType::Action_3 | |
| SystemType::Action_4 | |
| SystemType::Action_5 | |
| SystemType::Action_6 | |
| SystemType::Action_7 | |
| SystemType::Action_8 | |
| SystemType::Action_9 | |
| SystemType::Action_10 | |
| SystemType::Action_11 | |
| SystemType::Action_12 | |
| SystemType::Action_13 | |
| SystemType::Action_14 | |
| SystemType::Action_15 | |
| SystemType::Action_16 | |
| SystemType::Activator | |
| SystemType::AttributeUsageAttribute | |
| SystemType::ParamArrayAttribute | |
| SystemType::NonSerializedAttribute | |
| SystemType::STAThreadAttribute | |
| SystemType::IEquatable_1 | |
| SystemType::NotSupportedException | |
| SystemType::Environment | |
| SystemType::IFormatProvider | |
| SystemType::ValueTuple_1 | |
| SystemType::ValueTuple_2 | |
| SystemType::ValueTuple_3 | |
| SystemType::ValueTuple_4 | |
| SystemType::ValueTuple_5 | |
| SystemType::ValueTuple_6 | |
| SystemType::ValueTuple_7 | |
| SystemType::ValueTuple_8 | |
| SystemType::AppDomain | |
| SystemType::ContextBoundObject | |
| SystemType::SerializableAttribute | |
| SystemType::RuntimeMethodHandleInternal | |
| SystemType::ByReference_1 | |
| SystemType::__ComObject | |
| SystemType::DBNull | |
| SystemType::ObsoleteAttribute | |
| SystemType::Span_1 | |
| SystemType::ReadOnlySpan_1 | |
| SystemType::Index | |
| SystemType::Range | |
| SystemType::IAsyncDisposable | |
| SystemType::Console | |
| SystemType::GC | |
| SystemType::GCCollectionMode | |
| SystemType::TimeSpan | |
| SystemType::DateTimeOffset | |
| SystemType::Random | |
| SystemType::Version | |
| SystemType::Uri | |
| SystemType::BitConverter | |
| SystemType::Buffer | |
| SystemType::MathF | |
| SystemType::HashCode | |
| SystemType::EventArgs | |
| SystemType::EventHandler | |
| SystemType::EventHandler_1 | |
| SystemType::IComparable | |
| SystemType::IComparable_1 | |
| SystemType::ICloneable | |
| SystemType::WeakReference | |
| SystemType::WeakReference_1 | |
| SystemType::Lazy_1 | |
| SystemType::Progress_1 | |
| SystemType::IProgress_1 | |
| SystemType::Comparison_1 | |
| SystemType::Predicate_1 | |
| SystemType::Converter_2 | |
| SystemType::StringComparison | |
| SystemType::StringSplitOptions | |
| SystemType::AttributeTargets | |
| SystemType::DateTimeKind | |
| SystemType::MidpointRounding | |
| SystemType::ArgumentException | |
| SystemType::ArgumentNullException | |
| SystemType::ArgumentOutOfRangeException | |
| SystemType::InvalidOperationException | |
| SystemType::NullReferenceException | |
| SystemType::IndexOutOfRangeException | |
| SystemType::NotImplementedException | |
| SystemType::FormatException | |
| SystemType::OverflowException | |
| SystemType::InvalidCastException | |
| SystemType::SystemException | |
| SystemType::AggregateException | |
| SystemType::ObjectDisposedException | |
| SystemType::TimeoutException | |
| SystemType::DivideByZeroException | |
| SystemType::ArithmeticException |
| SystemWindowsFormsType::Form | |
| SystemWindowsFormsType::Application |
| SystemXmlLinqType::Extensions | |
| SystemXmlLinqType::XAttribute | |
| SystemXmlLinqType::XCData | |
| SystemXmlLinqType::XComment | |
| SystemXmlLinqType::XContainer | |
| SystemXmlLinqType::XDeclaration | |
| SystemXmlLinqType::XDocument | |
| SystemXmlLinqType::XElement | |
| SystemXmlLinqType::XName | |
| SystemXmlLinqType::XNamespace | |
| SystemXmlLinqType::XObject | |
| SystemXmlLinqType::XProcessingInstruction |
An opaque value; see the functions that return it.
| flags | TypeAttributes | |
| name | str | |
| namespace | str | |
| extends | Option<TypeDefOrRef> | |
| fields | list<Entry> | |
| methods | list<Entry> | |
| properties | list<Entry> | |
| events | list<Entry> | |
| nested_types | list<Entry> | |
| generic_params | list<Entry> | |
| interfaces | list<InterfaceImpl> | |
| method_impls | list<MethodImpl> | |
| class_layout | Option<ClassLayout> | |
| security | list<DeclSecurity> | |
| custom_attributes | list<CustomAttribute> | |
| declaring_type | WeakEntry |
A type defined in a module.
type_def_entry.base_type() -> Option<BaseTypeRef>The direct base type, if any.
type_def_entry.custom_attributes() -> list<CustomAttribute>The type's custom attributes.
type_def_entry.enum_underlying_field() -> Option<FieldEntry>For an enum, the instance field (value__) whose type is the enum's underlying type.
type_def_entry.events() -> list<EventEntry>The type's events.
type_def_entry.fields() -> list<FieldEntry>The type's fields.
type_def_entry.find_field(name: str) -> Option<FieldEntry>The field named name.
type_def_entry.find_method(name: str) -> Option<MethodEntry>The first method named name.
Whether this type's namespace and name are name.
type_def_entry.is_delegate() -> boolWhether it extends System.MulticastDelegate.
type_def_entry.is_enum() -> boolWhether it extends System.Enum.
type_def_entry.is_interface() -> boolWhether it is an interface.
type_def_entry.is_nested() -> boolWhether it is declared inside another type.
type_def_entry.is_static() -> boolWhether it is a static class: abstract and sealed, and not an interface.
type_def_entry.is_value_type() -> boolWhether it is a struct or enum.
type_def_entry.is_visible() -> boolWhether it is public, and if nested, only inside other visible types.
Which kind of type it is: class, struct (value type), interface, enum or delegate.
type_def_entry.methods() -> list<MethodEntry>The type's methods.
type_def_entry.nested_types() -> list<TypeDefEntry>The types declared directly inside this one.
type_def_entry.properties() -> list<PropertyEntry>The type's properties.
The namespace of the outermost declaring type, for nested types.
type_def_entry.with_nested() -> list<TypeDefEntry>This type and every type nested in it, depth first.
| TypeExtMethod::GetTypeStatic | |
| TypeExtMethod::GetMethodBF | |
| TypeExtMethod::GetMethodsBF |
The broad kind of a [`TypeDef`], named with its C# keyword.
| TypeKind::Class | |
| TypeKind::ValueType | |
| TypeKind::Interface | |
| TypeKind::Enum | |
| TypeKind::Delegate |
| TypeMethod::GetFullName | |
| TypeMethod::GetName | |
| TypeMethod::GetMethodStr |
| scope | Option<ResolutionScope> | `None` means the type is found through the `ExportedType` table. |
| name | str | |
| namespace | str | |
| custom_attributes | list<CustomAttribute> |
An opaque value; see the functions that return it.
| signature | TypeSig | |
| custom_attributes | list<CustomAttribute> |
A non-owning [`Entry`] handle, used for back references like a method's declaring type.
| 0 | EntryInner |
A well-known .NET type, grouped by namespace. `from_full_name`, `full_name` and `name` strip the generic arity suffix (e.g. `Nullable\`1` -> `Nullable`).
| WellKnown::System(SystemType) | |
| WellKnown::SystemRuntimeCompilerServices(SystemRuntimeCompilerServicesType) | |
| WellKnown::SystemCollectionsGeneric(SystemCollectionsGenericType) | |
| WellKnown::SystemCollections(SystemCollectionsType) | |
| WellKnown::SystemCollectionsObjectModel(SystemCollectionsObjectModelType) | |
| WellKnown::SystemCollectionsSpecialized(SystemCollectionsSpecializedType) | |
| WellKnown::SystemReflection(SystemReflectionType) | |
| WellKnown::SystemDiagnostics(SystemDiagnosticsType) | |
| WellKnown::SystemRuntimeExceptionServices(SystemRuntimeExceptionServicesType) | |
| WellKnown::SystemRuntimeInteropServices(SystemRuntimeInteropServicesType) | |
| WellKnown::SystemThreadingTasks(SystemThreadingTasksType) | |
| WellKnown::SystemThreading(SystemThreadingType) | |
| WellKnown::MicrosoftCSharpRuntimeBinder(MicrosoftCSharpRuntimeBinderType) | |
| WellKnown::MicrosoftVisualBasic(MicrosoftVisualBasicType) | |
| WellKnown::MicrosoftVisualBasicCompilerServices(MicrosoftVisualBasicCompilerServicesType) | |
| WellKnown::MicrosoftVisualBasicApplicationServices(MicrosoftVisualBasicApplicationServicesType) | |
| WellKnown::SystemRuntimeInteropServicesWindowsRuntime(SystemRuntimeInteropServicesWindowsRuntimeType) | |
| WellKnown::WindowsFoundation(WindowsFoundationType) | |
| WellKnown::SystemComponentModel(SystemComponentModelType) | |
| WellKnown::SystemLinq(SystemLinqType) | |
| WellKnown::SystemLinqExpressions(SystemLinqExpressionsType) | |
| WellKnown::SystemXmlLinq(SystemXmlLinqType) | |
| WellKnown::SystemSecurity(SystemSecurityType) | |
| WellKnown::SystemSecurityPermissions(SystemSecurityPermissionsType) | |
| WellKnown::SystemWindowsForms(SystemWindowsFormsType) | |
| WellKnown::SystemRuntime(SystemRuntimeType) | |
| WellKnown::SystemText(SystemTextType) | |
| WellKnown::SystemThreadingTasksSources(SystemThreadingTasksSourcesType) | |
| WellKnown::SystemIo(SystemIoType) | |
| WellKnown::SystemGlobalization(SystemGlobalizationType) |
A common BCL method, keyed by declaring type. Each variant wraps a per-type method sub-enum, e.g. `WellKnownMethod::Console(ConsoleMethod::WriteLineStr)`.
| WellKnownMethod::Console(ConsoleMethod) | |
| WellKnownMethod::Object(ObjectMethod) | |
| WellKnownMethod::Type(TypeMethod) | |
| WellKnownMethod::String(StringMethod) | |
| WellKnownMethod::StringBuilder(StringBuilderMethod) | |
| WellKnownMethod::Math(MathMethod) | |
| WellKnownMethod::Convert(ConvertMethod) | |
| WellKnownMethod::Environment(EnvironmentMethod) | |
| WellKnownMethod::Gc(GcMethod) | |
| WellKnownMethod::Marshal(MarshalMethod) | |
| WellKnownMethod::Array(ArrayMethod) | |
| WellKnownMethod::Exception(ExceptionMethod) | |
| WellKnownMethod::Assembly(AssemblyMethod) | |
| WellKnownMethod::TypeExt(TypeExtMethod) | |
| WellKnownMethod::MethodBase(MethodBaseMethod) | |
| WellKnownMethod::RuntimeMethodHandle(RuntimeMethodHandleMethod) | |
| WellKnownMethod::RuntimeHelpers(RuntimeHelpersMethod) | |
| WellKnownMethod::AppDomain(AppDomainMethod) | |
| WellKnownMethod::AssemblyName(AssemblyNameMethod) | |
| WellKnownMethod::MemberInfo(MemberInfoMethod) | |
| WellKnownMethod::StringExt(StringExtMethod) | |
| WellKnownMethod::ArrayList(ArrayListMethod) | |
| WellKnownMethod::IEnumerable(IEnumerableMethod) | |
| WellKnownMethod::IEnumerator(IEnumeratorMethod) |
A well-known .NET assembly a module references. Carries the stable assembly name and public-key token; the version is version-dependent and supplied separately (see [`AssemblyName`] impls, e.g. `(WellKnownModule, Version)`).
| WellKnownModule::Mscorlib | |
| WellKnownModule::SystemPrivateCoreLib | |
| WellKnownModule::SystemRuntime | |
| WellKnownModule::NetStandard | |
| WellKnownModule::SystemConsole | |
| WellKnownModule::SystemRuntimeExtensions | |
| WellKnownModule::SystemCollections | |
| WellKnownModule::SystemObjectModel | |
| WellKnownModule::SystemLinq | |
| WellKnownModule::SystemLinqExpressions | |
| WellKnownModule::SystemRuntimeInteropServices | |
| WellKnownModule::SystemThreadingTasks | |
| WellKnownModule::SystemThreading | |
| WellKnownModule::SystemComponentModelPrimitives | |
| WellKnownModule::SystemXmlLinq | |
| WellKnownModule::MicrosoftCSharp | |
| WellKnownModule::MicrosoftVisualBasic | |
| WellKnownModule::SystemWindowsForms |
| WindowsFoundationType::IAsyncAction | |
| WindowsFoundationType::IAsyncActionWithProgress_1 | |
| WindowsFoundationType::IAsyncOperation_1 | |
| WindowsFoundationType::IAsyncOperationWithProgress_2 |
> type aliases
Names these signatures use for a value of any of several types.
typeAnyWellKnownMethod = WellKnownMethod | ConsoleMethod | ObjectMethod | TypeMethod | StringMethod | StringBuilderMethod | MathMethod | ConvertMethod | EnvironmentMethod | GcMethod | MarshalMethod | ArrayMethod | ExceptionMethod | AssemblyMethod | TypeExtMethod | MethodBaseMethod | RuntimeMethodHandleMethod | RuntimeHelpersMethod | AppDomainMethod | AssemblyNameMethod | MemberInfoMethod | StringExtMethod | ArrayListMethod | IEnumerableMethod | IEnumeratorMethodtypeAssemblyName = WellKnownModule | str | (WellKnownModule, (u16, u16, u16, u16)) | (str, (u16, u16, u16, u16))typeTypeName = WellKnown | SystemType | (str, str) | str> examples
use std::io;
use std::re::dotnet;
fn main() -> Result<(), str> {
let module = dotnet::open("Game.dll")?;
for ty in module.all_types() {
io::println("{} {}", ty.kind(), ty.full_name());
for method in ty.methods() {
let flags = dotnet::method_flags_names(method.flags());
io::println(" {} {}", method.name(), flags);
}
}
Ok(())
}use std::re::dotnet;
use std::re::dotnet::{ConsoleMethod, WellKnownModule};
fn main() -> Result<(), str> {
let sig = dotnet::sig;
let module = dotnet::new("Hello", "console");
module.add_assembly_ref(WellKnownModule::SystemConsole);
let write_line = module.import_well_known_method(ConsoleMethod::WriteLineStr)?;
let body = {
let e = dotnet::il::emitter();
e.ldstr("Hello from Xur!");
e.call(write_line);
e.ldc_i4(0);
e.ret();
e.finish()
};
let main_sig = sig::method_static(sig::int32(), [sig::sz_array(sig::string())]);
let main = dotnet::public_static_method("Main", main_sig, body);
let program = dotnet::static_class(module, "Hello", "Program");
let entry = dotnet::add_method(program, main);
module.add_type(program);
module.set_entry_point(entry);
module.write_to_path("Hello.dll")?;
Ok(())
}