static void GetIServiceBehaviorAttributes(Type currentServiceType, KeyedByTypeCollection <IServiceBehavior> behaviors) { foreach (IServiceBehavior behaviorAttribute in ServiceReflector.GetCustomAttributes(currentServiceType, typeof(IServiceBehavior))) { behaviors.Add(behaviorAttribute); } }
private static void EnsureNoOutputParameters(MethodInfo method) { if (ServiceReflector.HasOutputParameters(method, false)) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.TaskMethodMustNotHaveOutParameter))); } }
private static Type GetAncestorImplicitContractClass(Type service) { for (service = service.BaseType(); service != null; service = service.BaseType()) { if (ServiceReflector.GetSingleAttribute <ServiceContractAttribute>(service) != null) { return(service); } } return(null); }
static internal List <Type> GetInheritedContractTypes(Type service) { List <Type> types = new List <Type>(); foreach (Type t in service.GetInterfaces()) { if (ServiceReflector.GetSingleAttribute <ServiceContractAttribute>(t) != null) { types.Add(t); } } for (service = service.BaseType(); service != null; service = service.BaseType()) { if (ServiceReflector.GetSingleAttribute <ServiceContractAttribute>(service) != null) { types.Add(service); } } return(types); }