Exemple #1
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);
        }
Exemple #2
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;
		}