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


C# IDictionary.IsEmpty方法代码示例

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


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

示例1: SchemaConfig

 public SchemaConfig(string name,
                     string dataNode,
                     string group,
                     bool keepSqlSchema,
                     IDictionary<string, TableConfig> tables)
 {
     Name = name;
     DataNode = dataNode;
     Group = group;
     Tables = tables;
     IsNoSharding = tables == null || tables.IsEmpty();
     MetaDataNodes = BuildMetaDataNodes();
     AllDataNodes = BuildAllDataNodes();
     IsKeepSqlSchema = keepSqlSchema;
 }
开发者ID:tupunco,项目名称:Tup.Cobar4Net,代码行数:15,代码来源:SchemaConfig.cs

示例2: InstallPackagesFromVSExtensionRepository

        public void InstallPackagesFromVSExtensionRepository(string extensionId, bool isPreUnzipped, bool skipAssemblyReferences, bool ignoreDependencies, Project project, IDictionary<string, string> packageVersions)
        {
            if (String.IsNullOrEmpty(extensionId))
            {
                throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "extensionId");
            }

            if (project == null)
            {
                throw new ArgumentNullException("project");
            }

            if (packageVersions.IsEmpty())
            {
                throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "packageVersions");
            }

            var preinstalledPackageInstaller = new PreinstalledPackageInstaller(_websiteHandler, _packageServices, _vsCommonOperations, _solutionManager);
            var repositoryPath = preinstalledPackageInstaller.GetExtensionRepositoryPath(extensionId, _vsExtensionManager, ThrowError);

            var config = GetPreinstalledPackageConfiguration(isPreUnzipped, skipAssemblyReferences, ignoreDependencies, packageVersions, repositoryPath);
            preinstalledPackageInstaller.PerformPackageInstall(this, project, config, RepositorySettings, ShowWarning, ThrowError);
        }
开发者ID:rikoe,项目名称:nuget,代码行数:23,代码来源:VsPackageInstaller.cs

示例3: AddExtendFunction

 /// <param name="extFuncPrototypeMap">
 ///     funcName -&gt; extFunctionPrototype. funcName
 ///     MUST NOT be the same as predefined function of MySql 5.5
 /// </param>
 /// <exception cref="System.ArgumentException" />
 public virtual void AddExtendFunction(IDictionary<string, FunctionExpression> extFuncPrototypeMap)
 {
     if (extFuncPrototypeMap == null || extFuncPrototypeMap.IsEmpty())
     {
         return;
     }
     if (!allowFuncDefChange)
     {
         throw new NotSupportedException("function define is not allowed to be changed");
     }
     lock (this)
     {
         var toPut = new Dictionary<string, FunctionExpression>();
         // check extFuncPrototypeMap
         foreach (var en in extFuncPrototypeMap)
         {
             var funcName = en.Key;
             if (funcName == null)
             {
                 continue;
             }
             var funcNameUp = funcName.ToUpper();
             if (functionPrototype.ContainsKey(funcNameUp))
             {
                 throw new ArgumentException("ext-function '" + funcName + "' is MySql's predefined function!");
             }
             var func = en.Value;
             if (func == null)
             {
                 throw new ArgumentException("ext-function '" + funcName + "' is null!");
             }
             toPut[funcNameUp] = func;
         }
         functionPrototype.AddRange(toPut);
     }
 }
开发者ID:tupunco,项目名称:Tup.Cobar4Net,代码行数:41,代码来源:MySQLFunctionManager.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: 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.IsEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。