Ejemplo n.º 1
0
 public ResourceStructureAttributeValueModel(ResourceAttributeValue value)
 {
     Id         = value.Id;
     ResourceId = value.Resource.Id;
     ResourceAttributeUsageId = value.ResourceAttributeUsage.Id;
     AttributeName            = value.ResourceAttributeUsage.ResourceStructureAttribute.Name;
     ResourceAttributeUsage   = new ResourceAttributeUsageModel(value.ResourceAttributeUsage);
 }
Ejemplo n.º 2
0
        public TextValueModel(TextValue value)
        {
            Id         = value.Id;
            Value      = value.Value;
            ResourceId = value.Resource.Id;
            ResourceAttributeUsageId = value.ResourceAttributeUsage.Id;
            ResourceAttributeUsage   = new ResourceAttributeUsageModel(value.ResourceAttributeUsage);
            AttributeName            = value.ResourceAttributeUsage.ResourceStructureAttribute.Name;

            foreach (Constraint constraint in value.ResourceAttributeUsage.ResourceStructureAttribute.Constraints)
            {
                if (constraint is DomainConstraint)
                {
                    DomainConstraint dc = (DomainConstraint)constraint;
                    dc.Materialize();
                    DomainConstraint = new DomainConstraintModel(dc);
                }
            }
        }