• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Tasks.CommandLineBuilderExtension类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.Build.Tasks.CommandLineBuilderExtension的典型用法代码示例。如果您正苦于以下问题:C# CommandLineBuilderExtension类的具体用法?C# CommandLineBuilderExtension怎么用?C# CommandLineBuilderExtension使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



CommandLineBuilderExtension类属于Microsoft.Build.Tasks命名空间,在下文中一共展示了CommandLineBuilderExtension类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddCommandLineCommands

		protected internal override void AddCommandLineCommands (
						CommandLineBuilderExtension commandLine)
		{
			if (Sources.Length == 0)
				return;

			foreach (ITaskItem item in Sources)
				commandLine.AppendSwitchIfNotNull ("--complist=", item.ItemSpec);

			commandLine.AppendSwitchIfNotNull ("--target=", LicenseTarget);

			if (ReferencedAssemblies != null)
				foreach (ITaskItem reference in ReferencedAssemblies)
					commandLine.AppendSwitchIfNotNull ("--load=", reference.ItemSpec);

			string outdir;
			if (Bag ["OutputDirectory"] != null)
				outdir = OutputDirectory;
			else
				outdir = ".";

			commandLine.AppendSwitchIfNotNull ("--outdir=", outdir);

			if (Bag ["NoLogo"] != null && NoLogo)
				commandLine.AppendSwitch ("--nologo");

			OutputLicense = new TaskItem (Path.Combine (OutputDirectory, LicenseTarget.ItemSpec + ".licenses"));
		}
开发者ID:Profit0004,项目名称:mono,代码行数:28,代码来源:LC.cs


示例2: AddResponseFileCommands

 protected internal override void AddResponseFileCommands(CommandLineBuilderExtension commandLine)
 {
     commandLine.AppendSwitchIfNotNull("/lib:", base.AdditionalLibPaths, ",");
     commandLine.AppendPlusOrMinusSwitch("/unsafe", base.Bag, "AllowUnsafeBlocks");
     commandLine.AppendPlusOrMinusSwitch("/checked", base.Bag, "CheckForOverflowUnderflow");
     commandLine.AppendSwitchWithSplitting("/nowarn:", this.DisabledWarnings, ",", new char[] { ';', ',' });
     commandLine.AppendWhenTrue("/fullpaths", base.Bag, "GenerateFullPaths");
     commandLine.AppendSwitchIfNotNull("/langversion:", this.LangVersion);
     commandLine.AppendSwitchIfNotNull("/moduleassemblyname:", this.ModuleAssemblyName);
     commandLine.AppendSwitchIfNotNull("/pdb:", this.PdbFile);
     commandLine.AppendPlusOrMinusSwitch("/nostdlib", base.Bag, "NoStandardLib");
     commandLine.AppendSwitchIfNotNull("/platform:", this.Platform);
     commandLine.AppendSwitchIfNotNull("/errorreport:", this.ErrorReport);
     commandLine.AppendSwitchWithInteger("/warn:", base.Bag, "WarningLevel");
     commandLine.AppendSwitchIfNotNull("/doc:", this.DocumentationFile);
     commandLine.AppendSwitchIfNotNull("/baseaddress:", this.BaseAddress);
     commandLine.AppendSwitchUnquotedIfNotNull("/define:", this.GetDefineConstantsSwitch(base.DefineConstants));
     commandLine.AppendSwitchIfNotNull("/win32res:", base.Win32Resource);
     commandLine.AppendSwitchIfNotNull("/main:", base.MainEntryPoint);
     commandLine.AppendSwitchIfNotNull("/appconfig:", this.ApplicationConfiguration);
     this.AddReferencesToCommandLine(commandLine);
     base.AddResponseFileCommands(commandLine);
     commandLine.AppendSwitchWithSplitting("/warnaserror+:", this.WarningsAsErrors, ",", new char[] { ';', ',' });
     commandLine.AppendSwitchWithSplitting("/warnaserror-:", this.WarningsNotAsErrors, ",", new char[] { ';', ',' });
     if (base.ResponseFiles != null)
     {
         foreach (ITaskItem item in base.ResponseFiles)
         {
             commandLine.AppendSwitchIfNotNull("@", item.ItemSpec);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:32,代码来源:Csc.cs


示例3: ValidateHasParameter

        /*
         * Method:      ValidateHasParameter
         *
         * Validates that the the given ToolTaskExtension's command line contains the indicated
         * parameter.  Returns the index of the parameter that matched.
         *
         */
        internal static int ValidateHasParameter(ToolTaskExtension t, string parameter, bool useResponseFile)
        {
            CommandLineBuilderExtension b = new CommandLineBuilderExtension();

            if (useResponseFile)
                t.AddResponseFileCommands(b);
            else
                t.AddCommandLineCommands(b);

            string cl = b.ToString();
            string msg = String.Format("Command-line = [{0}]\r\n", cl);
            msg += String.Format(" Searching for [{0}]\r\n", parameter);

            string[] pieces = Parse(cl);

            int i = 0;
            foreach (string s in pieces)
            {
                msg += String.Format(" Parm = [{0}]\r\n", s);
                if (s == parameter)
                {
                    return i;
                }

                i++;
            }

            msg += "Not found!\r\n";
            Console.WriteLine(msg);
            Assert.Fail(msg); // Could not find the parameter.

            return 0;
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:40,代码来源:CommandLine_Support.cs


示例4: AddReferencesToCommandLine

 private void AddReferencesToCommandLine(CommandLineBuilderExtension commandLine)
 {
     if ((base.References != null) && (base.References.Length != 0))
     {
         List<ITaskItem> list = new List<ITaskItem>(base.References.Length);
         List<ITaskItem> list2 = new List<ITaskItem>(base.References.Length);
         foreach (ITaskItem item in base.References)
         {
             if (MetadataConversionUtilities.TryConvertItemMetadataToBool(item, "EmbedInteropTypes"))
             {
                 list2.Add(item);
             }
             else
             {
                 list.Add(item);
             }
         }
         if (list2.Count > 0)
         {
             commandLine.AppendSwitchIfNotNull("/link:", list2.ToArray(), ",");
         }
         if (list.Count > 0)
         {
             commandLine.AppendSwitchIfNotNull("/reference:", list.ToArray(), ",");
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:Vbc.cs


示例5: AddCommandLineCommands

        private void AddCommandLineCommands(CommandLineBuilderExtension commandLine)
        {
            string outputDirectory = Path.GetDirectoryName(this.OutputFile);

            if(!Directory.Exists( outputDirectory ))
                Directory.CreateDirectory( outputDirectory );

            commandLine.AppendSwitch( "-q" );
            if (m_inputDirectories != null)
            {
                commandLine.AppendSwitch("-r");
            }
            commandLine.AppendFileNameIfNotNull( this.m_outputFile );

            if (m_inputFiles != null)
            {
                foreach (ITaskItem inputFile in InputFiles)
                {
                    Log.LogMessage("Adding file {0}", inputFile.ItemSpec);
                    commandLine.AppendFileNameIfNotNull(inputFile.ItemSpec);
                }
            }

            if (m_inputDirectories != null)
            {
                foreach (ITaskItem inputDirectory in InputDirectories)
                {
                    Log.LogMessage("Adding directory {0}", inputDirectory.ItemSpec);
                    commandLine.AppendFileNameIfNotNull(inputDirectory.ItemSpec);
                }
            }
        }
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:32,代码来源:CreateZip.cs


示例6: AddCommandLineCommands

		void AddCommandLineCommands (CommandLineBuilderExtension commandLine)
		{
			if (Resources.Length == 0)
				return;

			commandLine.AppendFileNameIfNotNull (OutputFile);

			commandLine.AppendFileNamesIfNotNull (Resources, " ");
		}
开发者ID:carrie901,项目名称:mono,代码行数:9,代码来源:Respack.cs


示例7: AddResponseFileCommands

		protected internal override void AddResponseFileCommands (
						 CommandLineBuilderExtension commandLine)
		{
			commandLine.AppendSwitchIfNotNull ("/algid:", AlgorithmId);
			commandLine.AppendSwitchIfNotNull ("/baseaddress:", BaseAddress);
			commandLine.AppendSwitchIfNotNull ("/company:", CompanyName);
			commandLine.AppendSwitchIfNotNull ("/configuration:", Configuration);
			commandLine.AppendSwitchIfNotNull ("/culture:", Culture);
			commandLine.AppendSwitchIfNotNull ("/copyright:", Copyright);
			if (Bag ["DelaySign"] != null)
				if (DelaySign)
					commandLine.AppendSwitch ("/delaysign+");
				else
					commandLine.AppendSwitch ("/delaysign-");
			commandLine.AppendSwitchIfNotNull ("/description:", Description);
			if (EmbedResources != null) {
				foreach (ITaskItem item in EmbedResources) {
					string logical_name = item.GetMetadata ("LogicalName");
					if (!string.IsNullOrEmpty (logical_name))
						commandLine.AppendSwitchIfNotNull ("/embed:", string.Format ("{0},{1}", item.ItemSpec, logical_name));
					else
						commandLine.AppendSwitchIfNotNull ("/embed:", item.ItemSpec);
				}
			}
			commandLine.AppendSwitchIfNotNull ("/evidence:", EvidenceFile);
			commandLine.AppendSwitchIfNotNull ("/fileversion:", FileVersion);
			commandLine.AppendSwitchIfNotNull ("/flags:", Flags);
			if (GenerateFullPaths)
				commandLine.AppendSwitch ("/fullpaths");
			commandLine.AppendSwitchIfNotNull ("/keyname:", KeyContainer);
			commandLine.AppendSwitchIfNotNull ("/keyfile:", KeyFile);
			if (LinkResources != null)
				foreach (ITaskItem item in LinkResources)
					commandLine.AppendSwitchIfNotNull ("/link:", item.ItemSpec);
			commandLine.AppendSwitchIfNotNull ("/main:", MainEntryPoint);
			if (OutputAssembly != null)
				commandLine.AppendSwitchIfNotNull ("/out:", OutputAssembly.ItemSpec);
			//platform
			commandLine.AppendSwitchIfNotNull ("/product:", ProductName);
			commandLine.AppendSwitchIfNotNull ("/productversion:", ProductVersion);
			if (ResponseFiles != null)
				foreach (string s in ResponseFiles)
					commandLine.AppendFileNameIfNotNull (String.Format ("@{0}", s));
			if (SourceModules != null)
				foreach (ITaskItem item in SourceModules)
					commandLine.AppendFileNameIfNotNull (item.ItemSpec);
			commandLine.AppendSwitchIfNotNull ("/target:", TargetType);
			commandLine.AppendSwitchIfNotNull ("/template:", TemplateFile);
			commandLine.AppendSwitchIfNotNull ("/title:", Title);
			commandLine.AppendSwitchIfNotNull ("/trademark:", Trademark);
			commandLine.AppendSwitchIfNotNull ("/version:", Version);
			commandLine.AppendSwitchIfNotNull ("/win32icon:", Win32Icon);
			commandLine.AppendSwitchIfNotNull ("/win32res:", Win32Resource);
		}
开发者ID:nlhepler,项目名称:mono,代码行数:54,代码来源:AL.cs


示例8: AddCommandLineCommands

 protected internal override void AddCommandLineCommands(CommandLineBuilderExtension commandLine)
 {
     this.CreateTemporaryBatchFile();
     string batchFile = this.batchFile;
     commandLine.AppendSwitch("/Q");
     commandLine.AppendSwitch("/C");
     if (batchFile.Contains("&") && !batchFile.Contains("^&"))
     {
         batchFile = Microsoft.Build.Shared.NativeMethodsShared.GetShortFilePath(batchFile).Replace("&", "^&");
     }
     commandLine.AppendFileNameIfNotNull(batchFile);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:12,代码来源:Exec.cs


示例9: AddResponseFileCommands

 protected internal override void AddResponseFileCommands(CommandLineBuilderExtension commandLine)
 {
     if (((this.OutputAssembly == null) && (this.Sources != null)) && ((this.Sources.Length > 0) && (this.ResponseFiles == null)))
     {
         try
         {
             this.OutputAssembly = new TaskItem(Path.GetFileNameWithoutExtension(this.Sources[0].ItemSpec));
         }
         catch (ArgumentException exception)
         {
             throw new ArgumentException(exception.Message, "Sources");
         }
         if (string.Compare(this.TargetType, "library", StringComparison.OrdinalIgnoreCase) == 0)
         {
             ITaskItem outputAssembly = this.OutputAssembly;
             outputAssembly.ItemSpec = outputAssembly.ItemSpec + ".dll";
         }
         else if (string.Compare(this.TargetType, "module", StringComparison.OrdinalIgnoreCase) == 0)
         {
             ITaskItem item2 = this.OutputAssembly;
             item2.ItemSpec = item2.ItemSpec + ".netmodule";
         }
         else
         {
             ITaskItem item3 = this.OutputAssembly;
             item3.ItemSpec = item3.ItemSpec + ".exe";
         }
     }
     commandLine.AppendSwitchIfNotNull("/addmodule:", this.AddModules, ",");
     commandLine.AppendSwitchWithInteger("/codepage:", base.Bag, "CodePage");
     this.ConfigureDebugProperties();
     commandLine.AppendPlusOrMinusSwitch("/debug", base.Bag, "EmitDebugInformation");
     commandLine.AppendSwitchIfNotNull("/debug:", this.DebugType);
     commandLine.AppendPlusOrMinusSwitch("/delaysign", base.Bag, "DelaySign");
     commandLine.AppendSwitchWithInteger("/filealign:", base.Bag, "FileAlignment");
     commandLine.AppendSwitchIfNotNull("/keycontainer:", this.KeyContainer);
     commandLine.AppendSwitchIfNotNull("/keyfile:", this.KeyFile);
     commandLine.AppendSwitchIfNotNull("/linkresource:", this.LinkResources, new string[] { "LogicalName", "Access" });
     commandLine.AppendWhenTrue("/nologo", base.Bag, "NoLogo");
     commandLine.AppendWhenTrue("/nowin32manifest", base.Bag, "NoWin32Manifest");
     commandLine.AppendPlusOrMinusSwitch("/optimize", base.Bag, "Optimize");
     commandLine.AppendSwitchIfNotNull("/out:", this.OutputAssembly);
     commandLine.AppendSwitchIfNotNull("/resource:", this.Resources, new string[] { "LogicalName", "Access" });
     commandLine.AppendSwitchIfNotNull("/target:", this.TargetType);
     commandLine.AppendPlusOrMinusSwitch("/warnaserror", base.Bag, "TreatWarningsAsErrors");
     commandLine.AppendWhenTrue("/utf8output", base.Bag, "Utf8Output");
     commandLine.AppendSwitchIfNotNull("/win32icon:", this.Win32Icon);
     commandLine.AppendSwitchIfNotNull("/win32manifest:", this.Win32Manifest);
     commandLine.AppendFileNamesIfNotNull(this.Sources, " ");
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:50,代码来源:ManagedCompiler.cs


示例10: AddCommandLineCommands

		protected internal override void AddCommandLineCommands (CommandLineBuilderExtension commandLine)
		{
			if (IsRunningOnWindows)
				commandLine.AppendSwitch ("/q /c");

			if (!String.IsNullOrEmpty (command)) {
				scriptFile = Path.GetTempFileName ();
				if (IsRunningOnWindows)
					scriptFile = scriptFile + ".bat";
				using (StreamWriter sw = new StreamWriter (scriptFile)) {
					sw.Write (command);
				}
				commandLine.AppendFileNameIfNotNull (scriptFile);
			}
			base.AddCommandLineCommands (commandLine);
		}
开发者ID:frje,项目名称:SharpLang,代码行数:16,代码来源:Exec.cs


示例11: AddResponseFileCommands

        protected override void AddResponseFileCommands(CommandLineBuilderExtension commandLine)
        {
            if (OutputGeneratedFile != null && !String.IsNullOrEmpty(OutputGeneratedFile.ItemSpec))
                commandLine.AppendSwitchIfNotNull("/outputgeneratedfile:", OutputGeneratedFile);
            commandLine.AppendSwitchUnquotedIfNotNull("/define:", this.GetDefineConstantsSwitch(base.DefineConstants));
            this.AddReferencesToCommandLine(commandLine);
            base.AddResponseFileCommands(commandLine);
            if (ResponseFiles != null)
            {
                foreach (ITaskItem item in ResponseFiles)
                {
                    commandLine.AppendSwitchIfNotNull("@", item.ItemSpec);
                }
            }
            if (ContentFiles != null)
            {
                foreach (var file in ContentFiles)
                {
                    commandLine.AppendSwitchIfNotNull("/contentfile:", file.ItemSpec);
                }
            }
            if (NoneFiles != null)
            {
                foreach (var file in NoneFiles)
                {
                    commandLine.AppendSwitchIfNotNull("/nonefile:", file.ItemSpec);
                }
            }
            if (SkcPlugins != null)
            {
                foreach (var file in SkcPlugins)
                {
                    commandLine.AppendSwitchIfNotNull("/plugin:", file.ItemSpec);
                }
            }
            if (SkcRebuild)
                commandLine.AppendSwitch("/rebuild");
            if (UseBuildService)
            {
                Log.LogMessage("CurrentDirectory is: " + Directory.GetCurrentDirectory());
                commandLine.AppendSwitchIfNotNull("/dir:", Directory.GetCurrentDirectory());
            }

            commandLine.AppendSwitchIfNotNull("/TargetFrameworkVersion:", TargetFrameworkVersion);
        }
开发者ID:benbon,项目名称:SharpKit,代码行数:45,代码来源:Skc.cs


示例12: ARFC

		public void ARFC (CommandLineBuilderExtension commandLine)
		{
			base.AddResponseFileCommands (commandLine);
#if !NET_4_0
			string s = commandLine.ToString ();
			if (s.Length == 6)
				Assert.AreEqual ("/sdk:2", s);
			else
				Assert.AreEqual ("/sdk:2 ", s.Substring (0, 7));

			BindingFlags flags = BindingFlags.Instance | BindingFlags.NonPublic;
			PropertyInfo pi = typeof (CommandLineBuilderExtension).GetProperty ("CommandLine", flags);
			System.Text.StringBuilder sb = (System.Text.StringBuilder) pi.GetValue (commandLine, null);
			sb.Length = 0;
			if (s.Length > 6)
				sb.Append (s.Substring (7));
#endif
		}
开发者ID:ming871,项目名称:NoahGameFrame,代码行数:18,代码来源:CscTest.cs


示例13: AddReferencesToCommandLine

 private void AddReferencesToCommandLine(CommandLineBuilderExtension commandLine)
 {
     if ((base.References != null) && (base.References.Length != 0))
     {
         foreach (ITaskItem item in base.References)
         {
             string metadata = item.GetMetadata("Aliases");
             string switchName = "/reference:";
             if (MetadataConversionUtilities.TryConvertItemMetadataToBool(item, "EmbedInteropTypes"))
             {
                 switchName = "/link:";
             }
             if ((metadata == null) || (metadata.Length == 0))
             {
                 commandLine.AppendSwitchIfNotNull(switchName, item.ItemSpec);
             }
             else
             {
                 foreach (string str3 in metadata.Split(new char[] { ',' }))
                 {
                     string str4 = str3.Trim();
                     if (str3.Length != 0)
                     {
                         if (str4.IndexOfAny(new char[] { ',', ' ', ';', '"' }) != -1)
                         {
                             Microsoft.Build.Shared.ErrorUtilities.VerifyThrowArgument(false, "Csc.AssemblyAliasContainsIllegalCharacters", item.ItemSpec, str4);
                         }
                         if (string.Compare("global", str4, StringComparison.OrdinalIgnoreCase) == 0)
                         {
                             commandLine.AppendSwitchIfNotNull(switchName, item.ItemSpec);
                         }
                         else
                         {
                             commandLine.AppendSwitchAliased(switchName, str4, item.ItemSpec);
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:41,代码来源:Csc.cs


示例14: AppendItemWithInvalidBooleanAttribute

        public void AppendItemWithInvalidBooleanAttribute()
        {
            Assert.Throws<ArgumentException>(() =>
            {
                // Construct the task item.
                TaskItem i = new TaskItem();
                i.ItemSpec = "MyResource.bmp";
                i.SetMetadata("Name", "Kenny");
                i.SetMetadata("Private", "Yes");       // This is our flag.

                CommandLineBuilderExtension c = new CommandLineBuilderExtension();

                // Validate that a legitimate bool works first.
                try
                {
                    c.AppendSwitchIfNotNull
                    (
                        "/myswitch:",
                        new ITaskItem[] { i },
                        new string[] { "Name", "Private" },
                        new bool[] { false, true }
                    );
                    Assert.Equal(@"/myswitch:MyResource.bmp,Kenny,Private", c.ToString());
                }
                catch (ArgumentException e)
                {
                    Assert.True(false, "Got an unexpected exception:" + e.Message);
                }

                // Now try a bogus boolean.
                i.SetMetadata("Private", "Maybe");       // This is our flag.
                c.AppendSwitchIfNotNull
                (
                    "/myswitch:",
                    new ITaskItem[] { i },
                    new string[] { "Name", "Private" },
                    new bool[] { false, true }
                );  // <-- Expect an ArgumentException here.
            }
           );
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:41,代码来源:CommandLineBuilderExtension_Tests.cs


示例15: AddResponseFileCommands

 protected internal override void AddResponseFileCommands(CommandLineBuilderExtension commandLine)
 {
     commandLine.AppendSwitchIfNotNull("/algid:", this.AlgorithmId);
     commandLine.AppendSwitchIfNotNull("/baseaddress:", this.BaseAddress);
     commandLine.AppendSwitchIfNotNull("/company:", this.CompanyName);
     commandLine.AppendSwitchIfNotNull("/configuration:", this.Configuration);
     commandLine.AppendSwitchIfNotNull("/copyright:", this.Copyright);
     commandLine.AppendSwitchIfNotNull("/culture:", this.Culture);
     commandLine.AppendPlusOrMinusSwitch("/delaysign", base.Bag, "DelaySign");
     commandLine.AppendSwitchIfNotNull("/description:", this.Description);
     commandLine.AppendSwitchIfNotNull("/evidence:", this.EvidenceFile);
     commandLine.AppendSwitchIfNotNull("/fileversion:", this.FileVersion);
     commandLine.AppendSwitchIfNotNull("/flags:", this.Flags);
     commandLine.AppendWhenTrue("/fullpaths", base.Bag, "GenerateFullPaths");
     commandLine.AppendSwitchIfNotNull("/keyfile:", this.KeyFile);
     commandLine.AppendSwitchIfNotNull("/keyname:", this.KeyContainer);
     commandLine.AppendSwitchIfNotNull("/main:", this.MainEntryPoint);
     commandLine.AppendSwitchIfNotNull("/out:", (this.OutputAssembly == null) ? null : this.OutputAssembly.ItemSpec);
     commandLine.AppendSwitchIfNotNull("/platform:", this.Platform);
     commandLine.AppendSwitchIfNotNull("/product:", this.ProductName);
     commandLine.AppendSwitchIfNotNull("/productversion:", this.ProductVersion);
     commandLine.AppendSwitchIfNotNull("/target:", this.TargetType);
     commandLine.AppendSwitchIfNotNull("/template:", this.TemplateFile);
     commandLine.AppendSwitchIfNotNull("/title:", this.Title);
     commandLine.AppendSwitchIfNotNull("/trademark:", this.Trademark);
     commandLine.AppendSwitchIfNotNull("/version:", this.Version);
     commandLine.AppendSwitchIfNotNull("/win32icon:", this.Win32Icon);
     commandLine.AppendSwitchIfNotNull("/win32res:", this.Win32Resource);
     commandLine.AppendSwitchIfNotNull("", this.SourceModules, new string[] { "TargetFile" });
     commandLine.AppendSwitchIfNotNull("/embed:", this.EmbedResources, new string[] { "LogicalName", "Access" });
     commandLine.AppendSwitchIfNotNull("/link:", this.LinkResources, new string[] { "LogicalName", "TargetFile", "Access" });
     if (this.ResponseFiles != null)
     {
         foreach (string str in this.ResponseFiles)
         {
             commandLine.AppendSwitchIfNotNull("@", str);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:39,代码来源:AL.cs


示例16: AddCommandLineCommands

 protected internal override void AddCommandLineCommands(CommandLineBuilderExtension commandLine)
 {
     commandLine.AppendSwitchIfNotNull("/target:", this.LicenseTarget.ItemSpec);
     foreach (ITaskItem item in this.Sources)
     {
         commandLine.AppendSwitchIfNotNull("/complist:", item.ItemSpec);
     }
     commandLine.AppendSwitchIfNotNull("/outdir:", this.OutputDirectory);
     if (this.ReferencedAssemblies != null)
     {
         foreach (ITaskItem item2 in this.ReferencedAssemblies)
         {
             commandLine.AppendSwitchIfNotNull("/i:", item2.ItemSpec);
         }
     }
     commandLine.AppendWhenTrue("/nologo", base.Bag, "NoLogo");
     string str = this.LicenseTarget.ItemSpec + ".licenses";
     if (this.OutputDirectory != null)
     {
         str = Path.Combine(this.OutputDirectory, str);
     }
     this.OutputLicense = new TaskItem(str);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:23,代码来源:LC.cs


示例17: AddCommandLineCommands

 protected internal override void AddCommandLineCommands(CommandLineBuilderExtension commandLine)
 {
     commandLine.AppendSwitchIfNotNull("-m ", this.MetabasePath);
     commandLine.AppendSwitchIfNotNull("-v ", this.VirtualPath);
     commandLine.AppendSwitchIfNotNull("-p ", this.PhysicalPath);
     if (this.Updateable)
     {
         commandLine.AppendSwitch("-u");
     }
     if (this.Force)
     {
         commandLine.AppendSwitch("-f");
     }
     if (this.Clean)
     {
         commandLine.AppendSwitch("-c");
     }
     if (this.Debug)
     {
         commandLine.AppendSwitch("-d");
     }
     if (this.FixedNames)
     {
         commandLine.AppendSwitch("-fixednames");
     }
     commandLine.AppendSwitchIfNotNull("", this.TargetPath);
     if (this.AllowPartiallyTrustedCallers)
     {
         commandLine.AppendSwitch("-aptca");
     }
     if (this.DelaySign)
     {
         commandLine.AppendSwitch("-delaysign");
     }
     commandLine.AppendSwitchIfNotNull("-keyfile ", this.KeyFile);
     commandLine.AppendSwitchIfNotNull("-keycontainer ", this.KeyContainer);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:37,代码来源:AspNetCompiler.cs


示例18: AddResponseFileCommands

		protected internal override void AddResponseFileCommands (
				CommandLineBuilderExtension commandLine )
		{
			base.AddResponseFileCommands (commandLine);

			commandLine.AppendSwitchIfNotNull ("/libpath:", AdditionalLibPaths, ",");

			commandLine.AppendSwitchIfNotNull ("/baseaddress:", BaseAddress);

			if (DefineConstants != null)
				commandLine.AppendSwitchUnquotedIfNotNull ("/define:",
						String.Format ("\"{0}\"", EscapeDoubleQuotes (DefineConstants)));

			// DisabledWarnings

			commandLine.AppendSwitchIfNotNull ("/doc:", DocumentationFile);

			// ErrorReport
			
			// GenerateDocumentation
			
			if (Imports != null)
				foreach (ITaskItem item in Imports)
					commandLine.AppendSwitchIfNotNull ("/imports:", item.ItemSpec);
			
			commandLine.AppendSwitchIfNotNull ("/main:", MainEntryPoint);

			// NoStandardLib
			if (Bag ["NoStandardLib"] != null && NoStandardLib)
				commandLine.AppendSwitch ("/nostdlib");
			
			if (NoWarnings)
				commandLine.AppendSwitch ("/nowarn");

			commandLine.AppendSwitchIfNotNull ("/optioncompare:", OptionCompare);

			if (Bag ["OptionExplicit"] != null)
				if (OptionExplicit)
					commandLine.AppendSwitch ("/optionexplicit+");
				else
					commandLine.AppendSwitch ("/optionexplicit-");

			if (Bag ["OptionStrict"] != null)
				if (OptionStrict)
					commandLine.AppendSwitch ("/optionstrict+");
				else
					commandLine.AppendSwitch ("/optionstrict-");

			if (Bag ["OptionInfer"] != null)
				if (OptionInfer)
					commandLine.AppendSwitch ("/optioninfer+");
				else
					commandLine.AppendSwitch ("/optioninfer-");

			// OptionStrictType
			
			// Platform
			
			if (References != null)
				foreach (ITaskItem item in References)
					commandLine.AppendSwitchIfNotNull ("/reference:", item.ItemSpec);
	
			if (Bag ["RemoveIntegerChecks"] != null)
				if (RemoveIntegerChecks)
					commandLine.AppendSwitch ("/removeintchecks+");
				else
					commandLine.AppendSwitch ("/removeintchecks-");

			if (ResponseFiles != null)
				foreach (ITaskItem item in ResponseFiles)
					commandLine.AppendFileNameIfNotNull (String.Format ("@{0}", item.ItemSpec));

			commandLine.AppendSwitchIfNotNull ("/rootnamespace:", RootNamespace);

			commandLine.AppendSwitchIfNotNull ("/sdkpath:", SdkPath);

			// TargetCompactFramework

			if (String.Compare (VBRuntime, "Embed", StringComparison.OrdinalIgnoreCase) == 0) 
				commandLine.AppendSwitch ("/vbruntime*");
			
			// Verbosity

			// WarningsAsErrors

			// WarningsNotAsErrors

		}
开发者ID:Profit0004,项目名称:mono,代码行数:88,代码来源:Vbc.cs


示例19: TestUtf8Output2

		public void TestUtf8Output2 ()
		{
			MCExtended mc = new MCExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			mc.Utf8Output = false;
			mc.ARFC (c1);
			mc.ACLC (c2);
			
			Assert.AreEqual (String.Empty, c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
开发者ID:BrzVlad,项目名称:mono,代码行数:13,代码来源:ManagedCompilerTest.cs


示例20: TestTreatWarningsAsErrors2

		public void TestTreatWarningsAsErrors2 ()
		{
			MCExtended mc = new MCExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			mc.TreatWarningsAsErrors = false;
			mc.ARFC (c1);
			mc.ACLC (c2);
			
			Assert.AreEqual ("/warnaserror-", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
开发者ID:BrzVlad,项目名称:mono,代码行数:13,代码来源:ManagedCompilerTest.cs



注:本文中的Microsoft.Build.Tasks.CommandLineBuilderExtension类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Tasks.Copy类代码示例发布时间:2022-05-26
下一篇:
C# Shared.AssemblyNameExtension类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap