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


C# IDictionary.EntrySet方法代码示例

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


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

示例1: Format

		private static string Format(IDictionary<ObjectId, string> missingCommits)
		{
			StringBuilder r = new StringBuilder();
			r.Append(JGitText.Get().missingPrerequisiteCommits);
			foreach (KeyValuePair<ObjectId, string> e in missingCommits.EntrySet())
			{
				r.Append("\n  ");
				r.Append(e.Key.Name);
				if (e.Value != null)
				{
					r.Append(" ").Append(e.Value);
				}
			}
			return r.ToString();
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:15,代码来源:MissingBundlePrerequisiteException.cs

示例2: Eval

		public static object Eval(string source, IDictionary<string, Scriptable> bindings)
		{
			Context cx = ContextFactory.GetGlobal().EnterContext();
			try
			{
				Scriptable scope = cx.InitStandardObjects();
				if (bindings != null)
				{
					foreach (KeyValuePair<string, Scriptable> entry in bindings.EntrySet())
					{
						Scriptable @object = entry.Value;
						@object.SetParentScope(scope);
						scope.Put(entry.Key, scope, @object);
					}
				}
				return cx.EvaluateString(scope, source, "source", 1, null);
			}
			finally
			{
				Context.Exit();
			}
		}
开发者ID:hazzik,项目名称:Rhino.Net,代码行数:22,代码来源:Evaluator.cs

示例3: ReplaceDatabase

 public void ReplaceDatabase(string databaseName, InputStream databaseStream, IDictionary
     <string, InputStream> attachmentStreams)
 {
     ReplaceDatabase(databaseName, databaseStream, attachmentStreams == null ? null : 
         attachmentStreams.EntrySet().GetEnumerator());
 }
开发者ID:jonlipsky,项目名称:couchbase-lite-net,代码行数:6,代码来源:Manager.cs

示例4: Open

		/// <exception cref="System.IO.IOException"></exception>
		private HttpURLConnection Open(string method, string bucket, string key, IDictionary
			<string, string> args)
		{
			StringBuilder urlstr = new StringBuilder();
			urlstr.Append("http://");
			urlstr.Append(bucket);
			urlstr.Append('.');
			urlstr.Append(DOMAIN);
			urlstr.Append('/');
			if (key.Length > 0)
			{
				HttpSupport.Encode(urlstr, key);
			}
			if (!args.IsEmpty())
			{
				Iterator<KeyValuePair<string, string>> i;
				urlstr.Append('?');
				i = args.EntrySet().Iterator();
				while (i.HasNext())
				{
					KeyValuePair<string, string> e = i.Next();
					urlstr.Append(e.Key);
					urlstr.Append('=');
					HttpSupport.Encode(urlstr, e.Value);
					if (i.HasNext())
					{
						urlstr.Append('&');
					}
				}
			}
			Uri url = new Uri(urlstr.ToString());
			Proxy proxy = HttpSupport.ProxyFor(proxySelector, url);
			HttpURLConnection c;
			c = (HttpURLConnection)url.OpenConnection(proxy);
			c.SetRequestMethod(method);
			c.SetRequestProperty("User-Agent", "jgit/1.0");
			c.SetRequestProperty("Date", HttpNow());
			return c;
		}
开发者ID:nickname100,项目名称:monodevelop,代码行数:40,代码来源:AmazonS3.cs

示例5: Header

		public Header(IDictionary<string, IList<string>> map) : this()
		{
			// initialize fields
			foreach (KeyValuePair<string, IList<string>> next in map.EntrySet())
			{
				string key = next.Key;
				IList<string> value = next.Value;
				List<string> linkedList = new List<string>();
				foreach (string element in value)
				{
					linkedList.AddItem(element);
					props.AddItem(key);
					props.AddItem(element);
				}
				keyTable.Put(key, linkedList);
			}
		}
开发者ID:Redth,项目名称:couchbase-lite-net,代码行数:17,代码来源:URLConnection.cs

示例6: ReplaceUri

		private string ReplaceUri(string uri, IDictionary<string, string> replacements)
		{
			if (replacements.IsEmpty())
			{
				return uri;
			}
			KeyValuePair<string, string>? match = null;
			foreach (KeyValuePair<string, string> replacement in replacements.EntrySet())
			{
				// Ignore current entry if not longer than previous match
				if (match != null && match.Value.Key.Length > replacement.Key.Length)
				{
					continue;
				}
				if (!uri.StartsWith(replacement.Key))
				{
					continue;
				}
				match = replacement;
			}
			if (match != null)
			{
				return match.Value.Value + Sharpen.Runtime.Substring(uri, match.Value.Key.Length);
			}
			else
			{
				return uri;
			}
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:29,代码来源:RemoteConfig.cs


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