Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
/ FasterReflection Public archive

Utilizes System.Reflection.Metadata to read type information very fast and without locking assembly files.

License

Notifications You must be signed in to change notification settings

aelij/FasterReflection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FasterReflection

Utilizes System.Reflection.Metadata to read type information very fast and without locking assembly files.

NuGet

Install-Package FasterReflection

Example

// type defined in MyAssembly.dll
public class MyType { }

var builder = new ReflectionMetadataBuilder();
builder.AddAssembly("MyAssembly.dll");
builder.AddReferenceOnlyAssemblyByType<object>(); // adds the corlib
var result = builder.Build();
var myType = result.FindTypesByName("MyType").First();

Console.WriteLine(myType.BaseType.FullName);          // 'System.Object'
Console.WriteLine(myType.IsPublic);                   // 'True'
Console.WriteLine(myType.HasNonDefaultConstructors);  // 'False'
Console.WriteLine(myType.GenericArgumentCount);       // '0'

About

Utilizes System.Reflection.Metadata to read type information very fast and without locking assembly files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages