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


C# Xml.XmlDictionaryString类代码示例

本文整理汇总了C#中System.Xml.XmlDictionaryString的典型用法代码示例。如果您正苦于以下问题:C# XmlDictionaryString类的具体用法?C# XmlDictionaryString怎么用?C# XmlDictionaryString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: EnvelopeVersion

        private EnvelopeVersion(string ultimateReceiverActor, string nextDestinationActorValue,
            string ns, XmlDictionaryString dictionaryNs, string actor, XmlDictionaryString dictionaryActor,
            string toStringFormat, string senderFaultName, string receiverFaultName)
        {
            _toStringFormat = toStringFormat;
            _ultimateDestinationActor = ultimateReceiverActor;
            _nextDestinationActorValue = nextDestinationActorValue;
            _ns = ns;
            _dictionaryNs = dictionaryNs;
            _actor = actor;
            _dictionaryActor = dictionaryActor;
            _senderFaultName = senderFaultName;
            _receiverFaultName = receiverFaultName;

            if (ultimateReceiverActor != null)
            {
                if (ultimateReceiverActor.Length == 0)
                {
                    _mustUnderstandActorValues = new string[] { "", nextDestinationActorValue };
                    _ultimateDestinationActorValues = new string[] { "", nextDestinationActorValue };
                }
                else
                {
                    _mustUnderstandActorValues = new string[] { "", ultimateReceiverActor, nextDestinationActorValue };
                    _ultimateDestinationActorValues = new string[] { "", ultimateReceiverActor, nextDestinationActorValue };
                }
            }
        }
开发者ID:dmetzgar,项目名称:wcf,代码行数:28,代码来源:EnvelopeVersion.cs

示例2: Add

        public XmlDictionaryString Add(int id, string value)
        {
            if (id < 0)
                throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException(SR.Format(SR.XmlInvalidID)));
            if (value == null)
                throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("value");
            XmlDictionaryString xmlString;
            if (TryLookup(id, out xmlString))
                throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR.Format(SR.XmlIDDefined)));

            xmlString = new XmlDictionaryString(this, value, id);
            if (id >= MaxArrayEntries)
            {
                if (_stringDict == null)
                    _stringDict = new Dictionary<int, XmlDictionaryString>();

                _stringDict.Add(id, xmlString);
            }
            else
            {
                if (_strings == null)
                {
                    _strings = new XmlDictionaryString[Math.Max(id + 1, 16)];
                }
                else if (id >= _strings.Length)
                {
                    XmlDictionaryString[] newStrings = new XmlDictionaryString[Math.Min(Math.Max(id + 1, _strings.Length * 2), MaxArrayEntries)];
                    Array.Copy(_strings, 0, newStrings, 0, _strings.Length);
                    _strings = newStrings;
                }
                _strings[id] = xmlString;
            }
            return xmlString;
        }
开发者ID:SGuyGe,项目名称:corefx,代码行数:34,代码来源:XmlBinaryReaderSession.cs

示例3: CheckActualArrayLength

 private void CheckActualArrayLength(int expectedLength, int actualLength, XmlDictionaryString itemName, XmlDictionaryString itemNamespace)
 {
     if (expectedLength != actualLength)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(XmlObjectSerializer.CreateSerializationException(System.Runtime.Serialization.SR.GetString("ArrayExceededSizeAttribute", new object[] { expectedLength, itemName.Value, itemNamespace.Value })));
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:XmlReaderDelegator.cs

示例4: TryResolveType

        public override bool TryResolveType(Type type, Type declaredType,
        DataContractResolver knownTypeResolver,
        out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace)
        {
            if (knownTypeResolver.TryResolveType(type, declaredType,
              null, out typeName, out typeNamespace))
            return true;

              string typeNameString = null;
              if (Resolver.IsCollection(type))
              {
            TryGetCollectionTypeName(type, knownTypeResolver, out typeNameString);
              }
              else if (Resolver.IsArray(type))
              {
            TryGetArrayTypeName(type, knownTypeResolver, out typeNameString);
              }

              if (typeNameString != null)
              {
            typeNamespace = new XmlDictionaryString(XmlDictionary.Empty, Namespaces.DEFAULT, 0);
            typeName = new XmlDictionaryString(XmlDictionary.Empty, typeNameString, 0);
            return true;
              }
              return false;
        }
开发者ID:sunoru,项目名称:PBO,代码行数:26,代码来源:Resolver.cs

示例5: TryLookup

 public bool TryLookup(XmlDictionaryString key, out XmlDictionaryString value)
 {
     if (key == null)
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("key"));
     if (key.Dictionary == this)
     {
         value = key;
         return true;
     }
     if (key.Dictionary == CurrentVersion)
     {
         if (_versionedDictionaryStrings == null)
             _versionedDictionaryStrings = new XmlDictionaryString[CurrentVersion._count];
         XmlDictionaryString s = _versionedDictionaryStrings[key.Key];
         if (s == null)
         {
             if (!TryLookup(key.Value, out s))
             {
                 value = null;
                 return false;
             }
             _versionedDictionaryStrings[key.Key] = s;
         }
         value = s;
         return true;
     }
     value = null;
     return false;
 }
开发者ID:weshaggard,项目名称:wcf,代码行数:29,代码来源:IdentityModelDictionary.cs

示例6: TryLookup

 public bool TryLookup(int key, out XmlDictionaryString value)
 {
     const int keyThreshold = 32;
     if (key < 0 || key >= count)
     {
         value = null;
         return false;
     }
     XmlDictionaryString s;
     if (key < keyThreshold)
     {
         if (dictionaryStrings1 == null)
             dictionaryStrings1 = new XmlDictionaryString[keyThreshold];
         s = dictionaryStrings1[key];
         if (s == null)
         {
             s = CreateString(strings[key], key);
             dictionaryStrings1[key] = s;
         }
     }
     else
     {
         if (dictionaryStrings2 == null)
             dictionaryStrings2 = new XmlDictionaryString[count - keyThreshold];
         s = dictionaryStrings2[key - keyThreshold];
         if (s == null)
         {
             s = CreateString(strings[key], key);
             dictionaryStrings2[key - keyThreshold] = s;
         }
     }
     value = s;
     return true;
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:34,代码来源:ServiceModelDictionary.cs

示例7: EnvelopeVersion

        EnvelopeVersion(string ultimateReceiverActor, string nextDestinationActorValue,
            string ns, XmlDictionaryString dictionaryNs, string actor, XmlDictionaryString dictionaryActor,
            string toStringFormat, string senderFaultName, string receiverFaultName)
        {
            this.toStringFormat = toStringFormat;
            this.ultimateDestinationActor = ultimateReceiverActor;
            this.nextDestinationActorValue = nextDestinationActorValue;
            this.ns = ns;
            this.dictionaryNs = dictionaryNs;
            this.actor = actor;
            this.dictionaryActor = dictionaryActor;
            this.senderFaultName = senderFaultName;
            this.receiverFaultName = receiverFaultName;

            if (ultimateReceiverActor != null)
            {
                if (ultimateReceiverActor.Length == 0)
                {
                    mustUnderstandActorValues = new string[] { "", nextDestinationActorValue };
                    ultimateDestinationActorValues = new string[] { "", nextDestinationActorValue };
                }
                else
                {
                    mustUnderstandActorValues = new string[] { "", ultimateReceiverActor, nextDestinationActorValue };
                    ultimateDestinationActorValues = new string[] { "", ultimateReceiverActor, nextDestinationActorValue };
                }
            }
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:28,代码来源:EnvelopeVersion.cs

示例8: ReflectionInitArgs

 private void ReflectionInitArgs(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString[] memberNames, XmlDictionaryString[] memberNamespaces)
 {
     _arg0XmlReader = xmlReader;
     _arg1Context = context;
     _arg2MemberNames = memberNames;
     _arg3MemberNamespaces = memberNamespaces;
 }
开发者ID:SGuyGe,项目名称:corefx,代码行数:7,代码来源:ReflectionXmlFormatReader.cs

示例9: IsLocalName

 internal bool IsLocalName(XmlDictionaryString localName)
 {
     if (dictionaryReader == null)
         return localName.Value == reader.LocalName;
     else
         return dictionaryReader.IsLocalName(localName);
 }
开发者ID:ESgarbi,项目名称:corefx,代码行数:7,代码来源:XmlReaderDelegator.cs

示例10: ReflectionReadMembers

 private void ReflectionReadMembers(object obj, XmlReaderDelegator xmlReader, XmlObjectSerializerReadContext context, XmlDictionaryString[] memberNames, XmlDictionaryString[] memberNamespaces)
 {
     int memberCount = _classContract.MemberNames.Length;
     context.IncrementItemCount(memberCount);
     int memberIndex = -1;
     int firstRequiredMember;
     bool[] requiredMembers = GetRequiredMembers(_classContract, out firstRequiredMember);
     bool hasRequiredMembers = (firstRequiredMember < memberCount);
     int requiredIndex = hasRequiredMembers ? firstRequiredMember : -1;
     int index = -1;
     while (true)
     {
         if (!XmlObjectSerializerReadContext.MoveToNextElement(xmlReader))
         {
             return;
         }
         if (hasRequiredMembers)
         {
             index = context.GetMemberIndexWithRequiredMembers(xmlReader, memberNames, memberNamespaces, memberIndex, requiredIndex, null);
         }
         else
         {
             index = context.GetMemberIndex(xmlReader, memberNames, memberNamespaces, memberIndex, null);
         }
         ReflectionReadMember(obj, index, xmlReader, context, memberNames, memberNamespaces);
         memberIndex = index;
         requiredIndex = index + 1;
     }
 }
开发者ID:SGuyGe,项目名称:corefx,代码行数:29,代码来源:ReflectionXmlFormatReader.cs

示例11: TryResolveType

		public override bool TryResolveType (Type type, Type declaredType, DataContractResolver knownTypeResolver, out XmlDictionaryString typeName, out XmlDictionaryString typeNamespace)
		{
			//Console.WriteLine ("TryResolveType: {0} {1}", type, declaredType);
			if (knownTypeResolver.TryResolveType (type, declaredType, null, out typeName, out typeNamespace))
				return true;
			return SafeResolveType (type, out typeName, out typeNamespace);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:DataContractResolverTest.cs

示例12: GetJsonMemberIndex

 public int GetJsonMemberIndex(XmlReaderDelegator xmlReader, XmlDictionaryString[] memberNames, int memberIndex, ExtensionDataObject extensionData)
 {
     int length = memberNames.Length;
     if (length != 0)
     {
         for (int i = 0, index = (memberIndex + 1) % length; i < length; i++, index = (index + 1) % length)
         {
             if (xmlReader.IsStartElement(memberNames[index], XmlDictionaryString.Empty))
             {
                 return index;
             }
         }
         string name;
         if (TryGetJsonLocalName(xmlReader, out name))
         {
             for (int i = 0, index = (memberIndex + 1) % length; i < length; i++, index = (index + 1) % length)
             {
                 if (memberNames[index].Value == name)
                 {
                     return index;
                 }
             }
         }
     }
     HandleMemberNotFound(xmlReader, extensionData, memberIndex);
     return length;
 }
开发者ID:noahfalk,项目名称:corefx,代码行数:27,代码来源:XmlObjectSerializerReadContextComplexJson.cs

示例13: SecurityJan2004Dictionary

 public SecurityJan2004Dictionary(ServiceModelDictionary dictionary)
 {
     this.SecurityTokenReference = dictionary.CreateString("SecurityTokenReference", 30);
     this.Namespace = dictionary.CreateString("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", 0x24);
     this.Security = dictionary.CreateString("Security", 0x34);
     this.ValueType = dictionary.CreateString("ValueType", 0x3a);
     this.TypeAttribute = dictionary.CreateString("Type", 0x3b);
     this.Prefix = dictionary.CreateString("o", 0xa4);
     this.NonceElement = dictionary.CreateString("Nonce", 40);
     this.PasswordElement = dictionary.CreateString("Password", 0xa5);
     this.PasswordTextName = dictionary.CreateString("PasswordText", 0xa6);
     this.UserNameElement = dictionary.CreateString("Username", 0xa7);
     this.UserNameTokenElement = dictionary.CreateString("UsernameToken", 0xa8);
     this.BinarySecurityToken = dictionary.CreateString("BinarySecurityToken", 0xa9);
     this.EncodingType = dictionary.CreateString("EncodingType", 170);
     this.Reference = dictionary.CreateString("Reference", 12);
     this.URI = dictionary.CreateString("URI", 11);
     this.KeyIdentifier = dictionary.CreateString("KeyIdentifier", 0xab);
     this.EncodingTypeValueBase64Binary = dictionary.CreateString("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary", 0xac);
     this.EncodingTypeValueHexBinary = dictionary.CreateString("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#HexBinary", 0xad);
     this.EncodingTypeValueText = dictionary.CreateString("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Text", 0xae);
     this.X509SKIValueType = dictionary.CreateString("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509SubjectKeyIdentifier", 0xaf);
     this.KerberosTokenTypeGSS = dictionary.CreateString("http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ", 0xb0);
     this.KerberosTokenType1510 = dictionary.CreateString("http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#GSS_Kerberosv5_AP_REQ1510", 0xb1);
     this.SamlAssertionIdValueType = dictionary.CreateString("http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#SAMLAssertionID", 0xb2);
     this.SamlAssertion = dictionary.CreateString("Assertion", 0xb3);
     this.SamlUri = dictionary.CreateString("urn:oasis:names:tc:SAML:1.0:assertion", 180);
     this.RelAssertionValueType = dictionary.CreateString("http://docs.oasis-open.org/wss/oasis-wss-rel-token-profile-1.0.pdf#license", 0xb5);
     this.FailedAuthenticationFaultCode = dictionary.CreateString("FailedAuthentication", 0xb6);
     this.InvalidSecurityTokenFaultCode = dictionary.CreateString("InvalidSecurityToken", 0xb7);
     this.InvalidSecurityFaultCode = dictionary.CreateString("InvalidSecurity", 0xb8);
     this.KerberosHashValueType = dictionary.CreateString("http://docs.oasis-open.org/wss/oasis-wss-kerberos-token-profile-1.1#Kerberosv5APREQSHA1", 0x1ab);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:SecurityJan2004Dictionary.cs

示例14: SecurityAlgorithmDictionary

 public SecurityAlgorithmDictionary(ServiceModelDictionary dictionary)
 {
     this.Aes128Encryption = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#aes128-cbc", 0x8a);
     this.Aes128KeyWrap = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#kw-aes128", 0x8b);
     this.Aes192Encryption = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#aes192-cbc", 140);
     this.Aes192KeyWrap = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#kw-aes192", 0x8d);
     this.Aes256Encryption = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#aes256-cbc", 0x8e);
     this.Aes256KeyWrap = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#kw-aes256", 0x8f);
     this.DesEncryption = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#des-cbc", 0x90);
     this.DsaSha1Signature = dictionary.CreateString("http://www.w3.org/2000/09/xmldsig#dsa-sha1", 0x91);
     this.ExclusiveC14n = dictionary.CreateString("http://www.w3.org/2001/10/xml-exc-c14n#", 0x6f);
     this.ExclusiveC14nWithComments = dictionary.CreateString("http://www.w3.org/2001/10/xml-exc-c14n#WithComments", 0x92);
     this.HmacSha1Signature = dictionary.CreateString("http://www.w3.org/2000/09/xmldsig#hmac-sha1", 0x93);
     this.HmacSha256Signature = dictionary.CreateString("http://www.w3.org/2001/04/xmldsig-more#hmac-sha256", 0x94);
     this.Psha1KeyDerivation = dictionary.CreateString("http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1", 0x95);
     this.Ripemd160Digest = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#ripemd160", 150);
     this.RsaOaepKeyWrap = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", 0x97);
     this.RsaSha1Signature = dictionary.CreateString("http://www.w3.org/2000/09/xmldsig#rsa-sha1", 0x98);
     this.RsaSha256Signature = dictionary.CreateString("http://www.w3.org/2001/04/xmldsig-more#rsa-sha256", 0x99);
     this.RsaV15KeyWrap = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#rsa-1_5", 0x9a);
     this.Sha1Digest = dictionary.CreateString("http://www.w3.org/2000/09/xmldsig#sha1", 0x9b);
     this.Sha256Digest = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#sha256", 0x9c);
     this.Sha512Digest = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#sha512", 0x9d);
     this.TripleDesEncryption = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#tripledes-cbc", 0x9e);
     this.TripleDesKeyWrap = dictionary.CreateString("http://www.w3.org/2001/04/xmlenc#kw-tripledes", 0x9f);
     this.TlsSspiKeyWrap = dictionary.CreateString("http://schemas.xmlsoap.org/2005/02/trust/tlsnego#TLS_Wrap", 160);
     this.WindowsSspiKeyWrap = dictionary.CreateString("http://schemas.xmlsoap.org/2005/02/trust/spnego#GSS_Wrap", 0xa1);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:28,代码来源:SecurityAlgorithmDictionary.cs

示例15: AddressingDictionary

 public AddressingDictionary(ServiceModelDictionary dictionary)
 {
     this.Action = dictionary.CreateString("Action", 5);
     this.To = dictionary.CreateString("To", 6);
     this.RelatesTo = dictionary.CreateString("RelatesTo", 9);
     this.MessageId = dictionary.CreateString("MessageID", 13);
     this.Address = dictionary.CreateString("Address", 0x15);
     this.ReplyTo = dictionary.CreateString("ReplyTo", 0x16);
     this.Empty = dictionary.CreateString("", 0x51);
     this.From = dictionary.CreateString("From", 0x52);
     this.FaultTo = dictionary.CreateString("FaultTo", 0x53);
     this.EndpointReference = dictionary.CreateString("EndpointReference", 0x54);
     this.PortType = dictionary.CreateString("PortType", 0x55);
     this.ServiceName = dictionary.CreateString("ServiceName", 0x56);
     this.PortName = dictionary.CreateString("PortName", 0x57);
     this.ReferenceProperties = dictionary.CreateString("ReferenceProperties", 0x58);
     this.RelationshipType = dictionary.CreateString("RelationshipType", 0x59);
     this.Reply = dictionary.CreateString("Reply", 90);
     this.Prefix = dictionary.CreateString("a", 0x5b);
     this.IdentityExtensionNamespace = dictionary.CreateString("http://schemas.xmlsoap.org/ws/2006/02/addressingidentity", 0x5c);
     this.Identity = dictionary.CreateString("Identity", 0x5d);
     this.Spn = dictionary.CreateString("Spn", 0x5e);
     this.Upn = dictionary.CreateString("Upn", 0x5f);
     this.Rsa = dictionary.CreateString("Rsa", 0x60);
     this.Dns = dictionary.CreateString("Dns", 0x61);
     this.X509v3Certificate = dictionary.CreateString("X509v3Certificate", 0x62);
     this.ReferenceParameters = dictionary.CreateString("ReferenceParameters", 100);
     this.IsReferenceParameter = dictionary.CreateString("IsReferenceParameter", 0x65);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:29,代码来源:AddressingDictionary.cs


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