本文整理汇总了C#中IDictionaryEnumerator类的典型用法代码示例。如果您正苦于以下问题:C# IDictionaryEnumerator类的具体用法?C# IDictionaryEnumerator怎么用?C# IDictionaryEnumerator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDictionaryEnumerator类属于命名空间,在下文中一共展示了IDictionaryEnumerator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: DictionaryEntryEnumeratorAdapter
public DictionaryEntryEnumeratorAdapter(IDictionaryEnumerator enumerator)
{
this.enumerator = enumerator;
}
开发者ID:ralescano,项目名称:castle,代码行数:4,代码来源:ReflectionBasedDictionaryAdapter.cs
示例9: WriteDictionary
/// <summary>
/// Write an dictionary to a <see cref="TextWriter"/>
/// </summary>
/// <param name="writer">the writer to write to</param>
/// <param name="repository">a <see cref="ILoggerRepository"/> to use for object conversion</param>
/// <param name="value">the value to write to the writer</param>
/// <remarks>
/// <para>
/// Writes the <see cref="IDictionaryEnumerator"/> to a writer in the form:
/// </para>
/// <code>
/// {key1=value1, key2=value2, key3=value3}
/// </code>
/// <para>
/// If the <see cref="ILoggerRepository"/> specified
/// is not null then it is used to render the key and value to text, otherwise
/// the object's ToString method is called.
/// </para>
/// </remarks>
protected static void WriteDictionary(TextWriter writer, ILoggerRepository repository, IDictionaryEnumerator value) {
writer.Write("{");
bool first = true;
// Write out all the dictionary key value pairs
while (value.MoveNext()) {
if (first) {
first = false;
} else {
writer.Write(", ");
}
WriteObject(writer, repository, value.Key);
writer.Write("=");
WriteObject(writer, repository, value.Value);
}
writer.Write("}");
}
开发者ID:GodLesZ,项目名称:svn-dump,代码行数:38,代码来源:PatternConverter.cs
示例10: AggregateEnumerator
internal AggregateEnumerator(IDictionaryEnumerator [] enumerators) {
_enumerators = enumerators;
}
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:3,代码来源:cache.cs
示例11: WeakDictionaryEnumerator
public WeakDictionaryEnumerator(IDictionaryEnumerator baseEnumerator)
{
this.baseEnumerator = baseEnumerator;
}
开发者ID:kstenson,项目名称:NHibernate.Search,代码行数:4,代码来源:WeakHashTable.cs
示例12: 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
示例13: 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
示例14: 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
示例15: 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
示例16: 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
示例17: 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
示例18: XPathCollectionEnumerator
public XPathCollectionEnumerator(Hashtable xpathes) {
hashEnum = xpathes.GetEnumerator();
}
开发者ID:cornelius90,项目名称:InnovatorAdmin,代码行数:3,代码来源:XPathCollection.cs
示例19: Reset
public void Reset()
{
this.index = null;
}
开发者ID:eliudiaz,项目名称:Delta.Imaging,代码行数:4,代码来源:lib.cs
示例20: DataTypeBaseDictionaryEnumerator
internal DataTypeBaseDictionaryEnumerator(DataTypeBaseDictionary enumerable)
{
_innerEnumerator = enumerable.InnerHash.GetEnumerator();
}
开发者ID:nantos,项目名称:nant,代码行数:4,代码来源:DataTypeBaseDictionary.cs
注:本文中的IDictionaryEnumerator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论