本文整理汇总了C#中System.Web.Services.Description.MimeMultipartRelatedBinding类的典型用法代码示例。如果您正苦于以下问题:C# MimeMultipartRelatedBinding类的具体用法?C# MimeMultipartRelatedBinding怎么用?C# MimeMultipartRelatedBinding使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MimeMultipartRelatedBinding类属于System.Web.Services.Description命名空间,在下文中一共展示了MimeMultipartRelatedBinding类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//引入命名空间
using System;
using System.Web.Services.Description;
namespace MimeContentBinding_work
{
class MyMimeContentClass
{
static void Main()
{
ServiceDescription myServicDescription =
ServiceDescription.Read("MimeMultiPartRelatedSample_cs.wsdl");
// Get the binding collection.
BindingCollection myBindingCollection = myServicDescription.Bindings;
int index =0;
for (int i= 0; i < myBindingCollection.Count;i++)
{
// Get the collection for MimeServiceHttpPost.
if( myBindingCollection[i].Name == "MimeServiceHttpPost")
{
OperationBindingCollection myOperationBindingCollection =
myBindingCollection[i].Operations;
OutputBinding myOutputBinding =
myOperationBindingCollection[0].Output;
ServiceDescriptionFormatExtensionCollection
myServiceDescriptionFormatExtensionCollection =
myOutputBinding.Extensions;
MimeMultipartRelatedBinding myMimeMultipartRelatedBinding =
(MimeMultipartRelatedBinding)
myServiceDescriptionFormatExtensionCollection.Find(
typeof(MimeMultipartRelatedBinding));
MimePartCollection myMimePartCollection =
myMimeMultipartRelatedBinding.Parts;
foreach( MimePart myMimePart in myMimePartCollection)
{
Console.WriteLine("Extension types added to MimePart: " +
index ++);
Console.WriteLine ("----------------------------");
foreach(object myExtension in myMimePart.Extensions)
Console.WriteLine(myExtension.GetType());
Console.WriteLine();
}
break;
}
}
}
}
}