public override bool SetValue(RepresentationAttribute attr) { if (attr == null || attr.SchemaAttribute == null || SchemaAttribute == null) { return(false); } var target = attr as SingularRepresentationAttribute <T>; if (target == null) { return(false); } Value = target.Value; return(true); }
protected override int CompareTo(RepresentationAttribute attr) { var complex = attr as ComplexRepresentationAttribute; if (complex == null || complex.Values == null) { return(1); } if (Values == null) { return(-1); } var sourcePrimary = Values.FirstOrDefault(p => p.SchemaAttribute != null && p.SchemaAttribute.Name == Common.Constants.MultiValueAttributeNames.Primary); var targetPrimary = complex.Values.FirstOrDefault(p => p.SchemaAttribute != null && p.SchemaAttribute.Name == Common.Constants.MultiValueAttributeNames.Primary); if (sourcePrimary == null || targetPrimary == null) { return(0); } return(sourcePrimary.CompareTo(targetPrimary)); }
protected virtual int CompareTo(RepresentationAttribute attr) { return(0); }
public virtual bool SetValue(RepresentationAttribute attr) { return(false); }