PyroArguments.cs :  » Installers-Generators » WiX » Microsoft » Tools » WindowsInstallerXml » Test » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Installers Generators » WiX 
WiX » Microsoft » Tools » WindowsInstallerXml » Test » PyroArguments.cs
//-----------------------------------------------------------------------
// <copyright file="PyroArguments.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
//    
//    The use and distribution terms for this software are covered by the
//    Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
//    which can be found in the file CPL.TXT at the root of this distribution.
//    By using this software in any fashion, you are agreeing to be bound by
//    the terms of this license.
//    
//    You must not remove this notice, or any other, from this software.
// </copyright>
// <summary>
//     Fields, properties and methods for working with Pyro arguments
// </summary>
//-----------------------------------------------------------------------

namespace Microsoft.Tools.WindowsInstallerXml.Test{
    using System;
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using System.Text;

    /// <summary>
    /// Fields, properties and methods for working with Pyro arguments
    /// </summary>
    public partial class Pyro
    {
        #region Private Members

        /// <summary>
        /// [-t baseline wixTransform]
        /// </summary>
        private StringDictionary baselines;

        /// <summary>
        /// -cc
        /// </summary>
        private List<string> cachedCabs;

        /// <summary>
        /// -ext
        /// </summary>
        private List<string> extensions;

        /// <summary>
        /// inputFile
        /// </summary>
        private string inputFile;

        /// <summary>
        /// -notidy
        /// </summary>
        private bool noTidy;

        /// <summary>
        /// -out outputFile
        /// </summary>
        private string outputFile;

        /// <summary>
        /// -reusecab
        /// </summary>
        private bool reuseCab;

        /// <summary>
        /// -sa
        /// </summary>
        private bool suppressAssemblies;

        /// <summary>
        /// -sf
        /// </summary>
        private bool suppressFiles;

        /// <summary>
        /// -sh
        /// </summary>
        private bool suppressFileInfo;

        /// <summary>
        //  -sw<N>
        /// </summary>
        private List<string> suppressWarnings;

        /// <summary>
        /// -wx
        /// </summary>
        private bool treatWarningsAsErrors;

        /// <summary>
        /// -v
        /// </summary>
        private bool verboseOutput;

        #endregion

        #region Public Properties

        /// <summary>
        /// The arguments as they would be passed on the command line
        /// </summary>
        /// <remarks>
        /// To allow for negative testing, checking for invalid combinations
        /// of arguments is not performed.
        /// </remarks>
        public override string Arguments
        {
            get
            {
                StringBuilder arguments = new StringBuilder(base.Arguments);

                // Baselines
                foreach (string key in this.Baselines.Keys)
                {
                    arguments.AppendFormat(" -t {0} {1}", this.Baselines[key], key);
                }

                // CacheCabs
                foreach (string cab in this.CachedCabs)
                {
                    arguments.AppendFormat(" -cc {0}", cab);
                }

                // Extensions
                foreach (string extension in this.Extensions)
                {
                    arguments.AppendFormat(@" -ext ""{0}""", extension);
                }

                // InputFile
                if (!String.IsNullOrEmpty(this.InputFile))
                {
                    arguments.AppendFormat(" {0}", this.InputFile);
                }

                // NoTidy
                if (this.NoTidy)
                {
                    arguments.Append(" -notidy");
                }

                // OutputFile
                if (!String.IsNullOrEmpty(this.OutputFile))
                {
                    // Add extra backslashes that Wix requires
                    arguments.AppendFormat(@" -out ""{0}""", this.OutputFile);
                }

                // ReuseCab
                if (this.ReuseCab)
                {
                    arguments.Append(" -reusecab");
                }

                // SuppressAssemblies
                if (this.SuppressAssemblies)
                {
                    arguments.Append(" -sa");
                }

                // SuppressFiles
                if (this.SuppressFiles)
                {
                    arguments.Append(" -sf");
                }

                // SuppressFileInfo
                if (this.SuppressFileInfo)
                {
                    arguments.Append(" -sh");
                }

                // SuppressWarnings
                foreach (string suppressWarning in this.SuppressWarnings)
                {
                    arguments.AppendFormat(" -sw{0}", suppressWarning);
                }

                // TreatWarningsAsErrors
                if (this.TreatWarningsAsErrors)
                {
                    arguments.Append(" -wx");
                }

                // VerboseOutput
                if (this.VerboseOutput)
                {
                    arguments.Append(" -v");
                }

                return arguments.ToString();
            }
        }

        /// <summary>
        /// [-t baseline wixTransform]
        /// </summary>
        /// <remarks>
        /// The key is the path to the transform file, the value is the baseline Id
        /// </remarks>
        public StringDictionary Baselines
        {
            get { return this.baselines; }
            set { this.baselines = value; }
        }

        /// <summary>
        /// -cc
        /// </summary>
        public List<string> CachedCabs
        {
            get { return this.cachedCabs; }
            set { this.cachedCabs = value; }
        }

        /// <summary>
        /// -ext
        /// </summary>
        public List<string> Extensions
        {
            get { return this.extensions; }
            set { this.extensions = value; }
        }

        /// <summary>
        /// inputFile
        /// </summary>
        public string InputFile
        {
            get { return this.inputFile; }
            set { this.inputFile = value; }
        }

        /// <summary>
        /// -notidy
        /// </summary>
        public bool NoTidy
        {
            get { return this.noTidy; }
            set { this.noTidy = value; }
        }

        /// <summary>
        /// -out outputFile
        /// </summary>
        public string OutputFile
        {
            get { return this.outputFile; }
            set { this.outputFile = value; }
        }

        /// <summary>
        /// -reusecab
        /// </summary>
        public bool ReuseCab
        {
            get { return this.reuseCab; }
            set { this.reuseCab = value; }
        }

        /// <summary>
        /// -sa
        /// </summary>
        public bool SuppressAssemblies
        {
            get { return this.suppressAssemblies; }
            set { this.suppressAssemblies = value; }
        }

        /// <summary>
        /// -sf
        /// </summary>
        public bool SuppressFiles
        {
            get { return this.suppressFiles; }
            set { this.suppressFiles = value; }
        }

        /// <summary>
        /// -sh
        /// </summary>
        public bool SuppressFileInfo
        {
            get { return this.suppressFileInfo; }
            set { this.suppressFileInfo = value; }
        }

        /// <summary>
        //  -sw<N>
        /// </summary>
        public List<string> SuppressWarnings
        {
            get { return this.suppressWarnings; }
            set { this.suppressWarnings = value; }
        }

        /// <summary>
        /// -wx
        /// </summary>
        public bool TreatWarningsAsErrors
        {
            get { return this.treatWarningsAsErrors; }
            set { this.treatWarningsAsErrors = value; }
        }

        /// <summary>
        /// -v
        /// </summary>
        public bool VerboseOutput
        {
            get { return this.verboseOutput; }
            set { this.verboseOutput = value; }
        }

        #endregion

        /// <summary>
        /// Clears all of the assigned arguments and resets them to the default values
        /// </summary>
        public override void SetDefaultArguments()
        {
            this.Baselines = new StringDictionary();
            this.CachedCabs = new List<string>();
            this.Extensions = new List<string>();
            this.InputFile = String.Empty;
            this.NoTidy = false;
            this.OutputFile = String.Empty;
            this.ReuseCab = false;
            this.SuppressAssemblies = false;
            this.SuppressFiles = false;
            this.SuppressFileInfo = false;
            this.SuppressWarnings = new List<string>();
            this.TreatWarningsAsErrors = false;
            this.VerboseOutput = false;
        }
    }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.