Пример #1
0
 public virtual bool Equals(Type t)
 {
     if (t == null)
     {
         return(false);
     }
     return(XzaarBaseTypes.Typeof(t) == this);
 }
Пример #2
0
        public static bool TryGetType(string typeName, StructExpression typeExpression, out XzaarType newType)
        {
            var a = GetType(typeName);

            if (a == null || Equals(a, XzaarBaseTypes.Void) || Equals(a, XzaarBaseTypes.Any))
            {
                newType = XzaarBaseTypes.CreateTypeFromStructExpression(typeExpression);
                XzaarBaseTypes.AddTypeToCache(newType);
            }
            else
            {
                newType = a;
            }
            return(true);
        }