Example #1
0
        protected override string GenerateCommandLineCommands()
        {
            ExporterConsoleParameters consoleParams = new ExporterConsoleParameters()
            {
                Hierarchy             = Hierarchical,
                TargetDirectory       = FixTargetPath(TargetDirectory),
                TargetFile            = FixTargetPath(TargetFile),
                ReferencesTmpFilePath = PutReferencesToTempFile(),
                SourceAssemblies      = ExtractSourceAssemblies(),
                DocumentationFilePath = DocumentationFilePath.EndsWith(".xml", StringComparison.InvariantCultureIgnoreCase)?DocumentationFilePath:String.Empty,
                ConfigurationMethod   = ConfigurationMethod
            };

            return(consoleParams.ExportConsoleParameters());
        }
        protected override string GenerateCommandLineCommands()
        {
            ExporterConsoleParameters consoleParams = new ExporterConsoleParameters()
            {
                ExportPureTypings      = ExportPureTypings,
                WriteWarningComment    = WriteWarningComment,
                Hierarchy              = Hierarchical,
                TargetDirectory        = FixTargetPath(TargetDirectory),
                TargetFile             = FixTargetPath(TargetFile),
                References             = ExtractReferences(),
                SourceAssemblies       = ExtractSourceAssemblies(),
                RootNamespace          = RootNamespace,
                CamelCaseForProperties = CamelCaseForProperties,
                CamelCaseForMethods    = CamelCaseForMethods,
                DocumentationFilePath  = DocumentationFilePath.EndsWith(".xml", StringComparison.InvariantCultureIgnoreCase)?DocumentationFilePath:String.Empty,
                GenerateDocumentation  = GenerateDocumentation,
                ConfigurationMethod    = ConfigurationMethod
            };

            return(consoleParams.ExportConsoleParameters());
        }
Example #3
0
        protected override string GenerateCommandLineCommands()
        {
            ExporterConsoleParameters consoleParams = new ExporterConsoleParameters()
            {
                Hierarchy             = Hierarchical,
                TargetDirectory       = FixTargetPath(TargetDirectory),
                TargetFile            = FixTargetPath(TargetFile),
                ReferencesTmpFilePath = string.Empty,
                SourceAssemblies      = ExtractSourceAssemblies(),
                DocumentationFilePath = DocumentationFilePath.EndsWith(".xml",
#if NETCORE
                                                                       StringComparison.CurrentCultureIgnoreCase
#else
                                                                       StringComparison.InvariantCultureIgnoreCase
#endif
                                                                       ) ? DocumentationFilePath : String.Empty,
                ConfigurationMethod = ConfigurationMethod
            };

            ExtractRegexes(consoleParams);
            var tmpFile = Path.GetTempFileName();

            using (var fs = File.OpenWrite(tmpFile))
            {
                using (var tw = new StreamWriter(fs))
                {
                    consoleParams.ToFile(tw);
                    PutReferencesToTempFile(tw);
                    tw.Flush();
                }
            }
            if (IsCore)
            {
                var pth = Path.Combine(GetProperRtcliPath(), "rtcli.dll");
                return(string.Format("\"{1}\" profile \"{0}\"", tmpFile, pth));
            }
            return(string.Format("profile \"{0}\"", tmpFile));
        }