public bool IsHisName(string unitName)
 {
     if (OriginalName == null || unitName == null)
     {
         return(false);
     }
     return(OriginalName.ToLower().Equals(unitName.ToLower()));
 }
Esempio n. 2
0
        private bool sameAsOriginal(string newName, bool shouldCompareUsingOriginalCase)
        {
            var newNameToCheck      = newName.Trim();
            var originalNameToCheck = OriginalName;

            if (!shouldCompareUsingOriginalCase)
            {
                newNameToCheck      = newNameToCheck.ToLower();
                originalNameToCheck = OriginalName.ToLower();
            }

            return(!string.IsNullOrEmpty(OriginalName) && string.Equals(originalNameToCheck, newNameToCheck));
        }
Esempio n. 3
0
        private bool sameAsOriginalInLowCase(string newName)
        {
            var newNameToLower = newName.ToLower().Trim();

            return(!string.IsNullOrEmpty(OriginalName) && string.Equals(OriginalName.ToLower(), newNameToLower));
        }