Created
August 21, 2020 06:48
-
-
Save jindeveloper/14153bed21dac2c4b9a6f51b22e863cb to your computer and use it in GitHub Desktop.
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
[Fact] | |
public void Test_GetAll_BuiltIn_Attributes() | |
{ | |
var assembly = Assembly.Load(assemblyFullName); | |
var attributes = assembly | |
.DefinedTypes | |
.Where(type => | |
type | |
.IsSubclassOf(typeof(Attribute))); | |
foreach (var attribute in attributes) | |
{ | |
string attr = attribute | |
.Name | |
.Replace("Attribute", ""); | |
this._output | |
.WriteLine("Attribute: {0} and Usage: [{1}]" | |
, attribute.Name, attr); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment