diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/A_ChildBaseFullyQualified58F37FBE84.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/A_ChildBaseFullyQualified58F37FBE84.g.cs index 8b389c8..214a91a 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/A_ChildBaseFullyQualified58F37FBE84.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/A_ChildBaseFullyQualified58F37FBE84.g.cs @@ -42,7 +42,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified requires init args."); return new ChildBaseFullyQualified() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child.g.cs index ae4308f..9394ad2 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child.g.cs @@ -43,7 +43,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Child requires init args."); return new Child() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child2.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child2.g.cs index 84ed8c4..7c5fc64 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child2.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/AliasedStuff_Nested_Child2.g.cs @@ -43,7 +43,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Child2 requires init args."); return new Child2() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/B_ChildBaseFullyQualifiedF9E7B51DD8.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/B_ChildBaseFullyQualifiedF9E7B51DD8.g.cs index 47371bc..0c9e38c 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/B_ChildBaseFullyQualifiedF9E7B51DD8.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/B_ChildBaseFullyQualifiedF9E7B51DD8.g.cs @@ -43,7 +43,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified requires init args."); return new ChildBaseFullyQualified() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs index b2a3745..1f1fdef 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_A_BaseClass.g.cs @@ -23,7 +23,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Name", IsInit: true, IsRequired: true, - Getter: (object obj) => ((BaseClass)obj).Name, + Getter: static (object obj) => ((BaseClass)obj).Name, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -57,7 +57,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing BaseClass requires init args."); return new BaseClass() { - Name = args.ContainsKey("Name") ? (string)args["Name"] : default! + Name = args.ContainsKey("Name") ? (string)args["Name"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_B_Child.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_B_Child.g.cs index e4fdb82..14f02bf 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_B_Child.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/BaseClasses_B_Child.g.cs @@ -42,7 +42,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Child requires init args."); return new Child() { - Name = args.ContainsKey("Name") ? (string)args["Name"] : default! + Name = args.ContainsKey("Name") ? (string)args["Name"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/C_ChildBaseFullyQualifiedD92201992B.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/C_ChildBaseFullyQualifiedD92201992B.g.cs index 2bd2a62..6d4bf16 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/C_ChildBaseFullyQualifiedD92201992B.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/C_ChildBaseFullyQualifiedD92201992B.g.cs @@ -44,7 +44,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified requires init args."); return new ChildBaseFullyQualified() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/StaticUsings_ChildWithStaticBaseRef.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/StaticUsings_ChildWithStaticBaseRef.g.cs index 051fc3f..3d40e70 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/StaticUsings_ChildWithStaticBaseRef.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/StaticUsings_ChildWithStaticBaseRef.g.cs @@ -42,7 +42,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildWithStaticBaseRef requires init args."); return new ChildWithStaticBaseRef() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs index 01b4d08..2dfa6e3 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TestCases_SetOnlyPropertyE303C8557E.g.cs @@ -22,7 +22,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { IsInit: false, IsRequired: false, Getter: null, - Setter: (object obj, object? value) => ((SetOnlyProperty)obj).Value = (string)value!, + Setter: static (object obj, object? value) => ((SetOnlyProperty)obj).Value = (string)value!, GenericType: new GenericType( OpenType: typeof(string), ClosedType: typeof(string), diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs index 66fb535..8b08bcc 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TestCases_BaseModel6634CD33B5.g.cs @@ -24,8 +24,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Name", IsInit: false, IsRequired: false, - Getter: (object obj) => ((BaseModel)obj).Name, - Setter: (object obj, object? value) => ((BaseModel)obj).Name = (string)value!, + Getter: static (object obj) => ((BaseModel)obj).Name, + Setter: static (object obj, object? value) => ((BaseModel)obj).Name = (string)value!, GenericType: new GenericType( OpenType: typeof(string), ClosedType: typeof(string), diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs index 17cc4da..b2cadc3 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs @@ -4,77 +4,77 @@ public partial class TypeRegistry : Chickensoft.Introspection.ITypeRegistry { public static Chickensoft.Introspection.ITypeRegistry Instance { get; } = new TypeRegistry(); public System.Collections.Generic.IReadOnlyDictionary VisibleTypes { get; } = new System.Collections.Generic.Dictionary() { - [typeof(AliasedStuff.Nested.Child)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child", (r) => r.Receive(), () => System.Activator.CreateInstance(), new AliasedStuff.Nested.Child.MetatypeMetadata(), 1), - [typeof(AliasedStuff.Nested.Child2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child2", (r) => r.Receive(), () => System.Activator.CreateInstance(), new AliasedStuff.Nested.Child2.MetatypeMetadata(), 1), - [typeof(AliasedStuff.Nested.DirectChild)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("DirectChild", (r) => r.Receive(), () => System.Activator.CreateInstance(), new AliasedStuff.Nested.DirectChild.MetatypeMetadata(), 1), - [typeof(AliasedStuff.Nested.ExtendsTypeFromSomewhereElse)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ExtendsTypeFromSomewhereElse", (r) => r.Receive(), () => System.Activator.CreateInstance(), new AliasedStuff.Nested.ExtendsTypeFromSomewhereElse.MetatypeMetadata(), 1), - [typeof(AlternativeNamespace.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", (r) => r.Receive(), () => System.Activator.CreateInstance(), new AlternativeNamespace.ChildBaseFullyQualified.MetatypeMetadata(), 1), - [typeof(AlternativeNamespace.ChildBaseNotFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseNotFullyQualified", (r) => r.Receive(), () => System.Activator.CreateInstance(), new AlternativeNamespace.ChildBaseNotFullyQualified.MetatypeMetadata(), 1), - [typeof(BaseClasses.A.B.DeeplyNamespaced.Container)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Container", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(BaseClasses.A.B.DeeplyNamespaced.Container.Container2)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Container2", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(BaseClasses.A.B.DeeplyNamespaced.Container.Container2.DeeplyNestedBaseClass)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("DeeplyNestedBaseClass", (r) => r.Receive(), () => System.Activator.CreateInstance(), new BaseClasses.A.B.DeeplyNamespaced.Container.Container2.DeeplyNestedBaseClass.MetatypeMetadata(), 1), - [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Child)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child", (r) => r.Receive(), () => System.Activator.CreateInstance(), new BaseClasses.A.B.UsingDeeplyNamespaced.Child.MetatypeMetadata(), 1), - [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Group1)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Group1", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Group1.Group2)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Group2", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Group1.Group2.Child)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Child", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.SomeChild)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("SomeChild", (r) => r.Receive(), () => System.Activator.CreateInstance(), new BaseClasses.A.B.UsingDeeplyNamespaced.SomeChild.MetatypeMetadata(), 1), - [typeof(BaseClasses.A.BaseClass)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("BaseClass", (r) => r.Receive(), () => System.Activator.CreateInstance(), new BaseClasses.A.BaseClass.MetatypeMetadata(), 1), - [typeof(BaseClasses.B.Child)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child", (r) => r.Receive(), () => System.Activator.CreateInstance(), new BaseClasses.B.Child.MetatypeMetadata(), 1), - [typeof(Chickensoft.GeneratorTester.GeneratorOutput)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GeneratorOutput", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.BaseTypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("BaseTypeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.IntrospectionGeneratorTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("IntrospectionGeneratorTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredAttributeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredPropertyTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredPropertyTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredTypeRegistryTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredTypeRegistryTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredTypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredTypeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.GenericTypeNodeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GenericTypeNodeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.ScopeTreeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ScopeTreeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.TypeGeneratorTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGeneratorTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.TypeLocationTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeLocationTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.TypeReferenceTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeReferenceTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Models.UsingDirectiveTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("UsingDirectiveTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.NameOfIdTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("NameOfIdTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.NoIdTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("NoIdTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.AbstractType)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("AbstractType", (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.AbstractType.MetatypeMetadata()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.AbstractTypeWithVersionIsBad)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("AbstractTypeWithVersionIsBad", (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.AbstractTypeWithVersionIsBad.MetatypeMetadata()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.AttributesWithNamedArgs)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("AttributesWithNamedArgs", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.AttributesWithNamedArgs.MetatypeMetadata(), "attributes_with_named_args", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.BaseModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("BaseModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.BaseModel.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.Collections)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Collections", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.Collections.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildOne)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("ConcreteChildOne", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildOne.MetatypeMetadata(), "concrete_child_one", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildTwo)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("ConcreteChildTwo", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildTwo.MetatypeMetadata(), "concrete_child_two", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.DerivedModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("DerivedModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.DerivedModel.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.InitArgsModel)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("InitArgsModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.InitArgsModel.MetatypeMetadata(), "init_args_model", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.JunkAttribute)] = new Chickensoft.Introspection.ConcreteTypeMetadata("JunkAttribute", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.MyContainerClass)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MyContainerClass", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.MyContainerClass.MyModel)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("MyModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.MyContainerClass.MyModel.MetatypeMetadata(), "my_model", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.MyType)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("MyType", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.MyType.MetatypeMetadata(), "my_type", 1), + [typeof(AliasedStuff.Nested.Child)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new AliasedStuff.Nested.Child.MetatypeMetadata(), 1), + [typeof(AliasedStuff.Nested.Child2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child2", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new AliasedStuff.Nested.Child2.MetatypeMetadata(), 1), + [typeof(AliasedStuff.Nested.DirectChild)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("DirectChild", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new AliasedStuff.Nested.DirectChild.MetatypeMetadata(), 1), + [typeof(AliasedStuff.Nested.ExtendsTypeFromSomewhereElse)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ExtendsTypeFromSomewhereElse", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new AliasedStuff.Nested.ExtendsTypeFromSomewhereElse.MetatypeMetadata(), 1), + [typeof(AlternativeNamespace.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new AlternativeNamespace.ChildBaseFullyQualified.MetatypeMetadata(), 1), + [typeof(AlternativeNamespace.ChildBaseNotFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseNotFullyQualified", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new AlternativeNamespace.ChildBaseNotFullyQualified.MetatypeMetadata(), 1), + [typeof(BaseClasses.A.B.DeeplyNamespaced.Container)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Container", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(BaseClasses.A.B.DeeplyNamespaced.Container.Container2)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Container2", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(BaseClasses.A.B.DeeplyNamespaced.Container.Container2.DeeplyNestedBaseClass)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("DeeplyNestedBaseClass", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new BaseClasses.A.B.DeeplyNamespaced.Container.Container2.DeeplyNestedBaseClass.MetatypeMetadata(), 1), + [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Child)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new BaseClasses.A.B.UsingDeeplyNamespaced.Child.MetatypeMetadata(), 1), + [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Group1)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Group1", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Group1.Group2)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Group2", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.Group1.Group2.Child)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Child", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(BaseClasses.A.B.UsingDeeplyNamespaced.SomeChild)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("SomeChild", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new BaseClasses.A.B.UsingDeeplyNamespaced.SomeChild.MetatypeMetadata(), 1), + [typeof(BaseClasses.A.BaseClass)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("BaseClass", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new BaseClasses.A.BaseClass.MetatypeMetadata(), 1), + [typeof(BaseClasses.B.Child)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Child", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new BaseClasses.B.Child.MetatypeMetadata(), 1), + [typeof(Chickensoft.GeneratorTester.GeneratorOutput)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GeneratorOutput", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.BaseTypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("BaseTypeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.IntrospectionGeneratorTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("IntrospectionGeneratorTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredAttributeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredPropertyTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredPropertyTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredTypeRegistryTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredTypeRegistryTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.DeclaredTypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("DeclaredTypeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.GenericTypeNodeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GenericTypeNodeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.ScopeTreeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ScopeTreeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.TypeGeneratorTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGeneratorTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.TypeLocationTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeLocationTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.TypeReferenceTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeReferenceTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Models.UsingDirectiveTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("UsingDirectiveTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.NameOfIdTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("NameOfIdTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.NoIdTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("NoIdTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.AbstractType)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("AbstractType", static (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.AbstractType.MetatypeMetadata()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.AbstractTypeWithVersionIsBad)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("AbstractTypeWithVersionIsBad", static (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.AbstractTypeWithVersionIsBad.MetatypeMetadata()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.AttributesWithNamedArgs)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("AttributesWithNamedArgs", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.AttributesWithNamedArgs.MetatypeMetadata(), "attributes_with_named_args", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.BaseModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("BaseModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.BaseModel.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.Collections)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Collections", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.Collections.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildOne)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("ConcreteChildOne", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildOne.MetatypeMetadata(), "concrete_child_one", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildTwo)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("ConcreteChildTwo", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.ConcreteChildTwo.MetatypeMetadata(), "concrete_child_two", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.DerivedModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("DerivedModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.DerivedModel.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.InitArgsModel)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("InitArgsModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.InitArgsModel.MetatypeMetadata(), "init_args_model", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.JunkAttribute)] = new Chickensoft.Introspection.ConcreteTypeMetadata("JunkAttribute", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.MyContainerClass)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MyContainerClass", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.MyContainerClass.MyModel)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("MyModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.MyContainerClass.MyModel.MetatypeMetadata(), "my_model", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.MyType)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("MyType", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.MyType.MetatypeMetadata(), "my_type", 1), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.MyType<>)] = new Chickensoft.Introspection.TypeMetadata("MyType"), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.NameOfId)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("NameOfId", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.NameOfId.MetatypeMetadata(), "NameOfId", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.NoId)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("NoId", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.NoId.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.One.Two)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Two", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.One.Two.IThree.Four)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Four", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.One.Two.IThree.Four.NestedType)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("NestedType", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.One.Two.IThree.Four.NestedType.MetatypeMetadata(), "nested_type", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.Outer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Outer", (r) => r.Receive(), () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.NameOfId)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("NameOfId", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.NameOfId.MetatypeMetadata(), "NameOfId", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.NoId)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("NoId", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.NoId.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.One.Two)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Two", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.One.Two.IThree.Four)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Four", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.One.Two.IThree.Four.NestedType)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("NestedType", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.One.Two.IThree.Four.NestedType.MetatypeMetadata(), "nested_type", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.Outer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Outer", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.Outer.Inner<>)] = new Chickensoft.Introspection.TypeMetadata("Inner"), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.Outer.Inner<>.NotVisibleFromGlobalScope)] = new Chickensoft.Introspection.TypeMetadata("NotVisibleFromGlobalScope"), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("OuterContainer", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MidContainer", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AInnerContainer", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.AOtherModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("AOtherModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.AOtherModel.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.ZMyModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ZMyModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.ZMyModel.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.ZOtherContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ZOtherContainer", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.PartialModel)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("PartialModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.PartialModel.MetatypeMetadata(), "multiple_partial_definitions", 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.PropertyModel)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("PropertyModel", (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.PropertyModel.MetatypeMetadata()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.SetOnlyProperty)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("SetOnlyProperty", (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.SetOnlyProperty.MetatypeMetadata()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.SomeType)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("SomeType", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.SomeType.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.StaticPropertyIsSkipped)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("StaticPropertyIsSkipped", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.StaticPropertyIsSkipped.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A)] = new Chickensoft.Introspection.ConcreteTypeMetadata("A", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AA)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AA", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AA.AAA)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AAA", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AB)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AB", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AC)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AC", (r) => r.Receive(), () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("OuterContainer", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MidContainer", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AInnerContainer", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.AOtherModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("AOtherModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.AOtherModel.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.ZMyModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ZMyModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.AInnerContainer.ZMyModel.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.OuterContainer.MidContainer.ZOtherContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ZOtherContainer", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.PartialModel)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("PartialModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.PartialModel.MetatypeMetadata(), "multiple_partial_definitions", 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.PropertyModel)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("PropertyModel", static (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.PropertyModel.MetatypeMetadata()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.SetOnlyProperty)] = new Chickensoft.Introspection.AbstractIntrospectiveTypeMetadata("SetOnlyProperty", static (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.SetOnlyProperty.MetatypeMetadata()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.SomeType)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("SomeType", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.SomeType.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.StaticPropertyIsSkipped)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("StaticPropertyIsSkipped", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.StaticPropertyIsSkipped.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A)] = new Chickensoft.Introspection.ConcreteTypeMetadata("A", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AA)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AA", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AA.AAA)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AAA", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AB)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AB", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A.AC)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AC", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.A<>)] = new Chickensoft.Introspection.TypeMetadata("A"), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.B)] = new Chickensoft.Introspection.ConcreteTypeMetadata("B", (r) => r.Receive(), () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.B)] = new Chickensoft.Introspection.ConcreteTypeMetadata("B", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.GA<>)] = new Chickensoft.Introspection.TypeMetadata("GA"), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.GB<,>)] = new Chickensoft.Introspection.TypeMetadata("GB"), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.GC<,,>)] = new Chickensoft.Introspection.TypeMetadata("GC"), @@ -85,28 +85,28 @@ public partial class TypeRegistry : Chickensoft.Introspection.ITypeRegistry { [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.GC<,,>.GCH<,>)] = new Chickensoft.Introspection.TypeMetadata("GCH"), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.GC<,,>.GCI<,,,>)] = new Chickensoft.Introspection.TypeMetadata("GCI"), [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.TraditionalNamespace.GC<,,>.GCI<,,>)] = new Chickensoft.Introspection.TypeMetadata("GCI"), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel)] = new Chickensoft.Introspection.AbstractIdentifiableTypeMetadata("VersionedModel", (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel.MetatypeMetadata(), "versioned_model"), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel0)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel0", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel0.MetatypeMetadata(), 0), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel1)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel1", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel1.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel2", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel2.MetatypeMetadata(), 2), - [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel3)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel3", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel3.MetatypeMetadata(), 3), - [typeof(Chickensoft.Introspection.Generator.Tests.TestUtils.TagAttribute)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TagAttribute", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Generator.Tests.Utils.CodeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("CodeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(GlobalScopeContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GlobalScopeContainer", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(GlobalScopeContainer.TypeInGlobalScope)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("TypeInGlobalScope", (r) => r.Receive(), () => System.Activator.CreateInstance(), new GlobalScopeContainer.TypeInGlobalScope.MetatypeMetadata(), 1), - [typeof(One.B)] = new Chickensoft.Introspection.ConcreteTypeMetadata("B", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(One.Two.A)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("A", (r) => r.Receive(), () => System.Activator.CreateInstance(), new One.Two.A.MetatypeMetadata(), 1), - [typeof(OtherNamespace.Altogether.A)] = new Chickensoft.Introspection.ConcreteTypeMetadata("A", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(OtherNamespace.Altogether.A.B)] = new Chickensoft.Introspection.ConcreteTypeMetadata("B", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(OtherNamespace.Altogether.A.B.C)] = new Chickensoft.Introspection.ConcreteTypeMetadata("C", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(OtherNamespace.Altogether.A.B.C.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", (r) => r.Receive(), () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.B.C.ChildBaseFullyQualified.MetatypeMetadata(), 1), - [typeof(OtherNamespace.Altogether.A.B.C.D)] = new Chickensoft.Introspection.ConcreteTypeMetadata("D", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(OtherNamespace.Altogether.A.B.C.D.SomeBaseClass)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("SomeBaseClass", (r) => r.Receive(), () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.B.C.D.SomeBaseClass.MetatypeMetadata(), 1), - [typeof(OtherNamespace.Altogether.A.B.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", (r) => r.Receive(), () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.B.ChildBaseFullyQualified.MetatypeMetadata(), 1), - [typeof(OtherNamespace.Altogether.A.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", (r) => r.Receive(), () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.ChildBaseFullyQualified.MetatypeMetadata(), 1), - [typeof(OtherNamespace.Altogether.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", (r) => r.Receive(), () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.ChildBaseFullyQualified.MetatypeMetadata(), 1), - [typeof(OtherNamespace.Altogether.ChildBaseFullyQualified2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified2", (r) => r.Receive(), () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.ChildBaseFullyQualified2.MetatypeMetadata(), 1), - [typeof(StaticUsings.ChildWithStaticBaseRef)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildWithStaticBaseRef", (r) => r.Receive(), () => System.Activator.CreateInstance(), new StaticUsings.ChildWithStaticBaseRef.MetatypeMetadata(), 1) + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel)] = new Chickensoft.Introspection.AbstractIdentifiableTypeMetadata("VersionedModel", static (r) => r.Receive(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel.MetatypeMetadata(), "versioned_model"), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel0)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel0", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel0.MetatypeMetadata(), 0), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel1)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel1", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel1.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel2", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel2.MetatypeMetadata(), 2), + [typeof(Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel3)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("VersionedModel3", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Generator.Tests.TestCases.VersionedModel3.MetatypeMetadata(), 3), + [typeof(Chickensoft.Introspection.Generator.Tests.TestUtils.TagAttribute)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TagAttribute", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Generator.Tests.Utils.CodeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("CodeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(GlobalScopeContainer)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GlobalScopeContainer", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(GlobalScopeContainer.TypeInGlobalScope)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("TypeInGlobalScope", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new GlobalScopeContainer.TypeInGlobalScope.MetatypeMetadata(), 1), + [typeof(One.B)] = new Chickensoft.Introspection.ConcreteTypeMetadata("B", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(One.Two.A)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("A", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new One.Two.A.MetatypeMetadata(), 1), + [typeof(OtherNamespace.Altogether.A)] = new Chickensoft.Introspection.ConcreteTypeMetadata("A", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(OtherNamespace.Altogether.A.B)] = new Chickensoft.Introspection.ConcreteTypeMetadata("B", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(OtherNamespace.Altogether.A.B.C)] = new Chickensoft.Introspection.ConcreteTypeMetadata("C", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(OtherNamespace.Altogether.A.B.C.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.B.C.ChildBaseFullyQualified.MetatypeMetadata(), 1), + [typeof(OtherNamespace.Altogether.A.B.C.D)] = new Chickensoft.Introspection.ConcreteTypeMetadata("D", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(OtherNamespace.Altogether.A.B.C.D.SomeBaseClass)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("SomeBaseClass", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.B.C.D.SomeBaseClass.MetatypeMetadata(), 1), + [typeof(OtherNamespace.Altogether.A.B.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.B.ChildBaseFullyQualified.MetatypeMetadata(), 1), + [typeof(OtherNamespace.Altogether.A.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.A.ChildBaseFullyQualified.MetatypeMetadata(), 1), + [typeof(OtherNamespace.Altogether.ChildBaseFullyQualified)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.ChildBaseFullyQualified.MetatypeMetadata(), 1), + [typeof(OtherNamespace.Altogether.ChildBaseFullyQualified2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildBaseFullyQualified2", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new OtherNamespace.Altogether.ChildBaseFullyQualified2.MetatypeMetadata(), 1), + [typeof(StaticUsings.ChildWithStaticBaseRef)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildWithStaticBaseRef", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new StaticUsings.ChildWithStaticBaseRef.MetatypeMetadata(), 1) }; [System.Runtime.CompilerServices.ModuleInitializer] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_ChildBaseFullyQualified2447EE53E80.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_ChildBaseFullyQualified2447EE53E80.g.cs index 05632dd..533c483 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_ChildBaseFullyQualified2447EE53E80.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_ChildBaseFullyQualified2447EE53E80.g.cs @@ -41,7 +41,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified2 requires init args."); return new ChildBaseFullyQualified2() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs index 5196b27..8ee71d9 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_MyContainerClass_MyModel67E837FC39.g.cs @@ -25,8 +25,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Age", IsInit: false, IsRequired: false, - Getter: (object obj) => ((MyModel)obj).Age, - Setter: (object obj, object? value) => ((MyModel)obj).Age = (int)value, + Getter: static (object obj) => ((MyModel)obj).Age, + Setter: static (object obj, object? value) => ((MyModel)obj).Age = (int)value, GenericType: new GenericType( OpenType: typeof(int), ClosedType: typeof(int), @@ -44,8 +44,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Name", IsInit: false, IsRequired: false, - Getter: (object obj) => ((MyModel)obj).Name, - Setter: (object obj, object? value) => ((MyModel)obj).Name = (string)value!, + Getter: static (object obj) => ((MyModel)obj).Name, + Setter: static (object obj, object? value) => ((MyModel)obj).Name = (string)value!, GenericType: new GenericType( OpenType: typeof(string), ClosedType: typeof(string), @@ -79,8 +79,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public System.Collections.Generic.IReadOnlyDictionary> MixinHandlers { get; } = new System.Collections.Generic.Dictionary>() { - [typeof(IMyMixin)] = (obj) => ((IMyMixin)obj).Handler(), - [typeof(IMySecondMixin)] = (obj) => ((IMySecondMixin)obj).Handler() + [typeof(IMyMixin)] = static (obj) => ((IMyMixin)obj).Handler(), + [typeof(IMySecondMixin)] = static (obj) => ((IMySecondMixin)obj).Handler() }; diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_Tests_TestCases_SomeType31193CB4B4.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_Tests_TestCases_SomeType31193CB4B4.g.cs index 3f146a3..b98146a 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_Tests_TestCases_SomeType31193CB4B4.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/_Tests_TestCases_SomeType31193CB4B4.g.cs @@ -33,7 +33,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public System.Collections.Generic.IReadOnlyDictionary> MixinHandlers { get; } = new System.Collections.Generic.Dictionary>() { - [typeof(ISomeMixin)] = (obj) => ((ISomeMixin)obj).Handler() + [typeof(ISomeMixin)] = static (obj) => ((ISomeMixin)obj).Handler() }; diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/e_ChildBaseFullyQualifiedF82AB94D12.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/e_ChildBaseFullyQualifiedF82AB94D12.g.cs index 976fe0b..22b6893 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/e_ChildBaseFullyQualifiedF82AB94D12.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/e_ChildBaseFullyQualifiedF82AB94D12.g.cs @@ -42,7 +42,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified requires init args."); return new ChildBaseFullyQualified() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/eeplyNamespaced_SomeChild7E3B519F42.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/eeplyNamespaced_SomeChild7E3B519F42.g.cs index 1ff7acb..f964d8d 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/eeplyNamespaced_SomeChild7E3B519F42.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/eeplyNamespaced_SomeChild7E3B519F42.g.cs @@ -42,7 +42,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing SomeChild requires init args."); return new SomeChild() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs index 99c0520..931bc75 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/er2_DeeplyNestedBaseClassAC795ED913.g.cs @@ -25,7 +25,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "DeepName", IsInit: true, IsRequired: true, - Getter: (object obj) => ((DeeplyNestedBaseClass)obj).DeepName, + Getter: static (object obj) => ((DeeplyNestedBaseClass)obj).DeepName, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -59,7 +59,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing DeeplyNestedBaseClass requires init args."); return new DeeplyNestedBaseClass() { - DeepName = args.ContainsKey("DeepName") ? (string)args["DeepName"] : default! + DeepName = args.ContainsKey("DeepName") ? (string)args["DeepName"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs index 6ac8cd4..a3864e7 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/her_A_B_C_D_SomeBaseClassECA01F390E.g.cs @@ -27,7 +27,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Identifier", IsInit: true, IsRequired: true, - Getter: (object obj) => ((SomeBaseClass)obj).Identifier, + Getter: static (object obj) => ((SomeBaseClass)obj).Identifier, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -61,7 +61,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing SomeBaseClass requires init args."); return new SomeBaseClass() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hildBaseNotFullyQualified96BFFBDF77.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hildBaseNotFullyQualified96BFFBDF77.g.cs index 307c4ed..f6a8e85 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hildBaseNotFullyQualified96BFFBDF77.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hildBaseNotFullyQualified96BFFBDF77.g.cs @@ -42,7 +42,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseNotFullyQualified requires init args."); return new ChildBaseNotFullyQualified() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ingDeeplyNamespaced_ChildB31D784D2E.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ingDeeplyNamespaced_ChildB31D784D2E.g.cs index d073dde..ee5441b 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ingDeeplyNamespaced_ChildB31D784D2E.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ingDeeplyNamespaced_ChildB31D784D2E.g.cs @@ -42,7 +42,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Child requires init args."); return new Child() { - DeepName = args.ContainsKey("DeepName") ? (string)args["DeepName"] : default! + DeepName = args.ContainsKey("DeepName") ? (string)args["DeepName"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs index 8838286..fcd5597 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/or_Tests_TestCases_MyType1CDCCD6086.g.cs @@ -28,8 +28,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "MyProperty", IsInit: false, IsRequired: false, - Getter: (object obj) => ((MyType)obj).MyProperty, - Setter: (object obj, object? value) => ((MyType)obj).MyProperty = (string)value!, + Getter: static (object obj) => ((MyType)obj).MyProperty, + Setter: static (object obj, object? value) => ((MyType)obj).MyProperty = (string)value!, GenericType: new GenericType( OpenType: typeof(string), ClosedType: typeof(string), @@ -51,7 +51,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "NoAttributeSoNoMetadata", IsInit: false, IsRequired: false, - Getter: (object obj) => ((MyType)obj).NoAttributeSoNoMetadata, + Getter: static (object obj) => ((MyType)obj).NoAttributeSoNoMetadata, Setter: null, GenericType: new GenericType( OpenType: typeof(int), @@ -67,8 +67,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "OptionalFloat", IsInit: false, IsRequired: false, - Getter: (object obj) => ((MyType)obj).OptionalFloat, - Setter: (object obj, object? value) => ((MyType)obj).OptionalFloat = (Nullable)value, + Getter: static (object obj) => ((MyType)obj).OptionalFloat, + Setter: static (object obj, object? value) => ((MyType)obj).OptionalFloat = (Nullable)value, GenericType: new GenericType( OpenType: typeof(Nullable<>), ClosedType: typeof(Nullable), @@ -94,8 +94,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "OptionalInt", IsInit: false, IsRequired: false, - Getter: (object obj) => ((MyType)obj).OptionalInt, - Setter: (object obj, object? value) => ((MyType)obj).OptionalInt = (int)value, + Getter: static (object obj) => ((MyType)obj).OptionalInt, + Setter: static (object obj, object? value) => ((MyType)obj).OptionalInt = (int)value, GenericType: new GenericType( OpenType: typeof(int), ClosedType: typeof(int), diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/r_ChildBaseFullyQualified695F3233EA.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/r_ChildBaseFullyQualified695F3233EA.g.cs index a7cf04f..a95dc85 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/r_ChildBaseFullyQualified695F3233EA.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/r_ChildBaseFullyQualified695F3233EA.g.cs @@ -41,7 +41,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildBaseFullyQualified requires init args."); return new ChildBaseFullyQualified() { - Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default! + Identifier = args.ContainsKey("Identifier") ? (string)args["Identifier"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs index 56becce..1dd6b7d 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_AttributesWithNamedArgs21E465F742.g.cs @@ -24,7 +24,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Name", IsInit: true, IsRequired: true, - Getter: (object obj) => ((AttributesWithNamedArgs)obj).Name, + Getter: static (object obj) => ((AttributesWithNamedArgs)obj).Name, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -64,7 +64,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing AttributesWithNamedArgs requires init args."); return new AttributesWithNamedArgs() { - Name = args.ContainsKey("Name") ? (string)args["Name"] : default! + Name = args.ContainsKey("Name") ? (string)args["Name"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs index e3fd38a..ccf67e9 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_InitArgsModel651DDFA4A7.g.cs @@ -24,8 +24,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Address", IsInit: false, IsRequired: false, - Getter: (object obj) => ((InitArgsModel)obj).Address, - Setter: (object obj, object? value) => ((InitArgsModel)obj).Address = (string)value, + Getter: static (object obj) => ((InitArgsModel)obj).Address, + Setter: static (object obj, object? value) => ((InitArgsModel)obj).Address = (string)value, GenericType: new GenericType( OpenType: typeof(string), ClosedType: typeof(string), @@ -43,7 +43,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Age", IsInit: true, IsRequired: true, - Getter: (object obj) => ((InitArgsModel)obj).Age, + Getter: static (object obj) => ((InitArgsModel)obj).Age, Setter: null, GenericType: new GenericType( OpenType: typeof(int), @@ -62,7 +62,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Description", IsInit: true, IsRequired: false, - Getter: (object obj) => ((InitArgsModel)obj).Description, + Getter: static (object obj) => ((InitArgsModel)obj).Description, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -77,11 +77,49 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { } } ), + new Chickensoft.Introspection.PropertyMetadata( + Name: "HasAttended", + IsInit: true, + IsRequired: false, + Getter: static (object obj) => ((InitArgsModel)obj).HasAttended, + Setter: null, + GenericType: new GenericType( + OpenType: typeof(InitArgsEnum), + ClosedType: typeof(InitArgsEnum), + Arguments: System.Array.Empty(), + GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter2: default + ), + Attributes: new System.Collections.Generic.Dictionary() { + [typeof(TagAttribute)] = new System.Attribute[] { + new TagAttribute("has_attended") + } + } + ), + new Chickensoft.Introspection.PropertyMetadata( + Name: "IsAttending", + IsInit: false, + IsRequired: false, + Getter: static (object obj) => ((InitArgsModel)obj).IsAttending, + Setter: static (object obj, object? value) => ((InitArgsModel)obj).IsAttending = (InitArgsEnum)value!, + GenericType: new GenericType( + OpenType: typeof(InitArgsEnum), + ClosedType: typeof(InitArgsEnum), + Arguments: System.Array.Empty(), + GenericTypeGetter: receiver => receiver.Receive(), + GenericTypeGetter2: default + ), + Attributes: new System.Collections.Generic.Dictionary() { + [typeof(TagAttribute)] = new System.Attribute[] { + new TagAttribute("is_attending") + } + } + ), new Chickensoft.Introspection.PropertyMetadata( Name: "Name", IsInit: true, IsRequired: true, - Getter: (object obj) => ((InitArgsModel)obj).Name, + Getter: static (object obj) => ((InitArgsModel)obj).Name, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -121,10 +159,10 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing InitArgsModel requires init args."); return new InitArgsModel() { - Address = args.ContainsKey("Address") ? (string)args["Address"] : default!, - Age = args.ContainsKey("Age") ? (int)args["Age"] : default!, - Description = args.ContainsKey("Description") ? (string)args["Description"] : default!, - Name = args.ContainsKey("Name") ? (string)args["Name"] : default! + Age = args.ContainsKey("Age") ? (int)args["Age"] : default(int)!, + Description = args.ContainsKey("Description") ? (string)args["Description"] : default(string)!, + HasAttended = args.ContainsKey("HasAttended") ? (InitArgsEnum)args["HasAttended"] : InitArgsEnum.No, + Name = args.ContainsKey("Name") ? (string)args["Name"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs index f7c1b4e..ca1af7d 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/s_TestCases_PropertyModel4D221791B1.g.cs @@ -21,7 +21,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Value", IsInit: false, IsRequired: false, - Getter: (object obj) => ((PropertyModel)obj).Value, + Getter: static (object obj) => ((PropertyModel)obj).Value, Setter: null, GenericType: new GenericType( OpenType: typeof(string), diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs index 4329986..3acfacf 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/sts_TestCases_Collections23D60571D5.g.cs @@ -24,7 +24,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "NestedCollections", IsInit: false, IsRequired: false, - Getter: (object obj) => ((Collections)obj).NestedCollections, + Getter: static (object obj) => ((Collections)obj).NestedCollections, Setter: null, GenericType: new GenericType( OpenType: typeof(Dictionary<,>), diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs index 460e73f..cbad5bf 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_DerivedModel2583598D69.g.cs @@ -24,8 +24,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Age", IsInit: false, IsRequired: false, - Getter: (object obj) => ((DerivedModel)obj).Age, - Setter: (object obj, object? value) => ((DerivedModel)obj).Age = (int)value!, + Getter: static (object obj) => ((DerivedModel)obj).Age, + Setter: static (object obj, object? value) => ((DerivedModel)obj).Age = (int)value!, GenericType: new GenericType( OpenType: typeof(int), ClosedType: typeof(int), diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs index c0871fd..89afe74 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/ts_TestCases_PartialModelED2F9C08D8.g.cs @@ -24,7 +24,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Age", IsInit: true, IsRequired: true, - Getter: (object obj) => ((PartialModel)obj).Age, + Getter: static (object obj) => ((PartialModel)obj).Age, Setter: null, GenericType: new GenericType( OpenType: typeof(int), @@ -43,7 +43,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Name", IsInit: true, IsRequired: true, - Getter: (object obj) => ((PartialModel)obj).Name, + Getter: static (object obj) => ((PartialModel)obj).Name, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -83,8 +83,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing PartialModel requires init args."); return new PartialModel() { - Age = args.ContainsKey("Age") ? (int)args["Age"] : default!, - Name = args.ContainsKey("Name") ? (string)args["Name"] : default! + Age = args.ContainsKey("Age") ? (int)args["Age"] : default(int)!, + Name = args.ContainsKey("Name") ? (string)args["Name"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs index 2165bc1..f185c27 100644 --- a/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs +++ b/Chickensoft.Introspection.Generator.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/wo_IThree_Four_NestedType7FDE758058.g.cs @@ -32,8 +32,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "MyProperty", IsInit: false, IsRequired: false, - Getter: (object obj) => ((NestedType)obj).MyProperty, - Setter: (object obj, object? value) => ((NestedType)obj).MyProperty = (string)value!, + Getter: static (object obj) => ((NestedType)obj).MyProperty, + Setter: static (object obj, object? value) => ((NestedType)obj).MyProperty = (string)value!, GenericType: new GenericType( OpenType: typeof(string), ClosedType: typeof(string), @@ -55,8 +55,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "OptionalFloat", IsInit: false, IsRequired: false, - Getter: (object obj) => ((NestedType)obj).OptionalFloat, - Setter: (object obj, object? value) => ((NestedType)obj).OptionalFloat = (float)value, + Getter: static (object obj) => ((NestedType)obj).OptionalFloat, + Setter: static (object obj, object? value) => ((NestedType)obj).OptionalFloat = (float)value, GenericType: new GenericType( OpenType: typeof(float), ClosedType: typeof(float), @@ -74,8 +74,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "OptionalInt", IsInit: false, IsRequired: false, - Getter: (object obj) => ((NestedType)obj).OptionalInt, - Setter: (object obj, object? value) => ((NestedType)obj).OptionalInt = (int)value, + Getter: static (object obj) => ((NestedType)obj).OptionalInt, + Setter: static (object obj, object? value) => ((NestedType)obj).OptionalInt = (int)value, GenericType: new GenericType( OpenType: typeof(int), ClosedType: typeof(int), diff --git a/Chickensoft.Introspection.Generator.Tests/test/src/models/DeclaredPropertyTest.cs b/Chickensoft.Introspection.Generator.Tests/test/src/models/DeclaredPropertyTest.cs index d37c64b..e17e539 100644 --- a/Chickensoft.Introspection.Generator.Tests/test/src/models/DeclaredPropertyTest.cs +++ b/Chickensoft.Introspection.Generator.Tests/test/src/models/DeclaredPropertyTest.cs @@ -15,6 +15,7 @@ public void Equality() { IsInit: false, IsRequired: false, IsNullable: false, + DefaultValueExpression: null, GenericType: new GenericTypeNode( "System.String", Children: ImmutableArray.Empty ), @@ -33,6 +34,7 @@ public void Equality() { IsInit: false, IsRequired: false, IsNullable: false, + DefaultValueExpression: null, GenericType: new GenericTypeNode( "System.String", Children: ImmutableArray.Empty ), @@ -47,6 +49,7 @@ public void Equality() { IsInit: false, IsRequired: false, IsNullable: false, + DefaultValueExpression: null, GenericType: new GenericTypeNode( "System.String", Children: ImmutableArray.Empty ), @@ -61,6 +64,7 @@ public void Equality() { IsInit: false, IsRequired: false, IsNullable: false, + DefaultValueExpression: null, GenericType: new GenericTypeNode( "System.String", Children: ImmutableArray.Empty ), diff --git a/Chickensoft.Introspection.Generator.Tests/test_cases/InitArgs.cs b/Chickensoft.Introspection.Generator.Tests/test_cases/InitArgs.cs index f8ac643..a890c40 100644 --- a/Chickensoft.Introspection.Generator.Tests/test_cases/InitArgs.cs +++ b/Chickensoft.Introspection.Generator.Tests/test_cases/InitArgs.cs @@ -3,8 +3,16 @@ namespace Chickensoft.Introspection.Generator.Tests.TestCases; using Chickensoft.Introspection; using Chickensoft.Introspection.Generator.Tests.TestUtils; + + [Meta, Id("init_args_model")] public partial class InitArgsModel { + public enum InitArgsEnum { + No = -1, + Undecided = 0, + Yes = 1, + } + [Tag("name")] public required string Name { get; init; } @@ -16,4 +24,12 @@ public partial class InitArgsModel { [Tag("address")] public string? Address { get; set; } // not init + + // Init/set enum with default value + [Tag("is_attending")] + public InitArgsEnum IsAttending { get; set; } = InitArgsEnum.Yes; + + // Init enum with default value + [Tag("has_attended")] + public InitArgsEnum HasAttended { get; init; } = InitArgsEnum.No; } diff --git a/Chickensoft.Introspection.Generator/src/TypeGenerator.cs b/Chickensoft.Introspection.Generator/src/TypeGenerator.cs index 041e4f3..568a502 100644 --- a/Chickensoft.Introspection.Generator/src/TypeGenerator.cs +++ b/Chickensoft.Introspection.Generator/src/TypeGenerator.cs @@ -529,6 +529,9 @@ property.Type is GenericNameSyntax generic && generic.Identifier.ValueText == "Nullable" ); + var defaultValueExpression = + property.Initializer?.Value.NormalizeWhitespace().ToString(); + var propType = property.Type; if (property.Type is NullableTypeSyntax nullableType) { @@ -550,6 +553,7 @@ property.Type is GenericNameSyntax generic && IsInit: isInit, IsRequired: isRequired, IsNullable: isNullable, + DefaultValueExpression: defaultValueExpression, GenericType: genericType, Attributes: propertyAttributes ) diff --git a/Chickensoft.Introspection.Generator/src/models/DeclaredProperty.cs b/Chickensoft.Introspection.Generator/src/models/DeclaredProperty.cs index e62d671..f51a80b 100644 --- a/Chickensoft.Introspection.Generator/src/models/DeclaredProperty.cs +++ b/Chickensoft.Introspection.Generator/src/models/DeclaredProperty.cs @@ -12,6 +12,8 @@ namespace Chickensoft.Introspection.Generator.Models; /// True if the property has a getter. /// True if the property has a setter. /// True if the property is nullable. +/// Expression to use as the default +/// value. /// Type of the /// Attributes applied to the public sealed record DeclaredProperty( @@ -21,6 +23,7 @@ public sealed record DeclaredProperty( bool IsInit, bool IsRequired, bool IsNullable, + string? DefaultValueExpression, GenericTypeNode GenericType, ImmutableArray Attributes ) { @@ -31,15 +34,16 @@ public void Write(IndentedTextWriter writer, string typeSimpleNameClosed) { var propertyValue = "value" + (IsNullable ? "" : "!"); var getter = HasGetter - ? $"(object obj) => (({typeSimpleNameClosed})obj).{Name}" + ? $"static (object obj) => (({typeSimpleNameClosed})obj).{Name}" : "null"; var setter = HasSetter ? ( IsInit ? "null" - : $"(object obj, object? value) => (({typeSimpleNameClosed})obj)" + - $".{Name} = ({GenericType.ClosedType}){propertyValue}" + : $"static (object obj, object? value) => " + + $"(({typeSimpleNameClosed})obj)" + + $".{Name} = ({GenericType.ClosedType}){propertyValue}" ) : "null"; @@ -72,6 +76,7 @@ other is not null && HasSetter == other.HasSetter && IsInit == other.IsInit && IsNullable == other.IsNullable && + DefaultValueExpression == other.DefaultValueExpression && GenericType.Equals(other.GenericType) && Attributes.SequenceEqual(other.Attributes); @@ -81,6 +86,7 @@ public override int GetHashCode() => HashCode.Combine( HasSetter, IsInit, IsNullable, + DefaultValueExpression, GenericType, Attributes ); diff --git a/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs b/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs index 2892a53..4c84d4f 100644 --- a/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs +++ b/Chickensoft.Introspection.Generator/src/models/DeclaredType.cs @@ -268,8 +268,9 @@ bool knownToBeAccessibleFromGlobalScope ) { const string prefix = "Chickensoft.Introspection"; var name = $"\"{Reference.SimpleNameClosed}\""; - var genericTypeGetter = $"(r) => r.Receive<{FullNameClosed}>()"; - var factory = $"() => System.Activator.CreateInstance<{FullNameClosed}>()"; + var genericTypeGetter = $"static (r) => r.Receive<{FullNameClosed}>()"; + var factory = + $"static () => System.Activator.CreateInstance<{FullNameClosed}>()"; var metatype = $"new {FullNameClosed}.{Constants.METATYPE_IMPL}()"; var id = Id ?? ""; var version = $"{Version}"; @@ -481,7 +482,7 @@ IEnumerable baseTypes writer.WriteCommaSeparatedList( orderedMixins, (mixin) => writer.Write( - $"[typeof({mixin})] = (obj) => (({mixin})obj).Handler()" + $"[typeof({mixin})] = static (obj) => (({mixin})obj).Handler()" ), multiline: true ); @@ -529,11 +530,12 @@ IEnumerable baseTypes writer.WriteLine($"return new {Reference.SimpleNameClosed}() {{"); var propStrings = allProperties - .Where(prop => prop.HasSetter) + .Where(prop => prop.IsInit || prop.IsRequired) .Select( (prop) => $"{prop.Name} = args.ContainsKey(\"{prop.Name}\") " + - $"? ({prop.GenericType.ClosedType})args[\"{prop.Name}\"] : default!" + $"? ({prop.GenericType.ClosedType})args[\"{prop.Name}\"] : " + + $"{(prop.DefaultValueExpression is { } value ? value : $"default({prop.GenericType.ClosedType})!")}" ); writer.WriteCommaSeparatedList( diff --git a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TypeGraphTest_Model4FF6A4782E.g.cs b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TypeGraphTest_Model4FF6A4782E.g.cs index 5d2a10a..29dc2ac 100644 --- a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TypeGraphTest_Model4FF6A4782E.g.cs +++ b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/Tests_TypeGraphTest_Model4FF6A4782E.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Name", IsInit: false, IsRequired: false, - Getter: (object obj) => ((Model)obj).Name, + Getter: static (object obj) => ((Model)obj).Name, Setter: null, GenericType: new GenericType( OpenType: typeof(string), diff --git a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs index 21a09f6..24e2358 100644 --- a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs +++ b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/TypeRegistry.g.cs @@ -4,40 +4,40 @@ public partial class TypeRegistry : Chickensoft.Introspection.ITypeRegistry { public static Chickensoft.Introspection.ITypeRegistry Instance { get; } = new TypeRegistry(); public System.Collections.Generic.IReadOnlyDictionary VisibleTypes { get; } = new System.Collections.Generic.Dictionary() { - [typeof(Chickensoft.Introspection.Tests.Attributes.IdAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("IdAttributeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.Attributes.MetaAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MetaAttributeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.Attributes.MixinAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MixinAttributeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.Attributes.VersionAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("VersionAttributeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.EmptyMetatypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("EmptyMetatypeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.IIntrospectiveTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("IIntrospectiveTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.MetaAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MetaAttributeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.Models.GenericTypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GenericTypeTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.Models.MixinBlackboardTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MixinBlackboardTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.Models.PropertyMetadataTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("PropertyMetadataTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.Models.TypeMetadataTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeMetadataTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.MyTypeWithAMixin)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("MyTypeWithAMixin", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.MyTypeWithAMixin.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Tests.TagAttribute)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TagAttribute", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphAncestryTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.Ancestor)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Ancestor", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.AncestorSibling)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AncestorSibling", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.Child)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Child", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.ChildCousin)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ChildCousin", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.Parent)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Parent", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.ParentCousin)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ParentCousin", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphMemberMetadataTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.ChildModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildModel", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.ChildModel.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.Model)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.Model.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.Model)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("Model", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.Model.MetatypeMetadata(), "test_model", 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.NoSubtypes)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("NoSubtypes", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.NoSubtypes.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("SubtypeA", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA.MetatypeMetadata(), "test_model_subtype_a", 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA.SubtypeB)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("SubtypeB", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA.SubtypeB.MetatypeMetadata(), "test_model_subtype_b", 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeC)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("SubtypeC", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeC.MetatypeMetadata(), "test_model_subtype_c", 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphVersionTest", (r) => r.Receive(), () => System.Activator.CreateInstance()), - [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model)] = new Chickensoft.Introspection.AbstractIdentifiableTypeMetadata("Model", (r) => r.Receive(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model.MetatypeMetadata(), "version_test_model"), - [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model1)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model1", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model1.MetatypeMetadata(), 1), - [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model2", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model2.MetatypeMetadata(), 2), - [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model3)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model3", (r) => r.Receive(), () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model3.MetatypeMetadata(), 3) + [typeof(Chickensoft.Introspection.Tests.Attributes.IdAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("IdAttributeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.Attributes.MetaAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MetaAttributeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.Attributes.MixinAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MixinAttributeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.Attributes.VersionAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("VersionAttributeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.EmptyMetatypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("EmptyMetatypeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.IIntrospectiveTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("IIntrospectiveTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.MetaAttributeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MetaAttributeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.Models.GenericTypeTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("GenericTypeTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.Models.MixinBlackboardTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("MixinBlackboardTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.Models.PropertyMetadataTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("PropertyMetadataTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.Models.TypeMetadataTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeMetadataTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.MyTypeWithAMixin)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("MyTypeWithAMixin", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.MyTypeWithAMixin.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Tests.TagAttribute)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TagAttribute", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphAncestryTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.Ancestor)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Ancestor", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.AncestorSibling)] = new Chickensoft.Introspection.ConcreteTypeMetadata("AncestorSibling", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.Child)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Child", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.ChildCousin)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ChildCousin", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.Parent)] = new Chickensoft.Introspection.ConcreteTypeMetadata("Parent", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphAncestryTest.ParentCousin)] = new Chickensoft.Introspection.ConcreteTypeMetadata("ParentCousin", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphMemberMetadataTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.ChildModel)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("ChildModel", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.ChildModel.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.Model)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphMemberMetadataTest.Model.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.Model)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("Model", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.Model.MetatypeMetadata(), "test_model", 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.NoSubtypes)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("NoSubtypes", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.NoSubtypes.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("SubtypeA", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA.MetatypeMetadata(), "test_model_subtype_a", 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA.SubtypeB)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("SubtypeB", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeA.SubtypeB.MetatypeMetadata(), "test_model_subtype_b", 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeC)] = new Chickensoft.Introspection.IdentifiableTypeMetadata("SubtypeC", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphTest.SubtypeC.MetatypeMetadata(), "test_model_subtype_c", 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest)] = new Chickensoft.Introspection.ConcreteTypeMetadata("TypeGraphVersionTest", static (r) => r.Receive(), static () => System.Activator.CreateInstance()), + [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model)] = new Chickensoft.Introspection.AbstractIdentifiableTypeMetadata("Model", static (r) => r.Receive(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model.MetatypeMetadata(), "version_test_model"), + [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model1)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model1", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model1.MetatypeMetadata(), 1), + [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model2)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model2", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model2.MetatypeMetadata(), 2), + [typeof(Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model3)] = new Chickensoft.Introspection.IntrospectiveTypeMetadata("Model3", static (r) => r.Receive(), static () => System.Activator.CreateInstance(), new Chickensoft.Introspection.Tests.TypeGraphVersionTest.Model3.MetatypeMetadata(), 3) }; [System.Runtime.CompilerServices.ModuleInitializer] diff --git a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/erMetadataTest_ChildModelD70FB8BF24.g.cs b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/erMetadataTest_ChildModelD70FB8BF24.g.cs index bc3d5d3..4d5dc7f 100644 --- a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/erMetadataTest_ChildModelD70FB8BF24.g.cs +++ b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/erMetadataTest_ChildModelD70FB8BF24.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "ChildName", IsInit: true, IsRequired: false, - Getter: (object obj) => ((ChildModel)obj).ChildName, + Getter: static (object obj) => ((ChildModel)obj).ChildName, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -68,9 +68,9 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing ChildModel requires init args."); return new ChildModel() { - Age = args.ContainsKey("Age") ? (int)args["Age"] : default!, - ChildName = args.ContainsKey("ChildName") ? (string)args["ChildName"] : default!, - Name = args.ContainsKey("Name") ? (string)args["Name"] : default! + Age = args.ContainsKey("Age") ? (int)args["Age"] : default(int)!, + ChildName = args.ContainsKey("ChildName") ? (string)args["ChildName"] : default(string)!, + Name = args.ContainsKey("Name") ? (string)args["Name"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hMemberMetadataTest_Model8D28D57DDD.g.cs b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hMemberMetadataTest_Model8D28D57DDD.g.cs index 7844cb7..d6a8df7 100644 --- a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hMemberMetadataTest_Model8D28D57DDD.g.cs +++ b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/hMemberMetadataTest_Model8D28D57DDD.g.cs @@ -31,7 +31,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Age", IsInit: true, IsRequired: true, - Getter: (object obj) => ((Model)obj).Age, + Getter: static (object obj) => ((Model)obj).Age, Setter: null, GenericType: new GenericType( OpenType: typeof(int), @@ -50,7 +50,7 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { Name: "Name", IsInit: true, IsRequired: false, - Getter: (object obj) => ((Model)obj).Name, + Getter: static (object obj) => ((Model)obj).Name, Setter: null, GenericType: new GenericType( OpenType: typeof(string), @@ -87,8 +87,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { public object Construct(System.Collections.Generic.IReadOnlyDictionary? args = null) { args = args ?? throw new System.ArgumentNullException(nameof(args), "Constructing Model requires init args."); return new Model() { - Age = args.ContainsKey("Age") ? (int)args["Age"] : default!, - Name = args.ContainsKey("Name") ? (string)args["Name"] : default! + Age = args.ContainsKey("Age") ? (int)args["Age"] : default(int)!, + Name = args.ContainsKey("Name") ? (string)args["Name"] : default(string)! }; } [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] diff --git a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/on_Tests_MyTypeWithAMixin444DFB44AF.g.cs b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/on_Tests_MyTypeWithAMixin444DFB44AF.g.cs index 3721428..1ea9c91 100644 --- a/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/on_Tests_MyTypeWithAMixin444DFB44AF.g.cs +++ b/Chickensoft.Introspection.Tests/.generated/Chickensoft.Introspection.Generator/Chickensoft.Introspection.Generator.TypeGenerator/on_Tests_MyTypeWithAMixin444DFB44AF.g.cs @@ -38,8 +38,8 @@ public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] public System.Collections.Generic.IReadOnlyDictionary> MixinHandlers { get; } = new System.Collections.Generic.Dictionary>() { - [typeof(IMixin1)] = (obj) => ((IMixin1)obj).Handler(), - [typeof(IMixin2)] = (obj) => ((IMixin2)obj).Handler() + [typeof(IMixin1)] = static (obj) => ((IMixin1)obj).Handler(), + [typeof(IMixin2)] = static (obj) => ((IMixin2)obj).Handler() };