本文整理汇总了C#中System.ServiceModel.Description.IOperationContractGenerationExtension.GenerateOperation方法的典型用法代码示例。如果您正苦于以下问题:C# IOperationContractGenerationExtension.GenerateOperation方法的具体用法?C# IOperationContractGenerationExtension.GenerateOperation怎么用?C# IOperationContractGenerationExtension.GenerateOperation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ServiceModel.Description.IOperationContractGenerationExtension
的用法示例。
在下文中一共展示了IOperationContractGenerationExtension.GenerateOperation方法的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.GenerateOperation
示例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.GenerateOperation