a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
31 lines
529 B
C#
31 lines
529 B
C#
|
|
|
|
using System;
|
|
using System.Reflection;
|
|
|
|
public interface IA
|
|
{
|
|
void Foo (IA self);
|
|
}
|
|
|
|
public static class C
|
|
{
|
|
public static TAttribute GetCustomAttribute<TAttribute> (this ICustomAttributeProvider self)
|
|
{
|
|
var attributes = self.GetCustomAttributes<TAttribute> ();
|
|
// if (attributes == null || attributes.Length == 0)
|
|
// return null;
|
|
|
|
return attributes [0];
|
|
}
|
|
|
|
public static TAttribute [] GetCustomAttributes<TAttribute> (this ICustomAttributeProvider self)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public static void Main ()
|
|
{
|
|
}
|
|
}
|