-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added inheritance checking overloads of attribute extension methods
- Loading branch information
Showing
16 changed files
with
247 additions
and
46 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
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
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
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
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
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
13 changes: 13 additions & 0 deletions
13
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/BarDerivedAttribute.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,13 @@ | ||
using System; | ||
|
||
namespace Fixtures | ||
{ | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public class BarDerivedAttribute : BaseAttribute | ||
{ | ||
/// <inheritdoc /> | ||
public BarDerivedAttribute() : base(AttributeType.Bar) | ||
{ | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/BarDerivedAttribute.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/BaseAttribute.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,21 @@ | ||
using System; | ||
|
||
namespace Fixtures | ||
{ | ||
public enum AttributeType | ||
{ | ||
Foo, | ||
Bar | ||
} | ||
|
||
|
||
public abstract class BaseAttribute : Attribute | ||
{ | ||
public AttributeType Type { get; } | ||
|
||
protected BaseAttribute(AttributeType type) | ||
{ | ||
Type = type; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/BaseAttribute.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/CloneableClass.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/FooDerivedAttribute.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,14 @@ | ||
using System; | ||
|
||
namespace Fixtures | ||
{ | ||
[AttributeUsage(AttributeTargets.Class)] | ||
public class FooDerivedAttribute : BaseAttribute | ||
{ | ||
/// <inheritdoc /> | ||
public FooDerivedAttribute() : base(AttributeType.Foo) | ||
{ | ||
|
||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/FooDerivedAttribute.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
ExternalApp/UnityProjectFixtures/Assets/Scripts/Fixtures/FooDerivedClassExample.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 Fixtures | ||
{ | ||
[FooDerived] | ||
public class FooDerivedClassExample | ||
{ | ||
|
||
} | ||
} |
Oops, something went wrong.