diff --git a/src/TelescopeSourceGenerator/Demo/TelescopeSourceGeneratorDemo/Program.cs b/src/TelescopeSourceGenerator/Demo/TelescopeSourceGeneratorDemo/Program.cs index d854660..8821f3b 100644 --- a/src/TelescopeSourceGenerator/Demo/TelescopeSourceGeneratorDemo/Program.cs +++ b/src/TelescopeSourceGenerator/Demo/TelescopeSourceGeneratorDemo/Program.cs @@ -24,8 +24,8 @@ static void Main(string[] args) } } - [dotnetCampus.Telescope.TelescopeExportAttribute()] - private static partial IEnumerable<(Type type, FooAttribute attribute, Func creator)> ExportFooEnumerable(); + [dotnetCampus.Telescope.TelescopeExportAttribute(IncludeReferences = true)] + private static partial IEnumerable<(Type, F1Attribute xx, Func xxx)> ExportFooEnumerable(); [dotnetCampus.Telescope.TelescopeExportAttribute(IncludeReferences = true)] private partial IEnumerable<(Type, Func xxx)> ExportF1Enumerable(); @@ -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 { } @@ -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