c# - Get OperationContracts from DLL file using Assembly -
i open dll files using assembly class. want methods have [operationcontract] attribute. how that?
assembly assembly = assembly.loadfrom(somedllfilepath); type[] classes = assembly.gettypes();
var foo = type in assembly.gettypes() type.getcustomattributes(false).oftype<servicecontractattribute>().any() method in type.getmethods() method.getcustomattributes(false).oftype<operationcontractattribute>().any() select method;
Comments
Post a Comment