Exemplo n.º 1
0
 /// <summary> Computes (and stores) the estimated size of the cache Value </summary>
 /// <seealso cref="EstimatedSize">
 /// </seealso>
 public virtual void EstimateSize(RamUsageEstimator ramCalc)
 {
     long size = ramCalc.EstimateRamUsage(Value);
     EstimatedSize = RamUsageEstimator.HumanReadableUnits(size, new System.Globalization.NumberFormatInfo());  // {{Aroush-2.9}} in Java, the formater is set to "0.#", so we need to do the same in C#
 }
		/// <summary> If set, will be used to estimate size for all CacheEntry objects 
		/// dealt with.
		/// </summary>
		public void  SetRamUsageEstimator(RamUsageEstimator r)
		{
			ramCalc = r;
		}
Exemplo n.º 3
0
 /// <summary> If set, will be used to estimate size for all CacheEntry objects
 /// dealt with.
 /// </summary>
 public void  SetRamUsageEstimator(RamUsageEstimator r)
 {
     ramCalc = r;
 }