Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            App.CurrConfig = ConfigurationFactory.BuilderConfig();

            //SimpleRpcClient();

            BusinessCallRpcClient();
        }
Ejemplo n.º 2
0
        static void Main()
        {
            var assemblyConfigLocalMember = new AssemblyConfigLocalMember();

            assemblyConfigLocalMember.ProtoAssemblyConfigReader = new AssemblyConfigXml();
            var assemblyConfig = assemblyConfigLocalMember.Reader();

            //实例化一个autofac的创建容器
            var builder = new ContainerBuilder();

            builder.UnifiedRegisterAssemblys(new BuilderParam()
            {
                AssemblyServices = assemblyConfig.Services
            });

            App.CurrConfig = ConfigurationFactory.BuilderConfig();

            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Main());
        }