/// <summary> /// Compare operands /// </summary> /// <param name="model"></param> /// <param name="other"></param> /// <returns></returns> public static bool IsSameAs(this SimpleAttributeOperandModel model, SimpleAttributeOperandModel other) { if (model == null && other == null) { return(true); } if (model == null || other == null) { return(false); } if (model.AttributeId != other.AttributeId) { return(false); } if (!model.BrowsePath.SequenceEqualsSafe(other.BrowsePath)) { return(false); } if (model.IndexRange != other.IndexRange) { return(false); } if (model.NodeId != other.NodeId) { return(false); } return(true); }
/// <summary> /// Clone /// </summary> /// <param name="model"></param> /// <returns></returns> public static SimpleAttributeOperandModel Clone(this SimpleAttributeOperandModel model) { if (model == null) { return(null); } return(new SimpleAttributeOperandModel { AttributeId = model.AttributeId, BrowsePath = model.BrowsePath, IndexRange = model.IndexRange, NodeId = model.NodeId }); }