本文整理汇总了C#中System.Web.Services.Description.ServiceDescription.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# ServiceDescription.GetType方法的具体用法?C# ServiceDescription.GetType怎么用?C# ServiceDescription.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Services.Description.ServiceDescription
的用法示例。
在下文中一共展示了ServiceDescription.GetType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write124_ServiceDescription
private void Write124_ServiceDescription(string n, string ns, ServiceDescription o, bool isNullable, bool needType)
{
if (o == null)
{
if (isNullable)
{
base.WriteNullTagLiteral(n, ns);
}
}
else
{
if (!needType && !(o.GetType() == typeof(ServiceDescription)))
{
throw base.CreateUnknownTypeException(o);
}
base.WriteStartElement(n, ns, o, false, o.Namespaces);
if (needType)
{
base.WriteXsiType("ServiceDescription", "http://schemas.xmlsoap.org/wsdl/");
}
XmlAttribute[] extensibleAttributes = o.ExtensibleAttributes;
if (extensibleAttributes != null)
{
for (int i = 0; i < extensibleAttributes.Length; i++)
{
XmlAttribute node = extensibleAttributes[i];
base.WriteXmlAttribute(node, o);
}
}
base.WriteAttribute("name", "", o.Name);
base.WriteAttribute("targetNamespace", "", o.TargetNamespace);
if ((o.DocumentationElement == null) && (o.DocumentationElement != null))
{
throw base.CreateInvalidAnyTypeException(o.DocumentationElement);
}
base.WriteElementLiteral(o.DocumentationElement, "documentation", "http://schemas.xmlsoap.org/wsdl/", false, true);
ServiceDescriptionFormatExtensionCollection extensions = o.Extensions;
if (extensions != null)
{
for (int j = 0; j < extensions.Count; j++)
{
if (!(extensions[j] is XmlNode) && (extensions[j] != null))
{
throw base.CreateInvalidAnyTypeException(extensions[j]);
}
base.WriteElementLiteral((XmlNode) extensions[j], "", null, false, true);
}
}
ImportCollection imports = o.Imports;
if (imports != null)
{
for (int k = 0; k < imports.Count; k++)
{
this.Write4_Import("import", "http://schemas.xmlsoap.org/wsdl/", imports[k], false, false);
}
}
this.Write67_Types("types", "http://schemas.xmlsoap.org/wsdl/", o.Types, false, false);
MessageCollection messages = o.Messages;
if (messages != null)
{
for (int m = 0; m < messages.Count; m++)
{
this.Write69_Message("message", "http://schemas.xmlsoap.org/wsdl/", messages[m], false, false);
}
}
PortTypeCollection portTypes = o.PortTypes;
if (portTypes != null)
{
for (int num5 = 0; num5 < portTypes.Count; num5++)
{
this.Write75_PortType("portType", "http://schemas.xmlsoap.org/wsdl/", portTypes[num5], false, false);
}
}
BindingCollection bindings = o.Bindings;
if (bindings != null)
{
for (int num6 = 0; num6 < bindings.Count; num6++)
{
this.Write117_Binding("binding", "http://schemas.xmlsoap.org/wsdl/", bindings[num6], false, false);
}
}
ServiceCollection services = o.Services;
if (services != null)
{
for (int num7 = 0; num7 < services.Count; num7++)
{
this.Write123_Service("service", "http://schemas.xmlsoap.org/wsdl/", services[num7], false, false);
}
}
base.WriteEndElement(o);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:92,代码来源:ServiceDescriptionSerializationWriter.cs