src/AnvilPacker/Encoder/BlockCodec.cs
/// <summary> Creates an instance of this class if <paramref name="listener"/> is not null. </summary>
Creates an instance of this class if  is not null.
Creates an instance of this class if is not null .
public static CodecProgressListener? MaybeCreate(int totalBlocks, IProgress<double>? listener)
        {
            if (listener == null) {
                return null;
            }
            return new CodecProgressListener() {
                TotalBlocks = totalBlocks,
                CodedBlocks = 0,
                Listener = listener
            };
        }
public static CodecProgressListener ? MaybeCreate ( int totalBlocks , IProgress < double > ? listener ) { if ( listener == null ) { return null ; } return new CodecProgressListener ( ) { TotalBlocks = totalBlocks , CodedBlocks = 0 , Listener = listener } ; }
Creates an instance of this class if  is not null.
Creates an instance of this class if is not null .
totalBlocks
int
listener
IProgress<double>?