Example #1
0
        public int CompareTo(DataMappingEntry dataMappingEntry)
        {
            int c = NameFrom.CompareTo(dataMappingEntry.NameFrom);
            if (c == 0)
            {
                c = NameTo.CompareTo(dataMappingEntry.NameTo);

                if (c == 0)
                {
                    c = Mandatory.CompareTo(dataMappingEntry.Mandatory);
                }

                // Info not compared
            }

            return c;
        }
Example #2
0
 /// <summary>
 /// Returns true if the mapping is valid.
 /// A mapping is considered valid if it's not null or blank (not mapped) and
 /// it's not MappingDoesntExist (set as not mapped).
 /// </summary>
 /// <param name="dataMappingEntry"></param>
 /// <returns></returns>
 public static bool IsValidMapping(DataMappingEntry dataMappingEntry)
 {
     return dataMappingEntry != null && !string.IsNullOrEmpty(dataMappingEntry.NameFrom) && IsValidMapping(dataMappingEntry.NameTo);
 }