当前位置: 首页>>代码示例>>C#>>正文


C# XmlDictionaryWriter.WriteValue方法代码示例

本文整理汇总了C#中System.Xml.XmlDictionaryWriter.WriteValue方法的典型用法代码示例。如果您正苦于以下问题:C# XmlDictionaryWriter.WriteValue方法的具体用法?C# XmlDictionaryWriter.WriteValue怎么用?C# XmlDictionaryWriter.WriteValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Xml.XmlDictionaryWriter的用法示例。


在下文中一共展示了XmlDictionaryWriter.WriteValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnWriteAddressHeaderContents

        protected override void OnWriteAddressHeaderContents (XmlDictionaryWriter writer)
        {
            writer.WriteStartElement(XD.DotNetAtomicTransactionExternalDictionary.LocalTransactionId,
                                     XD.DotNetAtomicTransactionExternalDictionary.Namespace);

            writer.WriteValue(this.transactionId);
            writer.WriteEndElement();

            if (this.contextId != null)
            {
                writer.WriteStartElement(XD.DotNetAtomicTransactionExternalDictionary.ContextId,
                                         XD.DotNetAtomicTransactionExternalDictionary.Namespace);

                writer.WriteValue(this.contextId);
                writer.WriteEndElement();
            }

            if (this.tokenId != null)
            {
                writer.WriteStartElement(XD.DotNetAtomicTransactionExternalDictionary.TokenId,
                                         XD.DotNetAtomicTransactionExternalDictionary.Namespace);

                writer.WriteValue(this.tokenId);
                writer.WriteEndElement();
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:26,代码来源:WsatRegistrationHeader.cs

示例2: WriteAckRanges

 internal static void WriteAckRanges(XmlDictionaryWriter writer, ReliableMessagingVersion reliableMessagingVersion, UniqueId sequenceId, SequenceRangeCollection ranges)
 {
     WsrmFeb2005Dictionary dictionary = XD.WsrmFeb2005Dictionary;
     XmlDictionaryString namespaceUri = WsrmIndex.GetNamespace(reliableMessagingVersion);
     writer.WriteStartElement(dictionary.Identifier, namespaceUri);
     writer.WriteValue(sequenceId);
     writer.WriteEndElement();
     if (ranges.Count == 0)
     {
         if (reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessagingFebruary2005)
         {
             ranges = ranges.MergeWith((long) 0L);
         }
         else if (reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11)
         {
             writer.WriteStartElement(DXD.Wsrm11Dictionary.None, namespaceUri);
             writer.WriteEndElement();
         }
     }
     for (int i = 0; i < ranges.Count; i++)
     {
         writer.WriteStartElement(dictionary.AcknowledgementRange, namespaceUri);
         writer.WriteStartAttribute(dictionary.Lower, null);
         SequenceRange range = ranges[i];
         writer.WriteValue(range.Lower);
         writer.WriteEndAttribute();
         writer.WriteStartAttribute(dictionary.Upper, null);
         SequenceRange range2 = ranges[i];
         writer.WriteValue(range2.Upper);
         writer.WriteEndAttribute();
         writer.WriteEndElement();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:WsrmAcknowledgmentHeader.cs

示例3: OnWriteBodyContents

 protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
 {
     WsrmFeb2005Dictionary dictionary = XD.WsrmFeb2005Dictionary;
     XmlDictionaryString namespaceUri = WsrmIndex.GetNamespace(this.reliableMessagingVersion);
     writer.WriteStartElement(dictionary.CreateSequenceResponse, namespaceUri);
     writer.WriteStartElement(dictionary.Identifier, namespaceUri);
     writer.WriteValue(this.identifier);
     writer.WriteEndElement();
     if (this.expires.HasValue)
     {
         writer.WriteStartElement(dictionary.Expires, namespaceUri);
         writer.WriteValue(this.expires.Value);
         writer.WriteEndElement();
     }
     if (this.reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11)
     {
         Wsrm11Dictionary dictionary2 = DXD.Wsrm11Dictionary;
         writer.WriteStartElement(dictionary2.IncompleteSequenceBehavior, namespaceUri);
         writer.WriteValue(this.ordered ? dictionary2.DiscardFollowingFirstGap : dictionary2.NoDiscard);
         writer.WriteEndElement();
     }
     if (this.acceptAcksTo != null)
     {
         writer.WriteStartElement(dictionary.Accept, namespaceUri);
         this.acceptAcksTo.WriteTo(this.addressingVersion, writer, dictionary.AcksTo, namespaceUri);
         writer.WriteEndElement();
     }
     writer.WriteEndElement();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:29,代码来源:CreateSequenceResponse.cs

示例4: OnWriteAddressHeaderContents

 protected override void OnWriteAddressHeaderContents(XmlDictionaryWriter writer)
 {
     if (this.protocol != ControlProtocol.None)
     {
         writer.WriteStartAttribute(XD.DotNetAtomicTransactionExternalDictionary.Protocol, XD.DotNetAtomicTransactionExternalDictionary.Namespace);
         writer.WriteValue((int) this.protocol);
         writer.WriteEndAttribute();
     }
     writer.WriteValue(this.enlistment);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:EnlistmentHeader.cs

示例5: OnWriteHeaderContents

 protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
 {
     WsrmFeb2005Dictionary dictionary = XD.WsrmFeb2005Dictionary;
     XmlDictionaryString dictionaryNamespace = this.DictionaryNamespace;
     writer.WriteStartElement(dictionary.Identifier, dictionaryNamespace);
     writer.WriteValue(this.sequenceID);
     writer.WriteEndElement();
     writer.WriteStartElement(dictionary.MessageNumber, dictionaryNamespace);
     writer.WriteValue(this.sequenceNumber);
     writer.WriteEndElement();
     if ((base.ReliableMessagingVersion == ReliableMessagingVersion.WSReliableMessagingFebruary2005) && this.lastMessage)
     {
         writer.WriteStartElement(dictionary.LastMessage, dictionaryNamespace);
         writer.WriteEndElement();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:WsrmSequencedMessageHeader.cs

示例6: OnWriteBodyContents

 protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
 {
     XmlDictionaryString namespaceUri = WsrmIndex.GetNamespace(ReliableMessagingVersion.WSReliableMessaging11);
     Wsrm11Dictionary dictionary = DXD.Wsrm11Dictionary;
     writer.WriteStartElement(dictionary.CloseSequence, namespaceUri);
     writer.WriteStartElement(XD.WsrmFeb2005Dictionary.Identifier, namespaceUri);
     writer.WriteValue(this.identifier);
     writer.WriteEndElement();
     if (this.lastMsgNumber > 0L)
     {
         writer.WriteStartElement(dictionary.LastMsgNumber, namespaceUri);
         writer.WriteValue(this.lastMsgNumber);
         writer.WriteEndElement();
     }
     writer.WriteEndElement();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:CloseSequence.cs

示例7: WriteJson

            public void WriteJson(XmlDictionaryWriter writer)
            {
                writer.WriteStartElement(MetadataStrings.TypeString);
                writer.WriteAttributeString("type", "string");
                writer.WriteString(String.Format("{0}{1}{2}", this.TypeName, MetadataStrings.NamespaceMarker, this.TypeNamespace));
                writer.WriteEndElement();

                writer.WriteStartElement(MetadataStrings.KeyString);
                writer.WriteAttributeString("type", "array");
                foreach (string keyitem in this.Key)
                {
                    writer.WriteStartElement("item");
                    writer.WriteAttributeString("type", "string");
                    writer.WriteValue(keyitem);
                    writer.WriteEndElement();
                }
                writer.WriteEndElement();

                writer.WriteStartElement(MetadataStrings.FieldsString);
                writer.WriteAttributeString("type", "object");
                foreach (TypePropertyMetadata field in this.Properties)
                {
                    field.WriteJson(writer);
                }
                writer.WriteEndElement();

                this.WriteValidationRulesMetadata(writer);
            }
开发者ID:OpenRIAServices,项目名称:OpenRiaServices,代码行数:28,代码来源:ServiceMetadataGenerator.cs

示例8: WriteObjectContent

 public override void WriteObjectContent(XmlDictionaryWriter writer, object graph)
 {
     var data = Serialize(graph);
     if (UseEncryption())
         data = Encrypt(data);
     var content = Convert.ToBase64String(data);
     writer.WriteValue(content);
 }
开发者ID:Turntwo,项目名称:nvents,代码行数:8,代码来源:EncryptableNetDataContractSerializer.cs

示例9: OnWriteHeaderContents

 protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
 {
     WsrmFeb2005Dictionary dictionary = XD.WsrmFeb2005Dictionary;
     XmlDictionaryString dictionaryNamespace = this.DictionaryNamespace;
     writer.WriteStartElement(dictionary.Identifier, dictionaryNamespace);
     writer.WriteValue(this.sequenceID);
     writer.WriteEndElement();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:WsrmAckRequestedHeader.cs

示例10: OnWriteBodyContents

 protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
 {
     XmlDictionaryString wsrmNs = WsrmIndex.GetNamespace(ReliableMessagingVersion.WSReliableMessaging11);
     writer.WriteStartElement(DXD.Wsrm11Dictionary.TerminateSequenceResponse, wsrmNs);
     writer.WriteStartElement(XD.WsrmFeb2005Dictionary.Identifier, wsrmNs);
     writer.WriteValue(this.identifier);
     writer.WriteEndElement();
     writer.WriteEndElement();
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:9,代码来源:TerminateSequenceResponse.cs

示例11: OnWriteDetailContents

 protected override void OnWriteDetailContents(XmlDictionaryWriter writer)
 {
     ReliableMessagingVersion reliableMessagingVersion = base.GetReliableMessagingVersion();
     WsrmUtilities.WriteIdentifier(writer, reliableMessagingVersion, base.SequenceID);
     if (reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11)
     {
         writer.WriteStartElement("r", DXD.Wsrm11Dictionary.MaxMessageNumber, WsrmIndex.GetNamespace(reliableMessagingVersion));
         writer.WriteValue((long) 0x7fffffffffffffffL);
         writer.WriteEndElement();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:MessageNumberRolloverFault.cs

示例12: OnWriteHeaderContents

 protected override void OnWriteHeaderContents(
     XmlDictionaryWriter writer,
     MessageVersion messageVersion)
 {
     if (null == writer) {
         throw new ArgumentNullException("writer");
     }
     writer.WriteStartElement("Property", this.Namespace);
     writer.WriteAttributeString("name", null, "instanceId");
     writer.WriteValue(Value);
     writer.WriteEndElement();
 }
开发者ID:Predica,项目名称:FimClient,代码行数:12,代码来源:ContextMessageHeader.cs

示例13: OnWriteBodyContents

        protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
        {
            WsrmFeb2005Dictionary wsrmFeb2005Dictionary = XD.WsrmFeb2005Dictionary;
            XmlDictionaryString wsrmNs = WsrmIndex.GetNamespace(this.reliableMessagingVersion);
            writer.WriteStartElement(wsrmFeb2005Dictionary.TerminateSequence, wsrmNs);
            writer.WriteStartElement(wsrmFeb2005Dictionary.Identifier, wsrmNs);
            writer.WriteValue(this.identifier);
            writer.WriteEndElement();

            if (this.reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11)
            {
                if (this.lastMsgNumber > 0)
                {
                    writer.WriteStartElement(DXD.Wsrm11Dictionary.LastMsgNumber, wsrmNs);
                    writer.WriteValue(this.lastMsgNumber);
                    writer.WriteEndElement();
                }
            }

            writer.WriteEndElement();
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:21,代码来源:TerminateSequence.cs

示例14: WriteTo

 public void WriteTo(XmlDictionaryWriter writer)
 {
     writer.WriteStartElement(this.coordinationStrings.Prefix, this.coordinationXmlDictionaryStrings.Register, this.coordinationXmlDictionaryStrings.Namespace);
     XmlDictionaryString str = WSAtomicTransactionStrings.ProtocolToWellKnownName(this.Protocol, this.protocolVersion);
     writer.WriteStartElement(this.coordinationXmlDictionaryStrings.Protocol, this.coordinationXmlDictionaryStrings.Namespace);
     writer.WriteString(str);
     writer.WriteEndElement();
     this.ParticipantProtocolService.WriteTo(MessagingVersionHelper.AddressingVersion(this.protocolVersion), writer, this.coordinationXmlDictionaryStrings.ParticipantProtocolService, this.coordinationXmlDictionaryStrings.Namespace);
     if (this.Loopback != Guid.Empty)
     {
         writer.WriteStartElement("mstx", XD.DotNetAtomicTransactionExternalDictionary.Loopback, XD.DotNetAtomicTransactionExternalDictionary.Namespace);
         writer.WriteValue(this.Loopback);
         writer.WriteEndElement();
     }
     writer.WriteEndElement();
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:16,代码来源:Register.cs

示例15: OnWriteHeaderContents

 protected override void OnWriteHeaderContents(XmlDictionaryWriter writer, MessageVersion messageVersion)
 {
     WsrmFeb2005Dictionary dictionary = XD.WsrmFeb2005Dictionary;
     XmlDictionaryString dictionaryNamespace = this.DictionaryNamespace;
     WriteAckRanges(writer, base.ReliableMessagingVersion, this.sequenceID, this.ranges);
     if ((base.ReliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11) && this.final)
     {
         writer.WriteStartElement(DXD.Wsrm11Dictionary.Final, dictionaryNamespace);
         writer.WriteEndElement();
     }
     if (this.bufferRemaining != -1)
     {
         writer.WriteStartElement("netrm", dictionary.BufferRemaining, XD.WsrmFeb2005Dictionary.NETNamespace);
         writer.WriteValue(this.bufferRemaining);
         writer.WriteEndElement();
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:WsrmAcknowledgmentHeader.cs


注:本文中的System.Xml.XmlDictionaryWriter.WriteValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。