Akka.Cluster.Metric.Create C# (CSharp) Метод

Create() публичный статический Метод

Creates a new Metric instance if value is valid, otherwise returns null. Invalid numeric values are negative and NaN/Infinite.
public static Create ( string name, double value, double decayFactor = null ) : Metric
name string
value double
decayFactor double
Результат Metric
        public static Metric Create(string name, double value, double? decayFactor = null)
        {
            return Defined(value) ? new Metric(name, value, CreateEWMA(value, decayFactor)) : null;
        }

Usage Example

 /// <summary>
 /// Gets the total amount of system memory. Creates a new instance each time.
 /// </summary>
 public Metric SystemMaxMemory()
 {
     return(Metric.Create(StandardMetrics.SystemMemoryMax,
                          IsRunningOnMono
             ? _monoSystemMaxMemory.RawValue
             : GetVbTotalPhysicalMemory()));
 }
All Usage Examples Of Akka.Cluster.Metric::Create