public TypeDiscoveredMessage(TypeModel typeModel) { if (typeModel == null) throw new ArgumentNullException("typeModel"); _typeModel = typeModel; }
public bool GetOrAddTypeModel(Type type, out TypeModel typeModel) { TypeModel created = null; typeModel = _typeModels.GetOrAdd(type, t => created = MapType(type)); return created == typeModel; }