示例#1
0
        protected override DomObject SetNameCore(DomName name)
        {
            var newAttr = OwnerDocument.CreateAttribute(name);

            newAttr.DomValue = DomValue.Clone();
            newAttr.CopyAnnotationsFrom(AnnotationList);
            return(ReplaceWith(newAttr));
        }
示例#2
0
        protected virtual DomAttribute CloneCore()
        {
            var result = OwnerDocument.CreateAttribute(Name, Value);

            result.DomValue = DomValue.Clone();
            result.CopyAnnotationsFrom(AnnotationList);
            return(result);
        }
示例#3
0
 public DomValue()
 {
     if (HasOverriddenConversion)
     {
         _impl = DomValue.CreateUserDefinedImpl(Convert, ConvertBack);
     }
     else
     {
         _impl = DomValue.CreateImpl <T>();
     }
 }
        private DomAttribute ApplySchema(DomAttribute attr)
        {
            if (Schema == null)
            {
                return(attr);
            }
            var def = Schema.AttributeDefinitions[attr.Name];

            if (def != null && def.ValueType != null)
            {
                attr.DomValue = DomValue.Create(def.ValueType);
            }
            return(attr);
        }
示例#5
0
 public DomAttribute AppendValue(object value)
 {
     InvalidatingValue(() => DomValue.AppendValue(value));
     return(this);
 }