public static void Increment( this IProgress<GeneratorProgress> progress, GeneratorProgress currentProgress )
 {
     Arg.NotNull( progress, nameof( progress ) );
     Arg.NotNull( currentProgress, nameof( currentProgress ) );
     progress.Report( new GeneratorProgress( Math.Min( currentProgress.Completed + 1, currentProgress.Total ), currentProgress.Total ) );
 }
        public static void ReportWarning( this IProgress<GeneratorProgress> progress, string message, int line, int column )
        {
            Arg.NotNull( progress, nameof( progress ) );
            Arg.NotNullOrEmpty( message, nameof( message ) );
            Arg.GreaterThanOrEqualTo( line, 0, nameof( line ) );
            Arg.GreaterThanOrEqualTo( column, 0, nameof( column ) );

            var error = new GeneratorError( message, line, column )
            {
                IsWarning = true
            };
            var value = new GeneratorProgress( error );

            progress.Report( value );
        }
        public static void ReportWarning( this IProgress<GeneratorProgress> progress, string message )
        {
            Arg.NotNull( progress, nameof( progress ) );
            Arg.NotNullOrEmpty( message, nameof( message ) );

            var error = new GeneratorError( message )
            {
                IsWarning = true
            };
            var value = new GeneratorProgress( error );

            progress.Report( value );
        }