コード例 #1
0
        /// <summary>
        /// Shortcut for creating a new actor system with the specified name and settings.
        /// </summary>
        /// <param name="name">The name of the actor system to create. The name must be uri friendly.
        /// <remarks>Must contain only word characters (i.e. [a-zA-Z0-9] plus non-leading '-'</remarks>
        /// </param>
        /// <param name="setup">The bootstrap setup used to help programmatically initialize the <see cref="ActorSystem"/>.</param>
        /// <returns>A newly created actor system with the given name and configuration.</returns>
        public static ActorSystem Create(string name, ActorSystemSetup setup)
        {
            var bootstrapSetup = setup.Get <BootstrapSetup>();
            var appConfig      = bootstrapSetup.FlatSelect(_ => _.Config).GetOrElse(ConfigurationFactory.Load());

            return(CreateAndStartSystem(name, appConfig, setup));
        }
コード例 #2
0
ファイル: ActorSystem.cs プロジェクト: yesh-nadella/akka.net
 /// <summary>
 /// Creates a new <see cref="ActorSystem"/> with the specified name.
 /// </summary>
 /// <param name="name">The name of the actor system to create. The name must be uri friendly.
 /// <remarks>Must contain only word characters (i.e. [a-zA-Z0-9] plus non-leading '-'</remarks>
 /// </param>
 /// <returns>A newly created actor system with the given name.</returns>
 public static ActorSystem Create(string name)
 {
     return(CreateAndStartSystem(name, ConfigurationFactory.Load()));
 }