Пример #1
0
        Expression Field(ITransform transform, FieldDef fieldDef, IField field)
        {
            var fieldId     = Expression.Constant(fieldDef.id);
            var fieldType   = Expression.Constant(fieldDef.type.id);
            var fieldParser = new UntaggedParser <R>(this, schema.GetFieldSchema(fieldDef));

            return(Expression.IfThenElse(reader.ReadFieldOmitted(),
                                         field != null ? field.Omitted : Expression.Empty(),
                                         field != null ?
                                         field.Value(fieldParser, fieldType) :
                                         transform.UnknownField(fieldParser, fieldType, fieldId) ?? fieldParser.Skip(fieldType)));
        }
Пример #2
0
 UntaggedParser(UntaggedParser <R> that, RuntimeSchema schema)
     : this(that.reader, that.deferredSkip, schema, that.bondedFactory)
 {
 }