예제 #1
0
        public GlobalProvider(NetServiceHost host, CoreManager core)
        {
            string pluginName    = "Commander";
            string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            string pluginPath    = $@"{documentsPath}\Decal Plugins\{pluginName}";

            PluginName = pluginName;
            PluginPath = pluginPath;
            Version    = "1.0.1";
            Host       = host;
            Core       = core;
        }
예제 #2
0
        private void ConfigureServices(NetServiceHost Host, CoreManager Core)
        {
            ContainerBuilder builder = new ContainerBuilder();

            builder.RegisterInstance(Host).As <NetServiceHost>().SingleInstance();
            builder.RegisterInstance(Core).As <CoreManager>().SingleInstance();
            builder.RegisterModule(new ControllersModule());
            builder.RegisterModule(new ServicesModule());
            builder.RegisterModule(new ModelsModule());
            builder.RegisterModule(new ViewsModule());
            _container = builder.Build();

            _logger   = _container.Resolve <Logger>().Scope("App");
            _debugger = _container.Resolve <Debugger>();
            _debugger.Start();
        }
예제 #3
0
        /// <summary>
        /// Called onces when the plugin is loaded
        /// </summary>
        public void Startup(NetServiceHost host, CoreManager core, string accountName, string characterName, string serverName)
        {
            WriteLog($"Plugin.Startup");

            CreateView();
        }