Akka.Configuration.Config.GetDouble C# (CSharp) Method

GetDouble() public method

Retrieves a double value from the specified path in the configuration.
public GetDouble ( string path, double @default ) : double
path string The path that contains the value to retrieve.
@default double
return double
        public virtual double GetDouble(string path, double @default = 0)
        {
            HoconValue value = GetNode(path);
            if (value == null)
                return @default;

            return value.GetDouble();
        }

Usage Example

Esempio n. 1
0
 public TestKitSettings(Config config)
 {
     _defaultTimeout = config.GetMillisDuration("akka.test.default-timeout", allowInfinite:false);
     _singleExpectDefault = config.GetMillisDuration("akka.test.single-expect-default", allowInfinite: false);
     _testEventFilterLeeway = config.GetMillisDuration("akka.test.filter-leeway", allowInfinite: false);
     _timefactor = config.GetDouble("akka.test.timefactor");
     if(_timefactor <= 0)
         throw new Exception(@"Expected a positive value for ""akka.test.timefactor"" but found "+_timefactor);
 }
All Usage Examples Of Akka.Configuration.Config::GetDouble