-
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.
Merge pull request #3 from chickensoft-games/fix/static-properties
fix: static properties
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
51 changes: 51 additions & 0 deletions
51
...hickensoft.Introspection.Generator.TypeGenerator/s_StaticPropertyIsSkipped2497B0B66A.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,51 @@ | ||
#pragma warning disable | ||
#nullable enable | ||
namespace Chickensoft.Introspection.Generator.Tests.TestCases; | ||
|
||
using Chickensoft.Introspection; | ||
|
||
partial class StaticPropertyIsSkipped : Chickensoft.Introspection.IIntrospective { | ||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public Chickensoft.Introspection.MixinBlackboard MixinState { get; } = new(); | ||
|
||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public Chickensoft.Introspection.IMetatype Metatype => ((Chickensoft.Introspection.IIntrospectiveTypeMetadata)Chickensoft.Introspection.Types.Graph.GetMetadata(typeof(StaticPropertyIsSkipped))).Metatype; | ||
|
||
public class MetatypeMetadata : Chickensoft.Introspection.IMetatype { | ||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public System.Type Type => typeof(StaticPropertyIsSkipped); | ||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public bool HasInitProperties { get; } = false; | ||
|
||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public System.Collections.Generic.IReadOnlyList<Chickensoft.Introspection.PropertyMetadata> Properties { get; } = new System.Collections.Generic.List<Chickensoft.Introspection.PropertyMetadata>() { | ||
}; | ||
|
||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
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() | ||
} | ||
}; | ||
|
||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public System.Collections.Generic.IReadOnlyList<System.Type> Mixins { get; } = new System.Collections.Generic.List<System.Type>() { | ||
}; | ||
|
||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public System.Collections.Generic.IReadOnlyDictionary<System.Type, System.Action<object>> MixinHandlers { get; } = new System.Collections.Generic.Dictionary<System.Type, System.Action<object>>() { | ||
}; | ||
|
||
|
||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public object Construct(System.Collections.Generic.IReadOnlyDictionary<string, object?>? args = null) { | ||
return new StaticPropertyIsSkipped(); | ||
} | ||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public override bool Equals(object obj) => true; | ||
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] | ||
public override int GetHashCode() => base.GetHashCode(); | ||
} | ||
} | ||
#nullable restore | ||
#pragma warning restore |
8 changes: 8 additions & 0 deletions
8
Chickensoft.Introspection.Generator.Tests/test_cases/StaticPropertyIsSkipped.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,8 @@ | ||
namespace Chickensoft.Introspection.Generator.Tests.TestCases; | ||
|
||
using Chickensoft.Introspection; | ||
|
||
[Meta] | ||
public partial class StaticPropertyIsSkipped { | ||
public static string Name => "StaticPropertyIsSkipped"; | ||
} |
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