Exemplo n.º 1
0
            public void Visit(BeginProperty instruction)
            {
                var target = _properties.SingleOrDefault(_ => _.Name.EqualsIgnoreCase(instruction.Key.Resolve(_services).ToString()));

                if (target == null || instruction.Field == null)
                {
                    return;
                }

                var fieldName = instruction.Field.Resolve(_services).ToString();
                var field     = Table.Fields[fieldName];

                if (field == null)
                {
                    return;
                }

                var fieldMetadata = _metadata.MetadataFor(field);

                Properties.Add(new MappedProperty(target, field, fieldMetadata));
            }
Exemplo n.º 2
0
        public void Visit(BeginProperty instruction)
        {
            if (!instruction.IsIdentifier)
            {
                return;
            }

            if (Identifier != null)
            {
                throw new ArgumentException("There are multiple identifying fields defined on the model map being visited.");
            }

            var field = instruction.Field.Resolve(_services).ToString();

            Identifier = new ModelMapProperty
            {
                FieldName       = field,
                Key             = instruction.Key.Resolve(_services).ToString(),
                SchemaFieldType = getSchemaFieldType(field)
            };
        }
        public void Visit(BeginProperty instruction)
        {
            var key = instruction.Key.Resolve(_services).ToString();

            _propertyDef = new PropertyDefinition
            {
                Key = instruction.Key.Resolve(_services).ToString()
            };

            if (instruction.Field == null)
            {
                return;
            }

            _currentFieldMap = new FieldMap
            {
                Key          = key,
                FieldNames   = new [] { instruction.Field.Resolve(_services).ToString() },
                IsIdentifier = instruction.IsIdentifier,
                PropertyType = PropertyTypes.Parse(instruction.DataType.Resolve(_services).ToString())
            };
        }
Exemplo n.º 4
0
 public void Visit(BeginProperty instruction)
 {
 }
 public void Visit(BeginProperty instruction)
 {
     _instructions.Add(instruction);
 }