Exemple #1
0
 public void MapAttributeDefinition(
     AttributeDefinition source,
     Model.Attribution.MetaData.AttributeDefinition destination,
     AbstractLookupHelper lookupHelper,
     AbstractMappingEngine masterMapper)
 {
     MapAttributeDefinition(source, destination, lookupHelper, masterMapper, null);
 }
        public static AttributeDefinition MapAttributeDefinition(Model.Attribution.MetaData.AttributeDefinition attributeDefinition, AbstractLookupHelper lookupHelper, AbstractMappingEngine masterMapper)
        {
            Mandate.ParameterNotNull(attributeDefinition, "attributeDefinition");

            var mapped = GetObjectReference(attributeDefinition.Id, lookupHelper, () => new AttributeDefinition());

            MapAttributeDefinition(attributeDefinition, mapped, lookupHelper, masterMapper);
            return(mapped);
        }
 public static void MapAttributeDefinition(Model.Attribution.MetaData.AttributeDefinition source, AttributeDefinition destination, AbstractLookupHelper lookupHelper, AbstractMappingEngine masterMapper)
 {
     destination.Ordinal       = source.Ordinal;
     destination.Alias         = source.Alias;
     destination.AttributeType = MapAttributeTypeDefinition(source.AttributeType, lookupHelper, masterMapper);
     destination.Description   = source.Description;
     //destination.AttributeSchemaDefinition = MapAttributeSchemaDefinition(source.AttributeType.)
     destination.Id               = (Guid)source.Id.Value;
     destination.Name             = source.Name;
     destination.XmlConfiguration = source.RenderTypeProviderConfigOverride;
 }
Exemple #4
0
        /// <summary>
        /// Used to map attribute definitions when mapping the EntitySchema
        /// </summary>
        /// <param name="attributeDefinition"></param>
        /// <param name="lookupHelper"></param>
        /// <param name="masterMapper"></param>
        /// <param name="attributeTypeCache">A local cache object to resolve already resolved AttributeTypes</param>
        /// <returns></returns>
        private Model.Attribution.MetaData.AttributeDefinition MapAttributeDefinition(
            AttributeDefinition attributeDefinition,
            AbstractLookupHelper lookupHelper,
            AbstractMappingEngine masterMapper,
            ICollection <Model.Attribution.MetaData.AttributeType> attributeTypeCache)
        {
            //TODO:
            //- Add ConcurrencyToken to Rdbms model
            //- Remove Status, Dates
            var mapped = new Model.Attribution.MetaData.AttributeDefinition();

            MapAttributeDefinition(attributeDefinition, mapped, lookupHelper, masterMapper, attributeTypeCache);
            return(mapped);
        }
Exemple #5
0
 /// <summary>
 /// Used to map attribute definitions when mapping the EntitySchema
 /// </summary>
 /// <param name="source"></param>
 /// <param name="destination"></param>
 /// <param name="lookupHelper"></param>
 /// <param name="masterMapper"></param>
 /// <param name="attributeTypeCache">A local cache object to resolve already resolved AttributeTypes</param>
 private void MapAttributeDefinition(
     AttributeDefinition source,
     Model.Attribution.MetaData.AttributeDefinition destination,
     AbstractLookupHelper lookupHelper,
     AbstractMappingEngine masterMapper,
     ICollection <Model.Attribution.MetaData.AttributeType> attributeTypeCache = null)
 {
     destination.Ordinal       = source.Ordinal;
     destination.Alias         = source.Alias;
     destination.AttributeType = MapAttributeTypeDefinition(source.AttributeType, lookupHelper, masterMapper, attributeTypeCache);
     destination.Id            = (HiveId)source.Id;
     destination.Name          = source.Name;
     destination.Description   = source.Description;
     destination.RenderTypeProviderConfigOverride = source.XmlConfiguration;
     destination.AttributeGroup = MapAttributeGroupDefinition(source.AttributeDefinitionGroup, lookupHelper, masterMapper);
 }