Reflection: FxCop rule assembly XML
-
I have a number of FxCop rule assemblies. I need to get all the names of the rules in these assemblies, and as far as I understand i could do this by using reflection on the assembly and getting the XML files. So my question is: Is it possible, and if so, how do I retrieve an embedded XML file from an assembly?
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
-
I have a number of FxCop rule assemblies. I need to get all the names of the rules in these assemblies, and as far as I understand i could do this by using reflection on the assembly and getting the XML files. So my question is: Is it possible, and if so, how do I retrieve an embedded XML file from an assembly?
fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.
nvm i solved my own problem ^^
foreach (string str in ASSEMBLY.GetManifestResourceNames())
{
using (StreamReader SR = new StreamReader(ASSEMBLY.GetManifestResourceStream(str)))
{
Console.WriteLine(SR.ReadToEnd());
}
}fafafa, ringakta icke sådant som bringa ack så naggande högönsklig välmåga å baronens ära.