コード例 #1
0
        public string SerializedType(string providerName, Type type)
        {
            Verify.ArgumentNotNullOrEmpty(providerName, "providerName");
            Verify.ArgumentNotNull(type, "type");

            ITypeManagerTypeHandler typeManagerTypeHandler = GetTypeManagerTypeHandler(providerName);

            return(typeManagerTypeHandler.SerializeType(type));
        }
コード例 #2
0
        public bool HasTypeWithName(string providerName, string typeFullname)
        {
            Verify.ArgumentNotNullOrEmpty(providerName, "providerName");
            Verify.ArgumentNotNullOrEmpty(typeFullname, "typeFullname");

            ITypeManagerTypeHandler typeManagerTypeHandler = GetTypeManagerTypeHandler(providerName);

            return(typeManagerTypeHandler.HasTypeWithName(typeFullname));
        }
コード例 #3
0
        public Type GetType(string providerName, string fullName)
        {
            Verify.ArgumentNotNullOrEmpty(providerName, "providerName");
            Verify.ArgumentNotNullOrEmpty(fullName, "fullName");

            ITypeManagerTypeHandler typeManagerTypeHandler = GetTypeManagerTypeHandler(providerName);

            return(typeManagerTypeHandler.GetType(fullName));
        }
コード例 #4
0
        private static ITypeManagerTypeHandler GetTypeManagerTypeHandler(string providerName)
        {
            Resources resources = GetResources();

            return(resources.TypeHandlerCache.GetOrAdd(providerName,
                                                       provider =>
            {
                ITypeManagerTypeHandler typeHandler = resources.Factory.Create(provider);

                return typeHandler;
            }));
        }