Exemple #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 RewriteCssCommand(this));
        }
 public DefaultExtensionDependencyChecker(
     ExtensionAssemblyLoader loader,
     TextWriter output,
     TextWriter error,
     string[] ignoredAssemblies = null)
 {
     _loader            = loader;
     _output            = output;
     _error             = error;
     _ignoredAssemblies = ignoredAssemblies ?? DefaultIgnoredAssemblies;
 }