-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
125 changed files
with
4,878 additions
and
5 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...nsoft.Introspection.Generator.TypeGenerator/Chickensoft_Introspectio128A6C22666FE7CE.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma warning disable | ||
#nullable enable | ||
namespace Chickensoft.Introspection.Tests; | ||
|
||
using Chickensoft.Introspection; | ||
using Moq; | ||
using Shouldly; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Linq; | ||
using Xunit; | ||
|
||
partial class TypeGraphVersionTest { | ||
partial class Model2 : Chickensoft.Introspection.IIntrospective { | ||
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new(); | ||
|
||
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(Model2))).Metatype; | ||
|
||
public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { | ||
public System.Type Type => typeof(Model2); | ||
public bool HasInitProperties { get; } = false; | ||
|
||
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() { | ||
[typeof(MetaAttribute)] = new System.Attribute[] { | ||
new MetaAttribute() | ||
}, | ||
[typeof(VersionAttribute)] = new System.Attribute[] { | ||
new VersionAttribute(2) | ||
} | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() { | ||
}; | ||
|
||
|
||
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) { | ||
return new Model2(); | ||
} | ||
public override bool Equals(object obj) => true; | ||
public override int GetHashCode() => base.GetHashCode(); | ||
} | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
52 changes: 52 additions & 0 deletions
52
...nsoft.Introspection.Generator.TypeGenerator/Chickensoft_Introspectio1BBA70C2FA7FBDBB.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma warning disable | ||
#nullable enable | ||
namespace Chickensoft.Introspection.Tests; | ||
|
||
using Chickensoft.Introspection; | ||
using Moq; | ||
using Shouldly; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Linq; | ||
using Xunit; | ||
|
||
partial class TypeGraphTest { | ||
partial class SubtypeC : Chickensoft.Introspection.IIntrospective, Chickensoft.Introspection.IIdentifiable { | ||
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new(); | ||
|
||
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(SubtypeC))).Metatype; | ||
|
||
public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { | ||
public System.Type Type => typeof(SubtypeC); | ||
public bool HasInitProperties { get; } = false; | ||
|
||
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() { | ||
[typeof(IdAttribute)] = new System.Attribute[] { | ||
new IdAttribute("test_model_subtype_c") | ||
}, | ||
[typeof(MetaAttribute)] = new System.Attribute[] { | ||
new MetaAttribute() | ||
} | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() { | ||
}; | ||
|
||
|
||
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) { | ||
return new SubtypeC(); | ||
} | ||
public override bool Equals(object obj) => true; | ||
public override int GetHashCode() => base.GetHashCode(); | ||
} | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
54 changes: 54 additions & 0 deletions
54
...nsoft.Introspection.Generator.TypeGenerator/Chickensoft_Introspectio444FE4CECBE7E572.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#pragma warning disable | ||
#nullable enable | ||
namespace Chickensoft.Introspection.Tests; | ||
|
||
using Chickensoft.Introspection; | ||
using Moq; | ||
using Shouldly; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Linq; | ||
using Xunit; | ||
|
||
partial class TypeGraphTest { | ||
partial class SubtypeA { | ||
partial class SubtypeB : Chickensoft.Introspection.IIntrospective, Chickensoft.Introspection.IIdentifiable { | ||
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new(); | ||
|
||
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(SubtypeB))).Metatype; | ||
|
||
public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { | ||
public System.Type Type => typeof(SubtypeB); | ||
public bool HasInitProperties { get; } = false; | ||
|
||
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() { | ||
[typeof(IdAttribute)] = new System.Attribute[] { | ||
new IdAttribute("test_model_subtype_b") | ||
}, | ||
[typeof(MetaAttribute)] = new System.Attribute[] { | ||
new MetaAttribute() | ||
} | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() { | ||
}; | ||
|
||
|
||
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) { | ||
return new SubtypeB(); | ||
} | ||
public override bool Equals(object obj) => true; | ||
public override int GetHashCode() => base.GetHashCode(); | ||
} | ||
} | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
46 changes: 46 additions & 0 deletions
46
...nsoft.Introspection.Generator.TypeGenerator/Chickensoft_Introspectio48A151444DFB44AF.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#pragma warning disable | ||
#nullable enable | ||
namespace Chickensoft.Introspection.Tests; | ||
|
||
using Shouldly; | ||
using System; | ||
using Xunit; | ||
|
||
partial class MyTypeWithAMixin : Chickensoft.Introspection.IIntrospective, IMixin1, IMixin2 { | ||
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new(); | ||
|
||
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(MyTypeWithAMixin))).Metatype; | ||
|
||
public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { | ||
public System.Type Type => typeof(MyTypeWithAMixin); | ||
public bool HasInitProperties { get; } = false; | ||
|
||
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() { | ||
[typeof(MetaAttribute)] = new System.Attribute[] { | ||
new MetaAttribute(typeof(IMixin1), typeof(IMixin2)) | ||
} | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() { | ||
typeof(IMixin1), | ||
typeof(IMixin2) | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() { | ||
[typeof(IMixin1)] = (obj) => ((IMixin1)obj).Handler(), | ||
[typeof(IMixin2)] = (obj) => ((IMixin2)obj).Handler() | ||
}; | ||
|
||
|
||
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) { | ||
return new MyTypeWithAMixin(); | ||
} | ||
public override bool Equals(object obj) => true; | ||
public override int GetHashCode() => base.GetHashCode(); | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
68 changes: 68 additions & 0 deletions
68
...nsoft.Introspection.Generator.TypeGenerator/Chickensoft_Introspectio4BE1D24FF6A4782E.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#pragma warning disable | ||
#nullable enable | ||
namespace Chickensoft.Introspection.Tests; | ||
|
||
using Chickensoft.Introspection; | ||
using Moq; | ||
using Shouldly; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Linq; | ||
using Xunit; | ||
|
||
partial class TypeGraphTest { | ||
partial class Model : Chickensoft.Introspection.IIntrospective, Chickensoft.Introspection.IIdentifiable { | ||
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new(); | ||
|
||
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(Model))).Metatype; | ||
|
||
public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { | ||
public System.Type Type => typeof(Model); | ||
public bool HasInitProperties { get; } = false; | ||
|
||
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() { | ||
new Chickensoft.Introspection.PropertyMetadata( | ||
Name: "Name", | ||
IsInit: false, | ||
IsRequired: false, | ||
Getter: (object obj) => ((Model)obj).Name, | ||
Setter: (object obj, object? _) => { }, | ||
GenericType: new GenericType( | ||
OpenType: typeof(string), | ||
ClosedType: typeof(string), | ||
Arguments: System.Array.Empty<GenericType>(), | ||
GenericTypeGetter: receiver => receiver.Receive<string>(), | ||
GenericTypeGetter2: default | ||
), | ||
Attributes: new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() { | ||
} | ||
) | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() { | ||
[typeof(IdAttribute)] = new System.Attribute[] { | ||
new IdAttribute("test_model") | ||
}, | ||
[typeof(MetaAttribute)] = new System.Attribute[] { | ||
new MetaAttribute() | ||
} | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() { | ||
}; | ||
|
||
|
||
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) { | ||
return new Model(); | ||
} | ||
public override bool Equals(object obj) => true; | ||
public override int GetHashCode() => base.GetHashCode(); | ||
} | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
52 changes: 52 additions & 0 deletions
52
...nsoft.Introspection.Generator.TypeGenerator/Chickensoft_Introspectio6490C6691E41E943.g.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#pragma warning disable | ||
#nullable enable | ||
namespace Chickensoft.Introspection.Tests; | ||
|
||
using Chickensoft.Introspection; | ||
using Moq; | ||
using Shouldly; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Linq; | ||
using Xunit; | ||
|
||
partial class TypeGraphVersionTest { | ||
partial class Model : Chickensoft.Introspection.IIntrospective, Chickensoft.Introspection.IIdentifiable { | ||
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new(); | ||
|
||
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(Model))).Metatype; | ||
|
||
public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { | ||
public System.Type Type => typeof(Model); | ||
public bool HasInitProperties { get; } = false; | ||
|
||
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Attribute[]> Attributes { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Attribute[]>() { | ||
[typeof(IdAttribute)] = new System.Attribute[] { | ||
new IdAttribute("version_test_model") | ||
}, | ||
[typeof(MetaAttribute)] = new System.Attribute[] { | ||
new MetaAttribute() | ||
} | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() { | ||
}; | ||
|
||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() { | ||
}; | ||
|
||
|
||
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) { | ||
throw new System.NotImplementedException("Model is not instantiable."); | ||
} | ||
public override bool Equals(object obj) => true; | ||
public override int GetHashCode() => base.GetHashCode(); | ||
} | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
Oops, something went wrong.