예제 #1
0
        public Application(
            CancellationToken cancellationToken,
            ExtensionAssemblyLoader loader,
            ExtensionDependencyChecker checker,
            Func <string, MetadataReferenceProperties, PortableExecutableReference> assemblyReferenceProvider,
            TextWriter output = null,
            TextWriter error  = null)
        {
            CancellationToken         = cancellationToken;
            Checker                   = checker;
            Loader                    = loader;
            AssemblyReferenceProvider = assemblyReferenceProvider;
            Out   = output ?? Out;
            Error = error ?? Error;

            Name               = "rzc";
            FullName           = "Microsoft ASP.NET Core Razor CLI tool";
            Description        = "CLI interface to perform Razor operations.";
            ShortVersionGetter = GetInformationalVersion;

            HelpOption("-?|-h|--help");

            Commands.Add(new ServerCommand(this));
            Commands.Add(new ShutdownCommand(this));
            Commands.Add(new DiscoverCommand(this));
            Commands.Add(new GenerateCommand(this));
            Commands.Add(new BrotliCompressCommand(this));
        }
예제 #2
0
        public Application(CancellationToken cancellationToken, ExtensionAssemblyLoader loader, ExtensionDependencyChecker checker)
        {
            CancellationToken = cancellationToken;
            Checker           = checker;
            Loader            = loader;

            Name               = "rzc";
            FullName           = "Microsoft ASP.NET Core Razor CLI tool";
            Description        = "CLI interface to perform Razor operations.";
            ShortVersionGetter = GetInformationalVersion;

            HelpOption("-?|-h|--help");

            Commands.Add(new ServerCommand(this));
            Commands.Add(new ShutdownCommand(this));
            Commands.Add(new DiscoverCommand(this));
            Commands.Add(new GenerateCommand(this));
        }