Skip to content

Instantly share code, notes, and snippets.

@janosorcsik
Last active December 11, 2017 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janosorcsik/f726b8b4315efef86060cf8a1089bce7 to your computer and use it in GitHub Desktop.
Save janosorcsik/f726b8b4315efef86060cf8a1089bce7 to your computer and use it in GitHub Desktop.
Check MessageContractAttribute
[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