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; }
// 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); } }
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; }
// 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; } }
public FactoryImpl(IInterfaceTypeChecker typeChecker) { if (typeChecker == null) throw new ArgumentNullException("typeChecker"); _typeChecker = typeChecker; }