public override void ConfigureServices(ServiceConfigurationContext context)
 {
     Configure <ContractOptions>(o => o.ContractDeploymentAuthorityRequired = false);
     context.Services.RemoveAll <IPreExecutionPlugin>();
     context.Services.Replace(ServiceDescriptor
                              .Singleton <IBlockTimeProvider, DelayBlockTimeProvider>());
 }
Esempio n. 2
0
        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);
     }
 }
Esempio n. 4
0
 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;
 }
Esempio n. 7
0
 public static void TryAdd(this Microsoft.Extensions.DependencyInjection.IServiceCollection collection, Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor) => throw null;