コード例 #1
0
        public static int Main(string[] args)
        {
            // Create config provider
            configProvider     = new LocalConfigProvider(Environment.CurrentDirectory, PackageFileName, LocalFileName);
            api                = new QPMApi(configProvider);
            androidMkProvider  = new AndroidMkProvider(Path.Combine(Environment.CurrentDirectory, "Android.mk"));
            resolver           = new RemoteQPMDependencyResolver(api, androidMkProvider);
            propertiesProvider = new CppPropertiesProvider(Path.Combine(Environment.CurrentDirectory, ".vscode", "c_cpp_properties.json"));
            bmbfmodProvider    = new BmbfModProvider(Path.Combine(Environment.CurrentDirectory, "bmbfmod.json"));
            // Create handlers
            PackageHandler    = new PackageHandler(configProvider);
            DependencyHandler = new DependencyHandler(configProvider);
            RestoreHandler    = new RestoreHandler(configProvider, resolver);
            PublishHandler    = new PublishHandler(configProvider, api);
            // Register callbacks
            PackageHandler.OnPackageCreated       += PackageHandler_OnPackageCreated;
            PackageHandler.OnIdChanged            += PackageHandler_OnIdChanged;
            PackageHandler.OnVersionChanged       += PackageHandler_OnVersionChanged;
            PackageHandler.OnNameChanged          += PackageHandler_OnNameChanged;
            DependencyHandler.OnDependencyRemoved += DependencyHandler_OnDependencyRemoved;
            // TODO: AKLJSHFJKGHDKJ
            RestoreHandler.OnRestore += (resolver as RemoteQPMDependencyResolver).OnRestore;

            try
            {
                return(CommandLineApplication.Execute <Program>(args));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                Console.WriteLine();
                Console.WriteLine(e);
                Utils.WriteFail();
            }
            return(-1);
        }
コード例 #2
0
 public PublishHandler(IConfigProvider configProvider, QPMApi api)
 {
     this.configProvider = configProvider;
     this.api            = api;
 }
コード例 #3
0
 public RemoteQPMDependencyResolver(QPMApi api, AndroidMkProvider mkProvider)
 {
     client            = new WebClient();
     this.api          = api;
     androidMkProvider = mkProvider;
 }