Esempio n. 1
0
        public static void SyncProject()
        {
            var tasks = ActionEpics.SyncProject();

            tasks.Execute(result =>
            {
                if (result.IsError)
                {
                    Debug.LogError("Failed to sync project");
                    Debug.LogError(result.Error.Message);
                }
                else
                {
                    Debug.Log("Project sync completed, the project is now up to date.");
                }
            });
        }
Esempio n. 2
0
        private static void CompilePackageListStatus()
        {
            Dispatcher.Dispatch(ActionTypes.COMPILE_PACKAGE_LIST_STATUS_STARTED);

            var tasks = ActionEpics.CompilePackageListStatus();

            tasks.Execute(result =>
            {
                if (result.IsError)
                {
                    Debug.LogError("Failed to compile package status");
                    Debug.LogError(result.Error.Message);
                }
                else
                {
                    var packageListStatus = ((Result <PackageListStatus>)result).Data;
                    Dispatcher.Dispatch(ActionTypes.COMPILE_PACKAGE_LIST_STATUS_COMPLETE,
                                        packageListStatus);
                }
            });
        }
Esempio n. 3
0
        public static void RemovePackage(AvailablePackage package)
        {
            var installDirectory = Settings.RelativePackagesDirectoryPath + package.Name;

            Dispatcher.Dispatch(ActionTypes.REMOVE_PACKAGE_STARTED, package);

            var task = ActionEpics.RemoveSubmodule(installDirectory);

            task.Execute(result =>
            {
                if (result.IsError)
                {
                    Debug.LogError("Failed to removed submodule: " + installDirectory);
                    Debug.LogError(result.Error.Message);
                    Dispatcher.Dispatch(ActionTypes.REMOVE_PACKAGE_FAILED);
                }
                else
                {
                    Debug.Log("Successfully removed submodule: " + installDirectory);
                    Dispatcher.Dispatch(ActionTypes.REMOVE_PACKAGE_COMPLETE, package);
                }
            });
        }