Ejemplo n.º 1
0
        protected static PartDescriptor <T> LongPluralHelper <T>(MaybePluralPartDescriptor <T> longDescWithPluralFlag, bool defaultsToPlural = true)
        {
            if (longDescWithPluralFlag is null)
            {
                throw new ArgumentNullException(nameof(longDescWithPluralFlag));
            }

            return((arg, alternate) => longDescWithPluralFlag(arg, alternate, defaultsToPlural, out bool _));
        }
Ejemplo n.º 2
0
        private FootType(FootStyle style, ShortMaybePluralDescriptor nounText, ShortMaybePluralDescriptor shortDesc, SimpleDescriptor singleDesc,
                         MaybePluralPartDescriptor <FootData> longDesc) : base(PluralHelper(shortDesc), singleDesc)
        {
            _index    = indexMaker++;
            footStyle = style;

            this.shortDesc = shortDesc;
            this.longDesc  = longDesc ?? throw new ArgumentNullException(nameof(longDesc));
            this.fullDesc  = fullDesc ?? throw new ArgumentNullException(nameof(fullDesc));
            footStr        = nounText ?? throw new ArgumentNullException(nameof(nounText));
        }