/// <summary> /// Creates a new <see cref="ReportingServices"/> instance with the /// specified configuration. /// </summary> /// <param name="configuration"> /// The configuration for the client, specifying how to communicate /// with RSMassTransit. /// </param> protected ReportingServices(ReportingServicesConfiguration configuration) { Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); var bus = CreateBus(out _queueUri); bus.Start(); _bus = bus; }
private static Fake WithInstance(Action <ReportingServicesConfiguration>?setup = null) { var configuration = new ReportingServicesConfiguration { BusUri = Fake.Uri }; setup?.Invoke(configuration); return(new Fake(configuration)); }
/// <summary> /// Creates a new <see cref="ReportingServices"/> instance with /// the specified configuration. /// </summary> /// <param name="configuration"> /// The configuration for the client, specifying how to communicate /// with RSMassTransit. /// </param> public static ReportingServices Create(ReportingServicesConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } LoadAssemblies(); var supportedSchemes = DiscoverSupportedSchemes(); var requestedScheme = configuration.BusUri?.Scheme; if (!supportedSchemes.TryGetValue(requestedScheme, out Type type)) { throw OnUnsupportedScheme(requestedScheme, supportedSchemes.Keys); } return((ReportingServices)Activator.CreateInstance(type, configuration)); }
public FakeReportingServices(ReportingServicesConfiguration configuration) : base(configuration) { }