本文整理汇总了C#中System.ServiceModel.Description.IOperationContractGenerationExtension接口的典型用法代码示例。如果您正苦于以下问题:C# IOperationContractGenerationExtension接口的具体用法?C# IOperationContractGenerationExtension怎么用?C# IOperationContractGenerationExtension使用的例子?那么恭喜您, 这里精选的接口代码示例或许可以为您提供帮助。
IOperationContractGenerationExtension接口属于System.ServiceModel.Description命名空间,在下文中一共展示了IOperationContractGenerationExtension接口的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ImportContract
public void ImportContract(WsdlImporter importer, WsdlContractConversionContext context)
{
Console.Write("ImportContract");
// Contract Documentation
if (context.WsdlPortType.Documentation != null)
{
context.Contract.Behaviors.Add(new WsdlDocumentationImporter(context.WsdlPortType.Documentation));
}
// Operation Documentation
foreach (Operation operation in context.WsdlPortType.Operations)
{
if (operation.Documentation != null)
{
OperationDescription operationDescription = context.Contract.Operations.Find(operation.Name);
if (operationDescription != null)
{
operationDescription.Behaviors.Add(new WsdlDocumentationImporter(operation.Documentation));
}
}
}
}
开发者ID:.NET开发者,项目名称:System.ServiceModel.Description,代码行数:21,代码来源:IOperationContractGenerationExtension
示例2:
/// From WSDL Documentation:
///
/// <summary>The string for the Name data member.</summary>
///
[System.Runtime.Serialization.DataMemberAttribute()]
public string Name
{
get
{
return this.NameField;
}
set
{
this.NameField = value;
}
}
开发者ID:.NET开发者,项目名称:System.ServiceModel.Description,代码行数:16,代码来源:IOperationContractGenerationExtension