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


C# Config.GetLong方法代码示例

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


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

示例1: FromConfig

 /// <summary>Update properties by setting fields from the configuration.</summary>
 /// <remarks>
 /// Update properties by setting fields from the configuration.
 /// <p/>
 /// If a property is not defined in the configuration, then it is left
 /// unmodified.
 /// </remarks>
 /// <param name="rc">configuration to read properties from.</param>
 public virtual void FromConfig(Config rc)
 {
     SetPackedGitOpenFiles(rc.GetInt("core", null, "packedgitopenfiles", GetPackedGitOpenFiles
         ()));
     SetPackedGitLimit(rc.GetLong("core", null, "packedgitlimit", GetPackedGitLimit())
         );
     SetPackedGitWindowSize(rc.GetInt("core", null, "packedgitwindowsize", GetPackedGitWindowSize
         ()));
     SetPackedGitMMAP(rc.GetBoolean("core", null, "packedgitmmap", IsPackedGitMMAP()));
     SetDeltaBaseCacheLimit(rc.GetInt("core", null, "deltabasecachelimit", GetDeltaBaseCacheLimit
         ()));
     long maxMem = Runtime.GetRuntime().MaxMemory();
     long sft = rc.GetLong("core", null, "streamfilethreshold", GetStreamFileThreshold
         ());
     sft = Math.Min(sft, maxMem / 4);
     // don't use more than 1/4 of the heap
     sft = Math.Min(sft, int.MaxValue);
     // cannot exceed array length
     SetStreamFileThreshold((int)sft);
 }
开发者ID:sharwell,项目名称:ngit,代码行数:28,代码来源:WindowCacheConfig.cs

示例2: FromConfig

		/// <summary>Update properties by setting fields from the configuration.</summary>
		/// <remarks>
		/// Update properties by setting fields from the configuration.
		/// If a property's corresponding variable is not defined in the supplied
		/// configuration, then it is left unmodified.
		/// </remarks>
		/// <param name="rc">configuration to read properties from.</param>
		public virtual void FromConfig(Config rc)
		{
			SetMaxDeltaDepth(rc.GetInt("pack", "depth", GetMaxDeltaDepth()));
			SetDeltaSearchWindowSize(rc.GetInt("pack", "window", GetDeltaSearchWindowSize()));
			SetDeltaSearchMemoryLimit(rc.GetLong("pack", "windowmemory", GetDeltaSearchMemoryLimit
				()));
			SetDeltaCacheSize(rc.GetLong("pack", "deltacachesize", GetDeltaCacheSize()));
			SetDeltaCacheLimit(rc.GetInt("pack", "deltacachelimit", GetDeltaCacheLimit()));
			SetCompressionLevel(rc.GetInt("pack", "compression", rc.GetInt("core", "compression"
				, GetCompressionLevel())));
			SetIndexVersion(rc.GetInt("pack", "indexversion", GetIndexVersion()));
			SetBigFileThreshold(rc.GetInt("core", "bigfilethreshold", GetBigFileThreshold()));
			SetThreads(rc.GetInt("pack", "threads", GetThreads()));
			// These variables aren't standardized
			//
			SetReuseDeltas(rc.GetBoolean("pack", "reusedeltas", IsReuseDeltas()));
			SetReuseObjects(rc.GetBoolean("pack", "reuseobjects", IsReuseObjects()));
			SetDeltaCompress(rc.GetBoolean("pack", "deltacompression", IsDeltaCompress()));
		}
开发者ID:LunarLanding,项目名称:ngit,代码行数:26,代码来源:PackConfig.cs


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