本文整理汇总了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;
}
}
}
}
}
开发者ID:.NET开发者,项目名称:System.Web.Services.Description,代码行数:49,代码来源:MimeMultipartRelatedBinding
注:本文中的System.Web.Services.Description.MimeMultipartRelatedBinding类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论