本文整理汇总了C#中System.Web.Services.Description.MimeContentBinding类的典型用法代码示例。如果您正苦于以下问题:C# MimeContentBinding类的具体用法?C# MimeContentBinding怎么用?C# MimeContentBinding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MimeContentBinding类属于System.Web.Services.Description命名空间,在下文中一共展示了MimeContentBinding类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//引入命名空间
using System;
using System.Web.Services.Description;
namespace MimeContentBinding_work
{
class MyMimeContentClass
{
static void Main()
{
ServiceDescription myServiceDescription =
ServiceDescription.Read("MimeContentSample_cs.wsdl");
// Get the Binding.
Binding myBinding = myServiceDescription.Bindings["b1"];
// Get the first OperationBinding.
OperationBinding myOperationBinding = myBinding.Operations[0];
OutputBinding myOutputBinding = myOperationBinding.Output;
ServiceDescriptionFormatExtensionCollection
myServiceDescriptionFormatExtensionCollection =
myOutputBinding.Extensions;
// Find all MimeContentBinding objects in extensions.
MimeContentBinding[] myMimeContentBindings = (MimeContentBinding[])
myServiceDescriptionFormatExtensionCollection.FindAll(
typeof(MimeContentBinding));
// Enumerate the array and display MimeContentBinding properties.
foreach(MimeContentBinding myMimeContentBinding in
myMimeContentBindings)
{
Console.WriteLine("Type: " + myMimeContentBinding.Type);
Console.WriteLine("Part: " + myMimeContentBinding.Part);
}
Console.WriteLine("Namespace: " + MimeContentBinding.Namespace);
}
}
}