Пример #1
0
 protected void ClearState()
 {
     this.bnfTerm         = null;
     this.value           = null;
     this.defaultValue    = null;
     this.isOptionalValue = false;
     this.Flags           = TermFlags.None;
     this.AstConfig       = null;
     this.inverseValueConverterForUnparse = null;
     this.UtokenizerForUnparse            = null;
 }
Пример #2
0
        protected void SetState(BnfiTermConversion source)
        {
            this.bnfTerm         = source.bnfTerm;
            this.value           = source.value;
            this.defaultValue    = source.defaultValue;
            this.isOptionalValue = source.isOptionalValue;
            this.Flags           = source.Flags;
            this.AstConfig       = source.AstConfig;

            this.inverseValueConverterForUnparse = source.inverseValueConverterForUnparse;

            if (this.UtokenizerForUnparse != null)
            {
                this.UtokenizerForUnparse = source.UtokenizerForUnparse;
            }
        }
Пример #3
0
 protected static ValueUtokenizer <object> CastUtokenizerToObject <T>(ValueUtokenizer <T> utokenizer)
 {
     return((formatProvider, reference, obj) => utokenizer(formatProvider, reference, (T)obj));
 }