Пример #1
0
        private InterfaceType(Type type, IInterfaceTypeChecker typeChecker)
        {
            if (type == null) throw new ArgumentNullException("type");
            if (typeChecker == null) throw new ArgumentNullException("typeChecker");

            if (!typeChecker.IsInterfaceType(type))
            {
                Logging.Log.ErrorFormat("[{0}] is not an interface type", type.AssemblyQualifiedName);
                throw new ArgumentOutOfRangeException("type");
            }

            this._type = type;
            this._typeChecker = typeChecker;
        }
Пример #2
0
 // TODO: Mit david nochmals besprechen
 internal static InterfaceType Create(Type type, IInterfaceTypeChecker typeChecker)
 {
     lock (_lock)
     {
         if (type == null)
         {
             return(new InterfaceType());              // Possible, because a Type could be loaded from an XML File which does not exists in this Zetbox instance
         }
         if (_cache.ContainsKey(type))
         {
             return(_cache[type]);
         }
         var ift = new InterfaceType(type, typeChecker);
         _cache[type] = ift;
         return(ift);
     }
 }
Пример #3
0
        private InterfaceType(Type type, IInterfaceTypeChecker typeChecker)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }
            if (typeChecker == null)
            {
                throw new ArgumentNullException("typeChecker");
            }

            if (!typeChecker.IsInterfaceType(type))
            {
                Logging.Log.ErrorFormat("[{0}] is not an interface type", type.AssemblyQualifiedName);
                throw new ArgumentOutOfRangeException("type");
            }

            this._type        = type;
            this._typeChecker = typeChecker;
        }
Пример #4
0
 // TODO: Mit david nochmals besprechen
 internal static InterfaceType Create(Type type, IInterfaceTypeChecker typeChecker)
 {
     lock (_lock)
     {
         if (type == null) return new InterfaceType(); // Possible, because a Type could be loaded from an XML File which does not exists in this Zetbox instance
         if (_cache.ContainsKey(type)) return _cache[type];
         var ift = new InterfaceType(type, typeChecker);
         _cache[type] = ift;
         return ift;
     }
 }
Пример #5
0
 public FactoryImpl(IInterfaceTypeChecker typeChecker)
 {
     if (typeChecker == null) throw new ArgumentNullException("typeChecker");
     _typeChecker = typeChecker;
 }