Exemplo n.º 1
0
        /// <summary>
        /// Populate the result of the mapping from the row data
        /// </summary>
        private void PopulateMap()
        {
            this.map = new Dictionary <SpecRelationType, SpecRelationTypeMap>();
            foreach (var row in this.SpecTypes)
            {
                var attributes = new List <AttributeDefinitionMap>();
                foreach (var attDefinition in row.AttributeDefinitions)
                {
                    var attributeMap = new AttributeDefinitionMap(attDefinition.Identifiable, attDefinition.AttributeDefinitionMapKind);
                    attributes.Add(attributeMap);
                }

                var mapping = new SpecRelationTypeMap(row.Identifiable, row.SelectedRules, row.SelectedCategories.Select(x => x.Category), attributes, row.SelectedBinaryRelationshipRules);
                this.map.Add(row.Identifiable, mapping);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sets the maps
        /// </summary>
        private void SetMaps()
        {
            this.specTypeMap = new Dictionary <SpecificationType, SpecTypeMap>();
            foreach (var specTypeRow in this.SpecTypes)
            {
                var attributes = new List <AttributeDefinitionMap>();
                foreach (var attDefinition in specTypeRow.AttributeDefinitions)
                {
                    var attributeMap = new AttributeDefinitionMap(attDefinition.Identifiable, attDefinition.AttributeDefinitionMapKind);
                    attributes.Add(attributeMap);
                }

                var map = new SpecTypeMap(specTypeRow.Identifiable, specTypeRow.SelectedRules, specTypeRow.SelectedCategories.Select(x => x.Category), attributes);
                this.specTypeMap.Add(specTypeRow.Identifiable, map);
            }
        }