Last active
December 11, 2017 21:05
-
-
Save janosorcsik/f726b8b4315efef86060cf8a1089bce7 to your computer and use it in GitHub Desktop.
Check MessageContractAttribute
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
[TestMethod] | |
public void CheckMessageContract() | |
{ | |
var m = Assembly.Load("DataContracts").GetTypes(). | |
Where(t => t.GetCustomAttributes(typeof(MessageContractAttribute)).Any()).ToArray(); | |
foreach (Type t in m) | |
{ | |
MessageContractAttribute a = (MessageContractAttribute) t.GetCustomAttribute(typeof(MessageContractAttribute), false); | |
var tname = t.Name; | |
var aname = a.WrapperName; | |
if (tname != aname) | |
{ | |
Trace.WriteLine(tname); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment