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


C# IDictionaryEnumerator类代码示例

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


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

示例1: SendMessageToUser

        public override void SendMessageToUser(IDictionaryEnumerator pp, string sMes, string sTitle)
        {
            Console.WriteLine("SendMessageToUser " + pp.Value.ToString());
            string attach_post_key = "";
            string auth_key = "";
            m_Client.Referer = ForumPath + "/index.php?act=Msg&CODE=4&MID=" + pp.Key.ToString();
            m_Response = m_Client.DownloadString(m_sForumPath + "/index.php?act=Msg&CODE=4&MID=" + pp.Key.ToString());
            Match mc1 = Regex.Match(m_Response, "attach_post_key\" value\\=\"(.*)\"\\s*\\/\\>");
            if (mc1.Success)
            {
                attach_post_key = mc1.Groups[1].Value;
            }

            mc1 = Regex.Match(m_Response, "auth_key\" value\\=\"(.*)\"\\s*\\/\\>");
            if (mc1.Success)
            {
                auth_key = mc1.Groups[1].Value;
            }

            string POSTDATA =
                "removeattachid=0" +
                "&OID=0" +
                "&act=Msg" +
                "&CODE=04" +
                "&MODE=01" +
                "&attach_post_key=" + attach_post_key +
                "&auth_key=" + auth_key +
                "&entered_name=" + pp.Value.ToString() +
                "&carbon_copy=" +
                "&msg_title=" + sTitle +
                "&ed-0_wysiwyg_used=0" +
                "&editor_ids%5B%5D=ed-0" +
                "&Post=" + sMes;
            m_Response = m_Client.UploadString(m_sForumPath + "/index.php?act=msg", POSTDATA);
        }
开发者ID:sasha237,项目名称:NorthCitadel,代码行数:35,代码来源:ForumBotIPB.cs

示例2: CreateEnumerator

 internal override IDictionaryEnumerator CreateEnumerator()
 {
     IDictionaryEnumerator[] enumerators = new IDictionaryEnumerator[this._caches.Length];
     int index = 0;
     int length = this._caches.Length;
     while (index < length)
     {
         enumerators[index] = this._caches[index].CreateEnumerator();
         index++;
     }
     return new AggregateEnumerator(enumerators);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:CacheMultiple.cs

示例3: PackageKeys

        internal static void PackageKeys(IDictionaryEnumerator dicEnu, out string keyPackage, out int keyCount)
        {
            StringBuilder keys = new StringBuilder(1024);
            keyCount = 0;

            while (dicEnu.MoveNext())
            {
                keys.Append(dicEnu.Key + "\"");
                keyCount++;
            }

            keyPackage = keys.ToString();
        }
开发者ID:javithalion,项目名称:NCache,代码行数:13,代码来源:KeyPackageBuilder.cs

示例4: MinifierResourceStrings

        /// <summary>
        /// Constructs a new instance of <see cref="MinifierResourceStrings"/>.
        /// </summary>
        /// <param name="enumerator">The dictionary to enumerate for values.</param>
        public MinifierResourceStrings(IDictionaryEnumerator enumerator)
        {
            this.NameValuePairs = new Dictionary<string, string>();

            if (enumerator != null)
            {
                // use the IDictionaryEnumerator to add properties to the collection
                while (enumerator.MoveNext())
                {
                    // get the property name
                    string propertyName = enumerator.Key.ToString();

                    // set the name/value in the resource object
                    this.NameValuePairs[propertyName] = enumerator.Value.ToString();
                }
            }
        }
开发者ID:MatthewNichols,项目名称:misakai-baker,代码行数:21,代码来源:MinifierResourceStrings.cs

示例5: Populate

 /// <summary>
 /// Populates the trees' right list with objects contained in the enumerator.
 /// </summary>
 /// <param name="e"></param>
 public void Populate(IDictionaryEnumerator e) 
 {
     if (e != null)
     {
         if (_rightList == null) _rightList = new ArrayList();
         if (e is RedBlackEnumerator)
         {
             while (e.MoveNext())
             {
                 HashVector tbl = e.Value as HashVector;
                 
                 _rightList.AddRange(tbl.Keys);
             }
         }
         else
         {
             while (e.MoveNext())
             {
                 _rightList.Add(e.Key);
             }
         }
     }
 }
开发者ID:javithalion,项目名称:NCache,代码行数:27,代码来源:SRTree.cs

示例6: CacheEnumerator

 public CacheEnumerator(IDictionaryEnumerator enumerator)
 {
     _enumerator = enumerator;
     Cache.Instance._rwl.AcquireReaderLock(Cache.LOCK_TIMEOUT_MSECS);
 }
开发者ID:cihypan,项目名称:biold,代码行数:5,代码来源:Cache.cs

示例7: CreateEnumerator

        internal override IDictionaryEnumerator CreateEnumerator() {
            IDictionaryEnumerator[] enumerators = new IDictionaryEnumerator[_caches.Length];
            for (int i = 0, c = _caches.Length; i < c; i++) {
                enumerators[i] = _caches[i].CreateEnumerator();
            }

            return new AggregateEnumerator(enumerators);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:8,代码来源:cache.cs

示例8: while

        //SERIALIZACAO: A classe XMLSerializer irá usar este metodo para pegar um item para serializar no xml.
        public DictionaryEntry this[int index]
        {
            get
            {
                if (_enumerator == null)  // lazy
                    _enumerator = _hashTable.GetEnumerator();

                // Acessar um item cuja a posicao seja anterior a ultima recebida é anormal,
                // pois o XMLSerializaer irá chamar este metodo varias vezes, passando o indice
                // de forma crescente.
                // Mas, caso isso aconteça, então é necessario chamar o Reset() do enumerator
                // pois ele trabalha 'forward-only'.
                if (index < _position)
                {
                    _enumerator.Reset();
                    _position = -1;
                }

                while (_position < index)
                {
                    _enumerator.MoveNext();
                    _position++;
                }
                return _enumerator.Entry;
            }
        }
开发者ID:christal1980,项目名称:wingsoa,代码行数:27,代码来源:HashtableSerializationProxy.cs

示例9: MessageDictionaryEnumerator

 public MessageDictionaryEnumerator(MessageDictionary md, IDictionary hashtable)
 {
     this._md = md;
     if (hashtable != null)
     {
         this._enumHash = hashtable.GetEnumerator();
     }
     else
     {
         this._enumHash = null;
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:MessageDictionaryEnumerator.cs

示例10: while

        // Serialization: XmlSerializer uses this one to get one item at the time
        public DictionaryEntry this[int index]
        {
            get
            {
                if (_enumerator == null)  // lazy initialization
                    _enumerator = _hashTable.GetEnumerator();

                // Accessing an item that is before the current position is something that
                // shouldn't normally happen because XmlSerializer calls indexer with a constantly
                // increasing index that starts from zero.
                // Trying to go backward requires the reset of the enumerator, followed by appropriate
                // number of increments. (Enumerator acts as a forward-only iterator.)
                if (index < _position)
                {
                    _enumerator.Reset();
                    _position = -1;
                }

                while (_position < index)
                {
                    _enumerator.MoveNext();
                    _position++;
                }
                //Checking if the object contained in Hashtable is also a Hashtable, then_
                // convert same object into HashtableSerializationProxy object.
                //e.g: objectH in Hashtable[Key, ObjectH] is also a Hashtable..,
                // then objectH must converted into HashtableSerializationProxy, i.e. Hahtable[Key, new HashtableSerializationProxy(objectH)]
                try
                {
                    if (_enumerator.Entry.Value.GetType() == typeof(Hashtable))
                    {
                        HashtableSerializationProxy _InnerHashTableProxy = new HashtableSerializationProxy((Hashtable)_enumerator.Entry.Value);
                        _InnerDictionaryEntry = new DictionaryEntry(_enumerator.Entry.Key, _InnerHashTableProxy);

                        return _InnerDictionaryEntry;
                    }
                    else
                    {
                        return _enumerator.Entry;
                    }
                }
                catch(Exception ex)
                {
                    return _InnerDictionaryEntry = new DictionaryEntry(_enumerator.Entry.Key, "");
                }
            }
        }
开发者ID:SDRC-India,项目名称:sdrcdevinfo,代码行数:48,代码来源:HashtableSerializationProxy.cs

示例11: SetEnumerator

		private void SetEnumerator(int i)
		{
			if (_enumerator == null)
			{
				_enumerator = _dictionary.GetEnumerator();
				_enumerator.MoveNext();
			}

			if (_currentIndex > i)
			{
				_currentIndex = 0;
				_enumerator.Reset();
				_enumerator.MoveNext();
			}

			for (; _currentIndex < i; _currentIndex++)
				_enumerator.MoveNext();
		}
开发者ID:MajidSafari,项目名称:bltoolkit,代码行数:18,代码来源:DictionaryMapper.cs

示例12: EnumerableIteratorEntry

        public EnumerableIteratorEntry(IPhpEnumerable/*!*/obj)
        {
            Debug.Assert(obj != null);

            this.isValid = false;
            this.enumerator = null;
            this.currentKey = this.currentValue = null;
            
            this.obj = obj;
        }
开发者ID:dw4dev,项目名称:Phalanger,代码行数:10,代码来源:Iterators.cs

示例13: rewind

        public void rewind()
        {
            if (enumerator is PhpObject.PhpIteratorEnumerator)
                ((PhpObject.PhpIteratorEnumerator)enumerator).Reset();    // we can rewind() existing PhpIteratorEnumerator
            else
                enumerator = obj.GetForeachEnumerator(true, false, null); // we have to reinitialize (null or not PhpIteratorEnumerator)

            isValid = false;// enumerator.MoveNext();
        }
开发者ID:dw4dev,项目名称:Phalanger,代码行数:9,代码来源:Iterators.cs

示例14: XPathCollectionEnumerator

 public XPathCollectionEnumerator(Hashtable xpathes) {
     hashEnum = xpathes.GetEnumerator();
 }
开发者ID:cornelius90,项目名称:InnovatorAdmin,代码行数:3,代码来源:XPathCollection.cs

示例15: Reset

 public void Reset()
 {
     this.index = null;
 }
开发者ID:eliudiaz,项目名称:Delta.Imaging,代码行数:4,代码来源:lib.cs


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