예제 #1
0
 public UpdateCommand(IFileSystem filesystem, IEnvironment environment, IConsoleLog log, RepositoryProcessor processor)
 {
     _filesystem  = filesystem;
     _environment = environment;
     _log         = log;
     _processor   = processor;
 }
        public AuthenticationService(IProfile profile, IRsaTokenDao token, IConsoleLog consoleLog)
        {
            _consoleLog = consoleLog;
            _profile = profile;
            _token = token;

        }
예제 #3
0
 public PackageProcessor(IFileSystem fileSystem, IEnvironment environment, IConsoleLog log)
 {
     _filesystem  = fileSystem;
     _environment = environment;
     _log         = log;
     _globber     = new Globber(fileSystem, environment);
     _nuget       = new NuGetTool(fileSystem);
 }
예제 #4
0
 internal App(IConsoleLog log, GitRepoProvider git, IScreenshotProvider screenshots, Func <int, IRepeater> repeaterFactory)
 {
     _log             = log;
     _git             = git;
     _repeaterFactory = repeaterFactory;
     _stopwatch       = new Stopwatch();
     _screenshots     = screenshots;
 }
예제 #5
0
        public CombinedLog(IFileLog fileLog, IConsoleLog consoleLog, IOptionsSource optionsSource)
        {
            if (optionsSource is null)
            {
                throw new ArgumentNullException(nameof(optionsSource));
            }

            var f = fileLog as DecoratorBase <IFileLog>;

            _fileLog = (f != null) ? f.GetComponent() : fileLog ?? throw new ArgumentNullException(nameof(fileLog));
            var c = consoleLog as DecoratorBase <IConsoleLog>;

            _consoleLog = (c != null) ? c.GetComponent() : consoleLog ?? throw new ArgumentNullException(nameof(consoleLog));
            _verbose    = optionsSource.LogOptions.Verbose;
        }
예제 #6
0
        void Awake()
        {
            if (instance != null)
            {
                DestroyImmediate(this.gameObject);
                return;
            }

            DontDestroyOnLoad(this.gameObject);
            instance   = this.gameObject;
            consoleLog = new ConsoleLog(MessageType.LOG);
            consoleLog.MaxLogRegister = 1000;

            DevConsole.Logger = consoleLog;
            GetComponent <DevConsoleUI>().consoleLog = consoleLog;
        }
예제 #7
0
        private static bool UpdatePackage(IConsoleLog log, FilePath file, string package, string version, FilePath nuget)
        {
            log.Write("Updating package {0} to {1}...", package, version);
            var info = new ProcessStartInfo(nuget.FullPath)
            {
                Arguments = $"update {file.FullPath} -Id {package} -Version {version} -RepositoryPath {file.GetDirectory().Combine(new DirectoryPath("../packages")).Collapse()}",
                RedirectStandardOutput = true
            };

            using (var process = Process.Start(info))
            {
                if (process != null)
                {
                    using (var reader = process.StandardOutput)
                    {
                        reader.ReadToEnd();
                    }
                    return(process.ExitCode == 0);
                }
            }
            return(false);
        }
예제 #8
0
        private static bool RestorePackages(IConsoleLog log, FilePath file, FilePath nuget)
        {
            var info = new ProcessStartInfo(nuget.FullPath)
            {
                Arguments = $"restore {file.FullPath} -PackagesDirectory {file.GetDirectory().Combine(new DirectoryPath("../packages")).Collapse()}",
                RedirectStandardOutput = true
            };

            log.Write("Restoring packages for {0}...", file.FullPath);
            using (var process = Process.Start(info))
            {
                if (process != null)
                {
                    using (var reader = process.StandardOutput)
                    {
                        reader.ReadToEnd();
                    }
                    return(process.ExitCode == 0);
                }
            }
            return(false);
        }
예제 #9
0
 public App(IConsoleLog log, GitRepoProvider git, IScreenshotProvider screenshots)
     : this(log, git, screenshots, intervalSeconds => new Repeater(intervalSeconds))
 {
 }
예제 #10
0
 public ResetPrefsCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #11
0
 public PrintCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #12
0
 public ClearCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #13
0
 public RepositoryProcessor(IFileSystem fileSystem, IEnvironment environment, IConsoleLog log)
 {
     _filesystem  = fileSystem;
     _environment = environment;
     _log         = log;
 }
예제 #14
0
 public BaseDevConsoleTests()
 {
     logger            = new ConsoleLog(MessageType.LOG);
     DevConsole.Logger = logger;
 }
예제 #15
0
 public LoadSceneCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #16
0
 public HelpCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #17
0
 public bool Update(IConsoleLog log, DirectoryPath working, FilePath file, string package, string version)
 {
     return(UpdatePackage(log, file, package, version, GetNuGetPath(working)));
 }
예제 #18
0
 public bool Restore(IConsoleLog log, DirectoryPath working, FilePath file)
 {
     return(RestorePackages(log, file, GetNuGetPath(working)));
 }
예제 #19
0
 public GravityCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #20
0
 public TimeScaleCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #21
0
 public ReloadCommand(IConsoleLog logger) : base(logger)
 {
 }
예제 #22
0
 public BaseCommand(IConsoleLog logger)
 {
     this.logger = logger;
 }