Пример #1
0
        protected static SimpleDescriptor PluralHelper(ShortMaybePluralDescriptor shortDescWithPluralFlag, bool defaultsToPlural = true)
        {
            if (shortDescWithPluralFlag is null)
            {
                throw new ArgumentNullException(nameof(shortDescWithPluralFlag));
            }

            return(() => shortDescWithPluralFlag(defaultsToPlural, out bool _));
        }
Пример #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));
        }