本文整理汇总了C#中System.Xml.XmlDictionaryWriter.WriteQualifiedName方法的典型用法代码示例。如果您正苦于以下问题:C# XmlDictionaryWriter.WriteQualifiedName方法的具体用法?C# XmlDictionaryWriter.WriteQualifiedName怎么用?C# XmlDictionaryWriter.WriteQualifiedName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlDictionaryWriter
的用法示例。
在下文中一共展示了XmlDictionaryWriter.WriteQualifiedName方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnWriteStartHeader
protected override void OnWriteStartHeader(XmlDictionaryWriter writer, MessageVersion messageVersion)
{
writer.WriteStartElement(this.Name, this.Namespace);
writer.WriteXmlnsAttribute(null, _notUnderstoodNs);
writer.WriteStartAttribute(Message12Strings.QName);
writer.WriteQualifiedName(_notUnderstoodName, _notUnderstoodNs);
writer.WriteEndAttribute();
}
示例2: OnWriteHeaderContents
protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
{
writer.WriteStartElement(WsrmFeb2005Strings.Prefix, WsrmFeb2005Strings.FaultCode, this.Namespace);
writer.WriteXmlnsAttribute(null, this.Namespace);
writer.WriteQualifiedName(this.Subcode, this.Namespace);
writer.WriteEndElement();
bool wsrm11 = this.ReliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11;
if (wsrm11)
{
writer.WriteStartElement(WsrmFeb2005Strings.Prefix, XD.Message12Dictionary.FaultDetail, this.DictionaryNamespace);
}
this.fault.WriteDetail(writer);
if (wsrm11)
{
writer.WriteEndElement();
}
}
示例3: OnWriteHeaderContents
protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
{
writer.WriteStartElement("r", "FaultCode", this.Namespace);
writer.WriteXmlnsAttribute(null, this.Namespace);
writer.WriteQualifiedName(this.Subcode, this.Namespace);
writer.WriteEndElement();
bool flag = base.ReliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11;
if (flag)
{
writer.WriteStartElement("r", XD.Message12Dictionary.FaultDetail, this.DictionaryNamespace);
}
this.fault.WriteDetail(writer);
if (flag)
{
writer.WriteEndElement();
}
}
示例4: OnWriteDetailContents
protected override void OnWriteDetailContents(XmlDictionaryWriter writer)
{
writer.WriteStartElement("ProblemHeaderQName", AddressingVersion.WSAddressing10.Namespace);
writer.WriteQualifiedName(this.invalidHeaderName, AddressingVersion.WSAddressing10.Namespace);
writer.WriteEndElement();
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:6,代码来源:WSAddressing10ProblemHeaderQNameFault.cs
示例5: OnWriteHeaderContents
protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
{
writer.WriteStartElement("ProblemHeaderQName", this.Namespace);
writer.WriteQualifiedName(this.invalidHeaderName, this.Namespace);
writer.WriteEndElement();
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:6,代码来源:WSAddressing10ProblemHeaderQNameFault.cs
示例6: WriteStartObject
public override void WriteStartObject (
XmlDictionaryWriter writer, object graph)
{
Type rootType = type;
if (root_name.Value == "")
throw new InvalidDataContractException ("Type '" + type.ToString () +
"' cannot have a DataContract attribute Name set to null or empty string.");
if (graph == null) {
if (names_filled)
writer.WriteStartElement (root_name.Value, root_ns.Value);
else
writer.WriteStartElement (root_name, root_ns);
writer.WriteAttributeString ("i", "nil", XmlSchema.InstanceNamespace, "true");
return;
}
QName instName = null;
QName root_qname = known_types.GetQName (rootType);
QName graph_qname = known_types.GetQName (graph.GetType ());
known_types.Add (graph.GetType ());
if (names_filled)
writer.WriteStartElement (root_name.Value, root_ns.Value);
else
writer.WriteStartElement (root_name, root_ns);
if (root_ns.Value != root_qname.Namespace)
if (root_qname.Namespace != KnownTypeCollection.MSSimpleNamespace)
writer.WriteXmlnsAttribute (null, root_qname.Namespace);
if (root_qname == graph_qname) {
if (root_qname.Namespace != KnownTypeCollection.MSSimpleNamespace &&
!rootType.IsEnum)
//FIXME: Hack, when should the "i:type" be written?
//Not used in case of enums
writer.WriteXmlnsAttribute ("i", XmlSchema.InstanceNamespace);
return;
}
/* Different names */
known_types.Add (rootType);
instName = KnownTypeCollection.GetPredefinedTypeName (graph.GetType ());
if (instName == QName.Empty)
/* Not a primitive type */
instName = graph_qname;
else
/* FIXME: Hack, .. see test WriteObject7 () */
instName = new QName (instName.Name, XmlSchema.Namespace);
// output xsi:type as rootType is not equivalent to the graph's type.
writer.WriteStartAttribute ("i", "type", XmlSchema.InstanceNamespace);
writer.WriteQualifiedName (instName.Name, instName.Namespace);
writer.WriteEndAttribute ();
}