public override void ConfigureServices(ServiceConfigurationContext context) { Configure <ContractOptions>(o => o.ContractDeploymentAuthorityRequired = false); context.Services.RemoveAll <IPreExecutionPlugin>(); context.Services.Replace(ServiceDescriptor .Singleton <IBlockTimeProvider, DelayBlockTimeProvider>()); }
public static IRegistration CreateWindsorRegistration(this Microsoft.Extensions.DependencyInjection.ServiceDescriptor service) { if (service.ServiceType.ContainsGenericParameters) { return(RegistrationAdapter.FromOpenGenericServiceDescriptor(service)); } return(RegistrationAdapter.FromServiceDescriptor(service)); }
public static IRegistration CreateWindsorRegistration(this Microsoft.Extensions.DependencyInjection.ServiceDescriptor service) { if (service.ServiceType.ContainsGenericParameters) { return(RegistrationAdapter.FromOpenGenericServiceDescriptor(service)); } else { var method = typeof(RegistrationAdapter).GetMethod("FromServiceDescriptor", BindingFlags.Static | BindingFlags.Public).MakeGenericMethod(service.ServiceType); return(method.Invoke(null, new object[] { service }) as IRegistration); } }
public static TBuilder AddProtobufProtocol <TBuilder>( this TBuilder builder, IReadOnlyDictionary <int, Type> protobufTypes ) where TBuilder : ISignalRBuilder { builder.Services.RemoveAll <IHubProtocol>(); builder.Services.TryAddEnumerable( ServiceDescriptor.Singleton <IHubProtocol>( new ProtobufProtocol(protobufTypes) ) ); return(builder); }
public static void TryAddEnumerable(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) { }
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Replace(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) { throw null; }
public static void TryAdd(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) => throw null;