.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
675 B

using System;
using System.Runtime.CompilerServices;
[assembly: Extension]
namespace ICSharpCode.Decompiler.Tests.TestCases.Ugly
{
[Extension]
internal static class NoExtensionMethods
{
[Extension]
internal unsafe static Func<T> AsFunc<T>(T value) where T : class
{
return new Func<T>(value, (nint)(delegate*<T, T>)(&Return));
}
[Extension]
private static T Return<T>(T value)
{
return value;
}
internal static Func<int, int> ExtensionMethodAsStaticFunc()
{
return Return;
}
internal unsafe static Func<object> ExtensionMethodBoundToNull()
{
return new Func<object>(null, (nint)(delegate*<object, object>)(&Return));
}
}
}