public static ParamTypeConflictInfo TestConflict(string packageName, TblParamTypes_Row t1, ParamType t2) { if (!t1.Name.Equals(t2.Name, StringComparison.OrdinalIgnoreCase)) { return(null); // TODO: Case sensitive? } if (!t1.Dimensions.Equals(t2.Dimensions)) { return(new ParamTypeConflictInfo(packageName, t1, ConflictType.InConsistent, ParamTypeConflictReason.Dimensions, "Dimensions", "Inconsistent dimensions")); } if (!t1.Description.Equals(t2.Description)) { return(new ParamTypeConflictInfo(packageName, t1, ConflictType.Consistent, ParamTypeConflictReason.Description, "Description", "Different description")); } return(new ParamTypeConflictInfo(packageName, t1, ConflictType.Duplicate, ParamTypeConflictReason.Duplicate, "Duplicate", "Duplicate")); }
/// <summary> /// Create a new content item from the database row /// </summary> /// <param name="baseUomRows">Used to store the base uom definitions that are found within the param type rows</param> public static ParamType NewContentItem(string packageName, TblParamTypes_Row t1) { ParamType paramType = new ParamType(packageName, t1.Name, t1.Description, t1.BaseUom, t1.Dimensions, t1.Popularity); return(paramType); }