BasicDistributedActor.Program.InitClusterNode C# (CSharp) 메소드

InitClusterNode() 개인적인 정적인 메소드

private static InitClusterNode ( ClusterNode node ) : void
node ClusterNode
리턴 void
        private static void InitClusterNode(ClusterNode node)
        {
            node.RootActors = new List<IActorRef>();
            foreach (var role in node.Roles)
            {
                IActorRef rootActor;
                switch (role)
                {
                    case "table":
                        rootActor = node.Context.System.ActorOf(Props.Create(
                            () => new Table("TestTable", node.Context.ClusterActorDiscovery,
                                            typeof(IncrementalIntegerIdGenerator), null)));
                        break;

                    case "container":
                        rootActor = node.Context.System.ActorOf(Props.Create(
                            () => new TableContainer("TestTable", node.Context.ClusterActorDiscovery,
                                                     typeof(CommonActorFactory<TestActor>), null, null)));
                        break;

                    default:
                        throw new InvalidOperationException("Invalid role: " + role);
                }
                node.RootActors.Add(rootActor);
            }
        }