133 references to DeclaringContract
System.ServiceModel (35)
System\ServiceModel\Description\ContractDescription.cs (2)
194
if (od.
DeclaringContract
!= this)
196
ContractDescription inheritedContract = od.
DeclaringContract
;
System\ServiceModel\Description\MessageContractExporter.cs (4)
161
return operation.
DeclaringContract
!= contractContext.Contract;
441
typedMessageKey = new TypedMessageKey(message.MessageType, operation.
DeclaringContract
.Namespace, this.GetExtensionData());
483
typedMessageKey = new TypedMessageKey(message.MessageType, operation.
DeclaringContract
.Namespace, GetExtensionData());
859
this.declaringContract = operation.
DeclaringContract
;
System\ServiceModel\Description\MessageContractImporter.cs (2)
560
request.Body.WrapperNamespace = operation.
DeclaringContract
.Namespace;
568
response.Body.WrapperNamespace = operation.
DeclaringContract
.Namespace;
System\ServiceModel\Description\OperationGenerator.cs (1)
133
this.ContractNS = context.Operation.
DeclaringContract
.Namespace;
System\ServiceModel\Description\ServiceContractGenerator.cs (2)
457
if ((operationDescription.
DeclaringContract
.SessionMode == SessionMode.Required) && operationDescription.IsTerminating)
461
if ((operationDescription.
DeclaringContract
.SessionMode == SessionMode.Required) && !operationDescription.IsInitiating)
System\ServiceModel\Description\ServiceReflector.cs (1)
94
ContractDescription contract = operation.
DeclaringContract
;
System\ServiceModel\Description\TaskOperationDescriptionValidator.cs (2)
38
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, operation.
DeclaringContract
.ContractType)));
48
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.CannotHaveTwoOperationsWithTheSameName3, method1Name, method2Name, operation.
DeclaringContract
.ContractType)));
System\ServiceModel\Description\TypeLoader.cs (7)
218
bool isInherited = operationDescription.
DeclaringContract
!= contractDesc;
229
bool isInherited = opDesc.
DeclaringContract
!= contractDesc;
230
Type targetIface = implIsCallback ? opDesc.
DeclaringContract
.CallbackContractType : opDesc.
DeclaringContract
.ContractType;
292
bool isInherited = operationDescription.
DeclaringContract
!= contractDesc;
295
GetFormattingAttribute(operationDescription.
DeclaringContract
.ContractType,
735
op.Name, inheritedContractDescription.Name, existingOp.
DeclaringContract
.Name)));
System\ServiceModel\Description\XmlSerializerOperationBehavior.cs (14)
35
Reflector parentReflector = new Reflector(operation.
DeclaringContract
.Namespace, operation.
DeclaringContract
.ContractType);
102
bool isInherited = operation.
DeclaringContract
!= contract;
242
Type contractType = operation.
DeclaringContract
!= null ? operation.
DeclaringContract
.ContractType : null;
310
if (operation.
DeclaringContract
!= null)
312
keyBase = operation.
DeclaringContract
.Name + "," + operation.
DeclaringContract
.Namespace + ":";
347
get { return this.Operation.
DeclaringContract
.Name; }
352
get { return this.Operation.
DeclaringContract
.Namespace; }
469
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SFxHeaderNameMismatchInOperation, this.Operation.Name, this.Operation.
DeclaringContract
.Name, this.Operation.
DeclaringContract
.Namespace, header.Name, headerName)));
476
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.GetString(SR.SFxHeaderNamespaceMismatchInOperation, this.Operation.Name, this.Operation.
DeclaringContract
.Name, this.Operation.
DeclaringContract
.Namespace, header.Namespace, headerNs)));
System.ServiceModel.Activities (68)
System\ServiceModel\Activities\ContractInferenceHelper.cs (2)
487
operation.Name, operation.
DeclaringContract
.Name, typeof(DataContractSerializerOperationBehavior))));
501
SR.OperationHasSerializerBehavior(operation.Name, operation.
DeclaringContract
.Name, typeof(XmlSerializerOperationBehavior))));
System\ServiceModel\Activities\ContractValidationHelper.cs (39)
162
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(action, "Fault Action", targetFault.Action, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
166
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(NamingHelper.XmlName(name), "Fault Name", targetFault.Name, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
168
if (targetFault.Namespace != targetOperation.
DeclaringContract
.Namespace)
170
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(targetOperation.
DeclaringContract
.Namespace, "Fault Namespace", targetFault.Namespace, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
174
Constraint.AddValidationError(context, new ValidationError(SR2.ProtectionLevelNotSupported(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
187
Constraint.AddValidationError(context, new ValidationError(SR2.FaultTypeMismatch(faultType.FullName, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
197
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(overridingAction, "Action", targetMessage.Action, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
212
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(declaredMessageType.ToString(), "type", targetMessage.MessageType.ToString(), operation.Name, operation.
DeclaringContract
.Name)));
217
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(declaredMessageType.ToString(), "type", "null", operation.Name, operation.
DeclaringContract
.Name)));
238
Constraint.AddValidationError(context, new ValidationError(SR2.FirstParameterDoesnotMatchTheReturnValue(declaredMessageType.FullName, targetMessage.Body.ReturnValue.Type.Name, operation.Name, operation.
DeclaringContract
.Name)));
245
Constraint.AddValidationError(context, new ValidationError(SR2.ParameterNumberMismatch(declaredMessageType.FullName, operation.Name, operation.
DeclaringContract
.Name)));
249
Constraint.AddValidationError(context, new ValidationError(SR2.MessageContentCannotHaveMoreThanOneParameter(operation.Name, operation.
DeclaringContract
.Name)));
255
Constraint.AddValidationError(context, new ValidationError(SR2.MessageTypeMismatch(targetMessage.Body.Parts[0].Type.FullName, operation.Name, operation.
DeclaringContract
.Name)));
272
Constraint.AddValidationError(context, new ValidationError(SR2.MessageHeaderNotSupported(operation.Name, operation.
DeclaringContract
.Name)));
276
Constraint.AddValidationError(context, new ValidationError(SR2.MessagePropertyIsNotSupported(operation.Name, operation.
DeclaringContract
.Name)));
280
Constraint.AddValidationError(context, new ValidationError(SR2.ProtectionLevelIsNotSupported(operation.Name, operation.
DeclaringContract
.Name)));
287
Constraint.AddValidationError(context, new ValidationError(SR2.MessageCannotBeEmpty(operation.Name, operation.
DeclaringContract
.Name)));
312
partNamespace = operation.
DeclaringContract
.Namespace;
328
Constraint.AddValidationError(context, new ValidationError(SR2.NotSupportMoreThanOneParametersInMessageContract(operation.Name, operation.
DeclaringContract
.Name)));
336
Constraint.AddValidationError(context, new ValidationError(SR2.WrapperNotSupportedInMessageContract(operation.Name, operation.
DeclaringContract
.Name)));
341
Constraint.AddValidationError(context, new ValidationError(SR2.WrapperNotSupportedInMessageContract(operation.Name, operation.
DeclaringContract
.Name)));
346
Constraint.AddValidationError(context, new ValidationError(SR2.ParameterNumberMismatch(declaredMessageType.FullName, operation.Name, operation.
DeclaringContract
.Name)));
350
Constraint.AddValidationError(context, new ValidationError(SR2.MessageContentCannotHaveMoreThanOneParameter(operation.Name, operation.
DeclaringContract
.Name)));
362
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(partName, "parameter name", targetPart.Name, operation.Name, operation.
DeclaringContract
.Name)));
366
Constraint.AddValidationError(context, new ValidationError(SR2.PropertyMismatch(partNamespace, "parameter namespace", targetPart.Namespace, operation.Name, operation.
DeclaringContract
.Name)));
372
Constraint.AddValidationError(context, new ValidationError(SR2.ParameterTypeMismatch(declaredMessageType.FullName, targetPart.Type.FullName, operation.Name, operation.
DeclaringContract
.Name)));
376
Constraint.AddValidationError(context, new ValidationError(SR2.ParameterTypeMismatch(TypeHelper.VoidType.FullName, targetPart.Type.FullName, operation.Name, operation.
DeclaringContract
.Name)));
381
Constraint.AddValidationError(context, new ValidationError(SR2.ProtectionLevelIsNotSupported(operation.Name, operation.
DeclaringContract
.Name)));
400
Constraint.AddValidationError(context, new ValidationError(SR2.UnwrappedMessageNotSupported(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
404
Constraint.AddValidationError(context, new ValidationError(SR2.UnwrappedMessageNotSupported(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
420
Constraint.AddValidationError(context, new ValidationError(SR2.FirstParameterDoesnotMatchTheReturnValue(argument.ArgumentType.FullName, targetMessageBody.ReturnValue.Type.FullName, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
426
Constraint.AddValidationError(context, new ValidationError(SR2.ParameterPositionMismatch(targetMessageBody.ReturnValue.Name, targetOperation.Name, targetOperation.
DeclaringContract
.Name, "0")));
431
Constraint.AddValidationError(context, new ValidationError(SR2.ReturnValueMissing(targetMessageBody.ReturnValue.Type.FullName, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
444
Constraint.AddValidationError(context, new ValidationError(SR2.ParameterTypeMismatch(targetPart.Name, targetPart.Type.FullName, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
450
Constraint.AddValidationError(context, new ValidationError(SR2.ParameterPositionMismatch(targetPart.Name, targetOperation.Name, targetOperation.
DeclaringContract
.Name, benchmarkIndex)));
455
Constraint.AddValidationError(context, new ValidationError(SR2.MissingParameter(targetPart.Name, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
465
XmlQualifiedName qName = new XmlQualifiedName(name, targetOperation.
DeclaringContract
.Namespace);
470
Constraint.AddValidationError(context, new ValidationError(SR2.ExtraParameter(name, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
System\ServiceModel\Activities\Dispatcher\ControlOperationInvoker.cs (2)
68
if (description.
DeclaringContract
== WorkflowControlEndpoint.WorkflowControlServiceContract ||
69
description.
DeclaringContract
== WorkflowControlEndpoint.WorkflowControlServiceBaseContract)
System\ServiceModel\Activities\MessageBuilder.cs (6)
119
operation.
DeclaringContract
.Namespace, action, direction);
160
partNamespace = operation.
DeclaringContract
.Namespace;
194
string partNamespace = operation.
DeclaringContract
.Namespace;
228
operation.
DeclaringContract
.Namespace);
236
message.Body.WrapperNamespace = operation.
DeclaringContract
.Namespace;
267
Namespace = operation.
DeclaringContract
.Namespace,
System\ServiceModel\Activities\Receive.cs (2)
494
receiveActivity.ServiceContractName = XName.Get(operation.
DeclaringContract
.Name, operation.
DeclaringContract
.Namespace);
System\ServiceModel\Activities\ReceiveMessageContent.cs (1)
218
Constraint.AddValidationError(context, new ValidationError(SR.MisuseOfMessageContent(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
System\ServiceModel\Activities\ReceiveParametersContent.cs (1)
186
Constraint.AddValidationError(context, new ValidationError(SR.MisuseOfParameterContent(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
System\ServiceModel\Activities\SendMessageContent.cs (1)
235
Constraint.AddValidationError(context, new ValidationError(SR.MisuseOfMessageContent(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
System\ServiceModel\Activities\SendParametersContent.cs (1)
207
Constraint.AddValidationError(context, new ValidationError(SR.MisuseOfParameterContent(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
System\ServiceModel\Activities\WorkflowControlEndpoint.cs (2)
51
if (operation.
DeclaringContract
!= WorkflowControlServiceContract)
53
workflowControlServiceBaseContract = operation.
DeclaringContract
;
System\ServiceModel\Activities\WorkflowService.cs (11)
328
errors.Add(new ValidationError(SR.OperationIsNotImplemented(property.Operation.Name, property.Operation.
DeclaringContract
.Name), true));
337
errors.Add(new ValidationError(SR.TwoWayIsImplementedAsOneWay(property.Operation.Name, property.Operation.
DeclaringContract
.Name), true, string.Empty, recv));
366
OperationIdentifier id = new OperationIdentifier(operation.
DeclaringContract
.Name, operation.
DeclaringContract
.Namespace, operation.Name);
369
validationErrors.Add(new ValidationError(SR.DuplicatedContract(operation.
DeclaringContract
.Name, operation.Name), true));
1119
Constraint.AddValidationError(context, new ValidationError(SR.TargetContractCannotBeOneWayWithTransactionFlow(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
1125
Constraint.AddValidationError(context, new ValidationError(SR.ReceiveIsNotInTRS(targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
1132
Constraint.AddValidationError(context, new ValidationError(SR.ReceiveIsInTRSWhenTransactionFlowNotAllowed(targetOperation.Name, targetOperation.
DeclaringContract
.Name), true));
1144
Constraint.AddValidationError(context, new ValidationError(SR.PropertyMismatch(receiveActivity.SerializerOption.ToString(), "SerializerOption", targetSerializerOption.ToString(), targetOperation.
DeclaringContract
.Name, targetSerializerOption.ToString())));
1154
Constraint.AddValidationError(context, new ValidationError(SR.PropertyMismatch(receiveProtectionLevelString, "ProtectionLevel", targetProtectionLevelString, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
1171
Constraint.AddValidationError(context, new ValidationError(SR.MissingKnownTypes(targetType.FullName, targetOperation.Name, targetOperation.
DeclaringContract
.Name)));
System.ServiceModel.Routing (1)
System\ServiceModel\Routing\RoutingBehavior.cs (1)
268
ContractDescription contract = operationDescription.
DeclaringContract
;
System.ServiceModel.Web (26)
System\ServiceModel\Description\WebHttpBehavior.cs (17)
501
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.JsonFormatRequiresDataContract, od.Name, od.
DeclaringContract
.Name, od.
DeclaringContract
.Namespace)));
858
SR2.GetString(SR2.GETCannotHaveMCParameter, operationDescription.Name, operationDescription.
DeclaringContract
.Name, operationDescription.Messages[0].MessageType.Name)));
863
SR2.UTParamsDoNotComposeWithMessageContract, operationDescription.Name, operationDescription.
DeclaringContract
.Name)));
870
SR2.UTParamsDoNotComposeWithMessage, operationDescription.Name, operationDescription.
DeclaringContract
.Name)));
879
SR2.GetString(SR2.MultipleWebAttributes, od.Name, od.
DeclaringContract
.Name)));
957
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.AtMostOneRequestBodyParameterAllowedForUnwrappedMessages, declaringOperation.Name, declaringOperation.
DeclaringContract
.Name)));
969
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.OnlyReturnValueBodyParameterAllowedForUnwrappedMessages, declaringOperation.Name, declaringOperation.
DeclaringContract
.Name)));
1001
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR2.GetString(SR2.AtMostOneRequestBodyParameterAllowedForStream, declaringOperation.Name, declaringOperation.
DeclaringContract
.Name)));
1012
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR2.GetString(SR2.NoOutOrRefStreamParametersAllowed, message.Body.Parts[i].Name, declaringOperation.Name, declaringOperation.
DeclaringContract
.Name)));
1020
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentException(SR2.GetString(SR2.NoOutOrRefParametersAllowedWithStreamResult, declaringOperation.Name, declaringOperation.
DeclaringContract
.Name)));
1072
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.JsonFormatRequiresDataContract, od.Name, od.
DeclaringContract
.Name, od.
DeclaringContract
.Namespace)));
1208
SR2.GetString(SR2.GETCannotHaveBody, operation.Name, operation.
DeclaringContract
.Name, operation.Messages[0].Body.Parts[0].Name)));
1213
SR2.GetString(SR2.GETCannotHaveMCParameter, operation.Name, operation.
DeclaringContract
.Name, operation.Messages[0].MessageType.Name)));
1262
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.RpcEncodedNotSupportedForNoneMessageVersion, od.Name, od.
DeclaringContract
.Name, od.
DeclaringContract
.Namespace)));
System\ServiceModel\Dispatcher\HttpStreamFormatter.cs (2)
34
this.contractName = operation.
DeclaringContract
.Name;
35
this.contractNs = operation.
DeclaringContract
.Namespace;
System\ServiceModel\Dispatcher\SingleBodyParameterMessageFormatter.cs (4)
31
this.contractName = operation.
DeclaringContract
.Name;
32
this.contractNs = operation.
DeclaringContract
.Namespace;
263
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.JsonFormatRequiresDataContract, operation.Name, operation.
DeclaringContract
.Name, operation.
DeclaringContract
.Namespace)));
System\ServiceModel\Dispatcher\WebErrorHandler.cs (2)
68
throw System.ServiceModel.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.JsonFormatRequiresDataContract, description.Name, description.
DeclaringContract
.Name, description.
DeclaringContract
.Namespace)));
System\ServiceModel\Web\WebServiceHost.cs (1)
261
UriTemplateDispatchFormatter throwAway = new UriTemplateDispatchFormatter(operation, null, new QueryStringConverter(), operation.
DeclaringContract
.Name, new Uri("http://localhost"));
System.WorkflowServices (3)
System\ServiceModel\Description\DurableOperationAttribute.cs (2)
93
if (operationDescription.
DeclaringContract
== null)
107
operationDescription.
DeclaringContract
.SessionMode != SessionMode.NotAllowed);
System\Workflow\Activities\ServiceOperationHelpers.cs (1)
288
new KeyValuePair<Type, string>(opDescription.
DeclaringContract
.ContractType, opDescription.Name);