private static void UpdateActions(string serviceNamespace, string serviceName, CodeTypeExtension serviceContract) { foreach (CodeTypeMemberExtension method in serviceContract.Methods) { CodeAttributeDeclaration operationAttribute = method.FindAttribute("System.ServiceModel.OperationContractAttribute"); if (operationAttribute != null) { FormatActions(method, operationAttribute, serviceNamespace, serviceName); } foreach (CodeAttributeDeclaration faultAttribute in method.FindAttributes("System.ServiceModel.FaultContractAttribute")) { FormatActions(method, faultAttribute, serviceNamespace, serviceName); } } }
private static CodeMemberProperty FindMatchingSpecifiedProperty(CodeTypeExtension type, string propertyName) { return((from member in type.Properties where member.ExtendedObject.Name == (propertyName + "Specified") select(CodeMemberProperty) member.ExtendedObject).FirstOrDefault()); }
private static void UpdateActions(string serviceNamespace, string serviceName, CodeTypeExtension serviceContract) { foreach (CodeTypeMemberExtension method in serviceContract.Methods) { CodeAttributeDeclaration operationAttribute = method.FindAttribute("System.ServiceModel.OperationContractAttribute"); if (operationAttribute != null) { FormatActions(method, operationAttribute, serviceNamespace, serviceName); } foreach (CodeAttributeDeclaration faultAttribute in method.FindAttributes("System.ServiceModel.FaultContractAttribute")) { FormatActions(method, faultAttribute, serviceNamespace, serviceName); } } }
private static CodeMemberProperty FindMatchingSpecifiedProperty(CodeTypeExtension type, string propertyName) { return (from member in type.Properties where member.ExtendedObject.Name == (propertyName + "Specified") select (CodeMemberProperty)member.ExtendedObject).FirstOrDefault(); }