예제 #1
0
        /// <summary>
        /// Main program.
        /// </summary>
        public static int Main(string[] args)
        {
            /*xxxargs = new[]
             * {
             *      @"ProjectName=AggregatorService",
             *      @"RootPath=\\rufrt-vxbuild\e$\CCNET",
             *      @"ReferencesFolderName=References",
             * };*/

            if (args == null || args.Length == 0)
            {
                DisplayUsage();
                return(0);
            }

            try
            {
                Arguments.Default = ArgumentProperties.Parse(args);
                PerformNotifications();
            }
            catch (Exception e)
            {
                return(ErrorHandler.Runtime(e));
            }

            return(0);
        }
예제 #2
0
        public static int Main(string[] args)
        {
            /*xxxargs = new[]
             * {
             *      @"ServiceName=AggregatorService",
             *      @"DisplayName=[SED] Aggregator Service",
             *      @"TargetFramework=Net35",
             *      @"BinaryPathName=C:\Users\Public\VSS\SED\TFS\Aggregator\AggregatorService\bin\Debug\AggregatorService.exe"
             * };*/

            if (args == null || args.Length == 0)
            {
                DisplayUsage();
                return(0);
            }

            try
            {
                Arguments.Default = ArgumentProperties.Parse(args);
                PerformChecks();
            }
            catch (Exception e)
            {
                return(ErrorHandler.Runtime(e));
            }

            return(RaiseError.ExitCode);
        }
예제 #3
0
        /// <summary>
        /// Main program.
        /// </summary>
        public static int Main(string[] args)
        {
            /*xxx
             * args = new[]
             * {
             *      @"ProjectName=CC.Portal.Cloud",
             *      @"CurrentVersion=1.2.3.4",
             *      @"WorkingDirectorySource=\\rufrt-vxbuild\d$\CCNET\CC.Portal.Cloud\WorkingDirectory\Source",
             *      @"WorkingDirectoryRelated=\\rufrt-vxbuild\d$\CCNET\CC.Portal.Cloud\WorkingDirectory\Related",
             *      @"ExternalReferencesPath=\\rufrt-vxbuild\ExternalReferences",
             *      @"InternalReferencesPath=\\rufrt-vxbuild\InternalReferences",
             *      @"PinnedReferencesPath=\\rufrt-vxbuild\PinnedReferences",
             *      @"ProjectType=Azure",
             *      @"UsePinned="
             * };*/

            if (args == null || args.Length == 0)
            {
                DisplayUsage();
                return(0);
            }

            try
            {
                Arguments.Default = ArgumentProperties.Parse(args);

                CancelReadonly(Arguments.WorkingDirectorySource);
                CancelReadonly(Arguments.WorkingDirectoryRelated);

                UpdateAssemblyInfo();
                UpdateProjectProperties();
                UpdateBinaryReferences();
                UpdateProjectReferences();
                UpdateServiceDefinition();
            }
            catch (Exception e)
            {
                return(ErrorHandler.Runtime(e));
            }

            return(0);
        }
예제 #4
0
        /// <summary>
        /// Main program.
        /// </summary>
        public static int Main(string[] args)
        {
            /*xxxargs = new[]
             * {
             *      @"ProjectName=CC.PE.Cloud",
             *      @"ReferencesDirectory=\\rufrt-vxbuild\d$\CCNET\CC.PE.Cloud\References",
             *      @"WorkingDirectorySource=\\rufrt-vxbuild\d$\CCNET\CC.PE.Cloud\WorkingDirectory\Source",
             *      @"ExternalReferencesPath=\\rufrt-vxbuild\ExternalReferences",
             *      @"InternalReferencesPath=\\rufrt-vxbuild\InternalReferences",
             *      @"ProjectType=Azure",
             *      @"AssemblyName=CC.PE.Cloud",
             *      @"FriendlyName=UNSPECIFIED",
             *      @"DownloadZone=UNSPECIFIED",
             *      @"VisualStudioVersion=2010",
             *      @"TargetFramework=UNSPECIFIED",
             *      @"TargetPlatform=AnyCPU",
             *      @"RootNamespace=CC.PE.Cloud",
             *      @"SuppressWarnings=",
             *      @"AllowUnsafeBlocks=False",
             *      @"ExpectedVersion=UNSPECIFIED"
             * };*/

            if (args == null || args.Length == 0)
            {
                DisplayUsage();
                return(0);
            }

            try
            {
                Arguments.Default = ArgumentProperties.Parse(args);
                PerformChecks();
            }
            catch (Exception e)
            {
                return(ErrorHandler.Runtime(e));
            }

            return(RaiseError.ExitCode);
        }
예제 #5
0
        /// <summary>
        /// Main program.
        /// </summary>
        public static int Main(string[] args)
        {
            /*xxxargs = new[]
             * {
             *      @"InternalReferencesPath=\\rufrt-vxbuild\d$\InternalReferences - Copy",
             *      @"PublicationStoragePath=\\rufrt-vxbuild\d$\PublicationStorage - Copy",
             *      @"DaysToLive=30",
             * };*/

            if (args == null || args.Length == 0)
            {
                DisplayUsage();
                return(0);
            }

            try
            {
                Arguments.Default = ArgumentProperties.Parse(args);

                var internalReferences = new CleaningFolder(
                    Arguments.InternalReferencesPath,
                    new InternalReferencesObsoleteDetector());
                internalReferences.Clean();

                var publicationStorage = new CleaningFolder(
                    Arguments.PublicationStoragePath,
                    new PublicationStorageObsoleteDetector());
                publicationStorage.Clean();
            }
            catch (Exception e)
            {
                return(ErrorHandler.Runtime(e));
            }

            return(0);
        }
예제 #6
0
        public static int Main(string[] args)
        {
            if (args == null || args.Length == 0)
            {
                DisplayUsage();
                return(0);
            }

            try
            {
                Arguments.Default = ArgumentProperties.Parse(args);

                if (!File.Exists(Arguments.DataCoverageFile))
                {
                    return(0);
                }

                using (CoverageInfo info = CoverageInfo.CreateFromFile(Arguments.DataCoverageFile))
                {
                    CoverageDS data = info.BuildDataSet();

                    string outputXml = Transform(data.GetXml());

                    XDocument doc = XDocument.Parse(outputXml);
                    ShortenMethodNames(doc);
                    File.WriteAllText(Arguments.XmlCoverageFile, doc.ToString());
                }
            }
            catch (Exception ex)
            {
                Console.Error.WriteLine(ex.ToString());
                return(1);
            }

            return(0);
        }
예제 #7
0
 /// <summary>
 /// Initializes a new instance.
 /// </summary>
 public Arguments(string[] args)
 {
     m_properties = ArgumentProperties.Parse(args);
 }