private CommandSubscriptionInfo(bool isDynamic, string commandName, Type commandType, Type returnType, Type handlerType) { IsDynamic = isDynamic; CommandName = commandName; CommandType = commandType; ReturnType = returnType; HandlerType = handlerType; _factory = CqrsServiceCollectionExtensions.CreateFactory(commandType, handlerType, false); }
private QuerySubscriptionInfo(bool isDynamic, string queryName, Type queryType, Type returnType, Type handlerType) { IsDynamic = isDynamic; QueryName = queryName; QueryType = queryType; ReturnType = returnType; HandlerType = handlerType; _factory = CqrsServiceCollectionExtensions.CreateFactory(queryType, handlerType, true); }