Esempio n. 1
0
        public void Visit(SetPropertyFixedAmendment amendment)
        {
            var component     = this.componentCollection.FindComponentWithProperties(amendment.ComponentPath);
            var specification = this.specificationLibrary.Lookup(component.Name);

            var property = component.FindOrCreateProperty(specification.Properties.Find(amendment.PropertyName));

            property.Value = new FixedPropertyValue(amendment.FixedValue);
        }
Esempio n. 2
0
        public void Visit(SetPropertyFixedAmendment amendment)
        {
            var component = this.componentCollection.FindComponentWithProperties(amendment.ComponentPath);
            var specification = this.specificationLibrary.Lookup(component.Name);

            var property = component.FindOrCreateProperty(specification.Properties.Find(amendment.PropertyName));

            property.Value = new FixedPropertyValue(amendment.FixedValue);
        }
Esempio n. 3
0
 public AmendmentSurrogate Visit(SetPropertyFixedAmendment amendment)
 {
     return(new SetPropertyFixedAmendmentSurrogate
     {
         ComponentPath = amendment.ComponentPath.ToComponentPathString(),
         PropertyName = amendment.PropertyName,
         FixedValue = amendment.FixedValue
     });
 }
Esempio n. 4
0
 public AmendmentResource Visit(SetPropertyFixedAmendment amendment, int index)
 {
     return(new SetPropertyFixedAmendmentResource
     {
         Id = index,
         ComponentPath = amendment.ComponentPath.ToComponentPathString(),
         PropertyName = amendment.PropertyName,
         Value = amendment.FixedValue,
         Links = this.BuildLinks(amendment, index)
     });
 }
Esempio n. 5
0
        public void SetUp()
        {
            this.Template.Insert(0, new Atom("the atom", Enumerable.Empty <Property>()));

            var propertiespecification = new PropertySpecification("property name", "property type", string.Empty);

            this.ComponentSpecification.Stub(s => s.Properties).Return(new[] { propertiespecification });

            var amendment = new SetPropertyFixedAmendment(new[] { 0 }, "property name", "updated value");

            this.Visitor.Visit(amendment);
        }
        public void SetUp()
        {
            this.Template.Insert(0, new Atom("the atom", Enumerable.Empty<Property>()));

            var propertiespecification = new PropertySpecification("property name", "property type", string.Empty);

            this.ComponentSpecification.Stub(s => s.Properties).Return(new[] { propertiespecification });

            var amendment = new SetPropertyFixedAmendment(new[] { 0 }, "property name", "updated value");

            this.Visitor.Visit(amendment);
        }