예제 #1
0
            public override IList <ICharSequence> GetAll(AsciiString name)
            {
                IList <ICharSequence> values = base.GetAll(name);
                uint uCount = (uint)values.Count;

                if (0u >= uCount || CannotBeCombined(name))
                {
                    return(values);
                }
                if (uCount > 1u) // != 1
                {
                    ThrowHelper.ThrowInvalidOperationException_OnlyHaveOneValue();
                }

                return(UnescapeCsvFields(values[0]));
            }
예제 #2
0
            public override IEnumerable <ICharSequence> ValueIterator(AsciiString name)
            {
                var itr = base.ValueIterator(name);

                if (!itr.Any() || CannotBeCombined(name))
                {
                    return(itr);
                }
                ICharSequence value = null;

                foreach (ICharSequence v in itr)
                {
                    if (value is object)
                    {
                        ThrowHelper.ThrowInvalidOperationException_OnlyHaveOneValue();
                    }
                    value = v;
                }
                return(UnescapeCsvFields(value));
            }