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

WithFallback() public method

Configure the current configuration with a secondary source.
Config can not have itself as fallback.
public WithFallback ( Config fallback ) : Config
fallback Config The configuration to use as a secondary source.
return Config
        public virtual Config WithFallback(Config fallback)
        {
            if (fallback == this)
                throw new ArgumentException("Config can not have itself as fallback", "fallback");

            Config clone = Copy();

            Config current = clone;
            while (current.Fallback != null)
            {
                current = current.Fallback;
            }
            current.Fallback = fallback;

            return clone;
        }

Usage Example

示例#1
0
 private static ActorSystem CreateClient(Config commonConfig)
 {
     var config = commonConfig.WithFallback("akka.remote.helios.tcp.port = 9002");
     var system = ActorSystem.Create("Client", config);
     DeadRequestProcessingActor.Install(system);
     return system;
 }
All Usage Examples Of Akka.Configuration.Config::WithFallback