Пример #1
0
 public int CompareTo(IType other)
 {
     if (other is TypeWithSurrogates)
     {
         return(_wrappedType.CompareTo(((TypeWithSurrogates)other)._wrappedType));
     }
     return(_wrappedType.CompareTo(other));
 }
Пример #2
0
        /// <summary>
        /// </summary>
        /// <param name="type">
        /// </param>
        /// <param name="other">
        /// </param>
        /// <returns>
        /// </returns>
        public static bool TypeEquals(this IType type, IType other)
        {
            if (type == null && other == null)
            {
                return(true);
            }

            if (type != null && other == null || type == null && other != null)
            {
                return(false);
            }

            return(type != null && other.CompareTo(type) == 0);
        }
Пример #3
0
        /// <summary>
        /// </summary>
        /// <param name="type">
        /// </param>
        /// <param name="other">
        /// </param>
        /// <returns>
        /// </returns>
        public static bool TypeEquals(this IType type, IType other)
        {
            if (type == null && other == null)
            {
                return true;
            }

            if (type != null && other == null || type == null && other != null)
            {
                return false;
            }

            return type != null && other.CompareTo(type) == 0;
        }
Пример #4
0
 /// <summary>
 /// </summary>
 /// <param name="type">
 /// </param>
 /// <param name="other">
 /// </param>
 /// <returns>
 /// </returns>
 public static bool TypeEquals(this IType type, IType other)
 {
     return type != null && other.CompareTo(type) == 0;
 }
Пример #5
0
 /// <summary>
 /// </summary>
 /// <param name="type">
 /// </param>
 /// <param name="other">
 /// </param>
 /// <returns>
 /// </returns>
 public static bool TypeEquals(this IType type, IType other)
 {
     return(type != null && other.CompareTo(type) == 0);
 }
 public bool IsAssignableFrom(IType member)
 {
     return(member != null && member.CompareTo(this) >= 0);
 }