コード例 #1
0
        public static void LibManRestore(this ICakeContext context, LibManRestoreSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            LibManAddinInformation.LogVersionInformation(context.Log);
            var tool = new LibManRestoreTool(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, context.Log);

            tool.Restore(settings);
        }
コード例 #2
0
        public static void LibManRestore(this ICakeContext context, Action <LibManRestoreSettings> configurator)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            if (configurator == null)
            {
                throw new ArgumentNullException(nameof(configurator));
            }

            var settings = new LibManRestoreSettings();

            configurator(settings);
            context.LibManRestore(settings);
        }