Skip to content

Commit

Permalink
Revert "编写为了博客展示的代码"
Browse files Browse the repository at this point in the history
This reverts commit 01aeafe.
  • Loading branch information
lindexi committed Oct 21, 2023
1 parent ae076c8 commit 77c2a5c
Showing 1 changed file with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ static void Main(string[] args)
}
}

[dotnetCampus.Telescope.TelescopeExportAttribute()]
private static partial IEnumerable<(Type type, FooAttribute attribute, Func<Base> creator)> ExportFooEnumerable();
[dotnetCampus.Telescope.TelescopeExportAttribute(IncludeReferences = true)]
private static partial IEnumerable<(Type, F1Attribute xx, Func<DemoLib1.F1> xxx)> ExportFooEnumerable();

[dotnetCampus.Telescope.TelescopeExportAttribute(IncludeReferences = true)]
private partial IEnumerable<(Type, Func<DemoLib1.F1> xxx)> ExportF1Enumerable();
Expand All @@ -36,13 +36,13 @@ public class CurrentFoo : DemoLib1.F1
{
}

[FooAttribute]
class F1 : Base
[Foo(0, FooEnum.N1, typeof(Foo), null)]
abstract class F1 : Base
{
}

[FooAttribute]
class F2 : Base
[Foo(1ul, FooEnum.N2, typeof(Base), null, Number2 = 2L, Type2 = typeof(Foo), FooEnum2 = FooEnum.N1, Type3 = null)]
class Foo : Base
{
}

Expand All @@ -52,7 +52,23 @@ class Base

class FooAttribute : Attribute
{

public FooAttribute(ulong number1, FooEnum fooEnum, Type? type1, Type? type3)
{
Number1 = number1;
FooEnum1 = fooEnum;
Type1 = type1;
}

public ulong Number1 { get; set; }
public long Number2 { get; set; }

public FooEnum FooEnum1 { get; set; }
public FooEnum FooEnum2 { get; set; }
public FooEnum FooEnum3 { get; set; }

public Type? Type1 { get; set; }
public Type? Type2 { get; set; }
public Type? Type3 { get; set; }
}

public enum FooEnum
Expand Down

0 comments on commit 77c2a5c

Please sign in to comment.