예제 #1
0
파일: ObjectId.cs 프로젝트: ss22219/Booker
        public static bool TryParse(string value, out ObjectId objectId)
        {
            objectId = Empty;
            if (value == null || value.Length != 24)
            {
                return false;
            }

            try
            {
                objectId = new ObjectId(value);
                return true;
            }
            catch (FormatException)
            {
                return false;
            }
        }
예제 #2
0
파일: ObjectId.cs 프로젝트: ss22219/Booker
 public bool Equals(ObjectId other)
 {
     return other != null && ToString() == other.ToString();
 }