예제 #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;
 }