Пример #1
0
        static void Main(string[] args)
        {
            //var config = Orleans.Runtime.Configuration.ClusterConfiguration.LocalhostPrimarySilo();

            var host = new Orleans.Runtime.Host.SiloHost("Default");

            host.LoadOrleansConfig();

            host.InitializeOrleansSilo();
            host.StartOrleansSilo();


            //var config = Orleans.Runtime.Configuration.ClientConfiguration.LocalhostSilo();
            //GrainClient.Initialize(config);

            //var userID = Guid.NewGuid();
            //IHello pub = Orleans.GrainClient.GrainFactory.GetGrain<IHello>(userID);

            while (true)
            {
                var msg = Console.ReadLine();

                if (msg == "quit")
                {
                    break;
                }
                //pub.SendUpdateMessage(msg);
            }

            host.StopOrleansSilo();

            Console.ReadLine();
        }
Пример #2
0
 static void Main(string[] args)
 {
     using (var host = new Orleans.Runtime.Host.SiloHost("Default"))
     {
         host.LoadOrleansConfig();
         host.InitializeOrleansSilo();
         host.StartOrleansSilo();
         Console.WriteLine("Starting...");
         Console.Read();
         host.StopOrleansSilo();
     }
 }
Пример #3
0
        public OrleansHostWrapper(ClusterConfiguration config, string[] args)
        {
            var siloArgs = SiloArgs.ParseArguments(args);
            if (siloArgs == null)
            {
                return;
            }

            if (siloArgs.DeploymentId != null)
            {
                config.Globals.DeploymentId = siloArgs.DeploymentId;
            }

            siloHost = new Orleans.Runtime.Host.SiloHost(siloArgs.SiloName, config);
            siloHost.LoadOrleansConfig();
        }
Пример #4
0
        public OrleansHostWrapper(ClusterConfiguration config, string[] args)
        {
            var siloArgs = SiloArgs.ParseArguments(args);

            if (siloArgs == null)
            {
                return;
            }

            if (siloArgs.DeploymentId != null)
            {
                config.Globals.DeploymentId = siloArgs.DeploymentId;
            }

            siloHost = new Orleans.Runtime.Host.SiloHost(siloArgs.SiloName, config);
            siloHost.LoadOrleansConfig();
        }
Пример #5
0
 private void Init()
 {
     siloHost.LoadOrleansConfig();
     siloHost.Config.Globals.FallbackSerializationProvider = typeof(ILBasedSerializer).GetTypeInfo();
 }
Пример #6
0
 private void Init()
 {
     _siloHost.LoadOrleansConfig();
 }
Пример #7
0
 private void Init(string configFile)
 {
     siloHost.ConfigFileName = configFile;
     siloHost.LoadOrleansConfig();
 }