fasterflect icon indicating copy to clipboard operation
fasterflect copied to clipboard

.NET Reflection Made Fast and Simple ⛺

Results 19 fasterflect issues
Sort by recently updated
recently updated
newest added

How does this work with .net 7 aot?

Hello, please have a look at this fiddle: https://dotnetfiddle.net/NlY70e `Dictionary` is the concrete type. `IDictionary` is the closed generic type. `IDictionary` is the open generic type (generic type definition). Checking...

I need modify/extend objects at runtime. For example, I want to extend an Order object returned by an API, so that the serialized JSON response would go from: ``` {...

``` public class Test { public static async Task Add(string name) { await Task.Delay(1000); return "hello" + name; } public static async Task Count() { await Task.Delay(1000); return 1; }...

Hi, The following test fails: public class GenericTest { static string Foo() => typeof(T).FullName; [Test] public void Generic_type_params_respected() { MethodInfo x = typeof(GenericTest).GetMethod(nameof(Foo), BindingFlags.Static|BindingFlags.NonPublic); var gen1 = x.MakeGenericMethod(typeof(int)); var gen2...

fasterflect with .NET : Dictionary not working with .NET6 for Deepclone Whenever you try to deepclone disctionary object , It thows error "Constructor does not exist'" e.g. : var dictionary...

I created a MethodInvoker for DateTime.ToString(). When I call this as Invoker(DateTime.Now, null), I get this exception: ``` System.InvalidCastException: 'Unable to cast object of type 'System.DateTime' to type 'Fasterflect.Emitter.ValueTypeHolder'.' ```...

Hi, based on the docs I don't think there is direct support for this case so: what would be the best way to to approach the problem of setting or...

I have a class, with a instance field of type IList, I set that property from inside the constructor using the "public static IList Properties(this Type type, params string[] names);"...

The relevant code is in MemberGetEmitter (and possibly elsewhere in the codebase): ``` if (fieldInfo.DeclaringType.IsEnum) this.Generator.ldc_i4((int) fieldInfo.GetValue((object) fieldInfo.DeclaringType)).boxIfValueType(fieldInfo.FieldType); else this.Generator.ldfld(fieldInfo.IsStatic, fieldInfo).boxIfValueType(fieldInfo.FieldType); ``` A little known fact of C# is that...