當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。