本文整理汇总了C#中System.ServiceModel.Description.IServiceContractGenerationExtension.GenerateContract方法的典型用法代码示例。如果您正苦于以下问题:C# IServiceContractGenerationExtension.GenerateContract方法的具体用法?C# IServiceContractGenerationExtension.GenerateContract怎么用?C# IServiceContractGenerationExtension.GenerateContract使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ServiceModel.Description.IServiceContractGenerationExtension
的用法示例。
在下文中一共展示了IServiceContractGenerationExtension.GenerateContract方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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,代码来源:IServiceContractGenerationExtension.GenerateContract
示例2: GenerateContract
public void GenerateContract(ServiceContractGenerationContext context)
{
Console.WriteLine("In generate contract.");
context.ContractType.Comments.AddRange(Formatter.FormatComments(commentText));
}
开发者ID:.NET开发者,项目名称:System.ServiceModel.Description,代码行数:5,代码来源:IServiceContractGenerationExtension.GenerateContract
示例3:
/// 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,代码来源:IServiceContractGenerationExtension.GenerateContract