Exemple #1
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            CoreInitializer.RegisterImplementations(new UIInitializer());
            LoadApplication(new App());

            return(base.FinishedLaunching(app, options));
        }
        private void InnerRegisterContainer()
        {
            CoreInitializer.Init();

            Container.RegisterAssemblyInterface(DataDll, DataSqliteDll);
            Container.ResisterAssemblyType(BusinessDll, ServiceDll);

            RegisterCache();
        }
        /// <summary>
        /// 动态编译
        /// </summary>
        /// <returns></returns>
        public virtual ActionResult Auto()
        {
            List <CDTable>  table   = CDTableService.Entities.ToList();
            List <CDColumn> columns = CDColumnService.Entities.ToList();

            // 初始化动态数据
            CoreInitializer.Initialize(table, columns);
            OperationResult or = new OperationResult(OperationResultType.Success);

            return(this.JsonFormat(or));
        }
Exemple #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
            CoreInitializer.RegisterImplementations(new UIInitializer());
            LoadApplication(new App());
        }
Exemple #5
0
        /// <summary>
        /// The main method.
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        public static void Main(string[] args)
        {
            var options = new Options();

            if (CommandLine.Parser.Default.ParseArgumentsStrict(args, options))
            {
                CoreInitializer.Initialize(Dependencies);
                using (var lifetime = ServiceLocator.GetContainer().BeginLifetimeScope())
                {
                    var module = lifetime.Resolve <IApplicationTestClient <string> >();
                    module.Run(!string.IsNullOrWhiteSpace(options.InputFile) ? File.OpenText(options.InputFile) : Console.In, Console.Out);
                }
            }
        }
Exemple #6
0
        /// <summary>
        /// The main method.
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        public static void Main(string[] args)
        {
            var options = new Options();

            if (CommandLine.Parser.Default.ParseArgumentsStrict(args, options))
            {
                CoreInitializer.Initialize(Dependencies);
                using (var scope = ServiceLocator.GetContainer().BeginLifetimeScope())
                {
                    Console.WriteLine("Connecting to THRIFT server {0}:{1} ...", options.Host, options.Port);
                    var app = scope.Resolve <IApplicationClient <string> >();
                    app.Connect(options.Host, options.Port);
                    Console.WriteLine("Connected to THRIFT server {0}:{1} ", options.Host, options.Port);
                    Console.WriteLine("Please send command. Format get <prefix>");
                    while (true)
                    {
                        var line = Console.ReadLine();
                        if (!string.IsNullOrWhiteSpace(line))
                        {
                            line = line.ToLowerInvariant().Trim().RemoveDuplicateBlankSpaces();
                            if (string.Equals(line, "exit", StringComparison.Ordinal))
                            {
                                break;
                            }

                            var arr = line.Split(' ');
                            if (arr.Length < 2 || !string.Equals(arr[0], "get", StringComparison.Ordinal))
                            {
                                continue;
                            }

                            var response = app.Get(arr[1]);
                            if (response != null)
                            {
                                if (response.Any())
                                {
                                    foreach (var val in response)
                                    {
                                        Console.WriteLine(val);
                                    }

                                    Console.WriteLine();
                                }
                            }
                        }
                    }
                }
            }
        }
        public static void RegisterTypes(IServiceLocator serviceLocator)
        {
            CoreInitializer.RegisterServices(serviceLocator);

            serviceLocator.RegisterType<IAboutInfoService, AboutInfoService>();
            serviceLocator.RegisterType<ICustomStatusService, CustomStatusService>();
            serviceLocator.RegisterType<IPleaseWaitService, CustomPleaseWaitService>();
            serviceLocator.RegisterType<ILicenseService, LicenseService>();
            serviceLocator.RegisterType<IRuntimeConfigurationService, RuntimeConfigurationService>();
            serviceLocator.RegisterType<IVstService, VstService>();
            serviceLocator.RegisterType<IApplicationService, ApplicationService>();
            serviceLocator.RegisterType<IAdvancedMessageService, AdvancedMessageService>();
            serviceLocator.RegisterType<FrontendService, FrontendService>();

            serviceLocator
                .RegisterType<INativeInstrumentsResourceGeneratorService, NativeInstrumentsResourceGeneratorService>();
        }
Exemple #8
0
        /// <summary>
        /// The main method.
        /// </summary>
        /// <param name="args">
        /// The args.
        /// </param>
        public static void Main(string[] args)
        {
            var options = new Options();

            if (CommandLine.Parser.Default.ParseArgumentsStrict(args, options))
            {
                CoreInitializer.Initialize(Dependencies);
                try
                {
                    using (var scope = ServiceLocator.GetContainer().BeginLifetimeScope())
                    {
                        var app = scope.Resolve <IApplicationServer>();
                        app.Throughput = GetThroughput();
                        app.Run(options.InputFile, options.Port);
                        Console.ReadLine();
                    }
                }
                catch (Exception ce)
                {
                    Console.WriteLine("An exception occurred: {0}", ce.Message);
                }
            }
        }
Exemple #9
0
 public void Initialize()
 {
     CoreInitializer.Initialize(this.Dependencies);
 }