public IXamlType GetXamlType(Type type)
 {
     if (type.IsConstructedGenericType && type.GetGenericTypeDefinition() == typeof(PlatformProxy <>))
     {
         return(ProxyXamlType.Get(type.GenericTypeArguments[0]));
     }
     return(null);
 }
예제 #2
0
        public static ProxyXamlType Get(Type type)
        {
            var meta = TypeMeta.Get(type);

            lock (_cache)
            {
                ProxyXamlType result;
                if (!_cache.TryGetValue(type, out result))
                {
                    _cache[type] = result = new ProxyXamlType(meta);
                }
                return(result);
            }
        }
예제 #3
0
 public static ProxyXamlType Get(Type type)
 {
     var meta = TypeMeta.Get(type);
     lock (_cache)
     {
         ProxyXamlType result;
         if (!_cache.TryGetValue(type, out result))
             _cache[type] = result = new ProxyXamlType(meta);
         return result;
     }
 }