/// <summary> /// Initializes a new instance of the AuthenticationInit class /// </summary> /// <param name="parent">the object that initializes the web-host</param> public SslHubInit(IServiceHubProvider parent, bool withHsts, int httpsRedirectPort) { this.parent = parent; this.withHsts = withHsts; this.httpsRedirectPort = httpsRedirectPort; parent.RegisterAppConfigureProvider(this); parent.RegisterServicesConfigureProvider(this); parent.RegisterEndPointDefaultsConfigurator(this); certificateAutoSelect = true; }
/// <summary> /// Initializes a new instance of the AuthenticationInit class /// </summary> /// <param name="parent">the object that initializes the web-host</param> public SslHubInit(IServiceHubProvider parent, bool withHsts, int httpsRedirectPort, string pathToCertificate, string certificatePassword) { this.parent = parent; this.withHsts = withHsts; this.httpsRedirectPort = httpsRedirectPort; this.pathToCertificate = pathToCertificate; this.certificatePassword = certificatePassword; parent.RegisterAppConfigureProvider(this); parent.RegisterServicesConfigureProvider(this); parent.RegisterEndPointDefaultsConfigurator(this); }
/// <summary> /// Initializes a new instance of the LocalServiceHubConsumer class /// </summary> /// <param name="serviceName">the local service name</param> /// <param name="localProvider">the local serviceHubProvider instance</param> public LocalServiceHubConsumer(string serviceName, IServiceHubProvider localProvider, string consumedService, ICustomServerSecurity serverSecurity) { this.localProvider = localProvider; ServiceName = serviceName; this.consumedService = consumedService; this.serverSecurity = serverSecurity; rnd = new Random(); if (!string.IsNullOrEmpty(serviceName) && !string.IsNullOrEmpty(consumedService)) { TemporaryGrants.GrantTemporaryPermission(consumedService, serviceName); } }
public MessageClient(IServiceHubProvider serviceHub, string targetService, bool useEvents) { if (!useEvents) { connection = new LocalServiceHubConsumer(null, serviceHub, targetService, null); } else { connection = new LocalServiceHubConsumer($"{Guid.NewGuid()}", serviceHub, targetService, null); isBidirectional = true; } this.targetService = targetService; this.useEvents = useEvents; if (useEvents) { connection.MessageArrived += ProcessMessage; } connected = true; }
public GrpcServer(IServiceHubProvider serviceHub, IDictionary <string, object> exposedObjects, string serviceName) : this(serviceHub, exposedObjects, serviceName, false, false, null) { }
public GrpcServer(IServiceHubProvider serviceHub, IDictionary <string, object> exposedObjects, string serviceName, bool useExtendedProxying, bool useSecurity, ICustomServerSecurity security) : base(serviceHub, exposedObjects, serviceName, useExtendedProxying, useSecurity, security) { }
public GrpcServer(IServiceHubProvider serviceHub, PluginFactory factory, string serviceName, bool useExtendedProxying) : this(serviceHub, factory, serviceName, useExtendedProxying, false, null) { }
public GrpcServer(IServiceHubProvider serviceHub, PluginFactory factory, string serviceName) : this(serviceHub, factory, serviceName, false, false, null) { }
public GrpcServer(IServiceHubProvider serviceHub, PluginFactory factory, string serviceName, bool useExtendedProxying, bool useSecurity, ICustomServerSecurity security) : base(serviceHub, factory, serviceName, useExtendedProxying, useSecurity, security) { }
public InMemoryClient(IServiceHubProvider serviceHub, string targetService, IIdentityProvider identityProvider, bool useEvents) : base(serviceHub, targetService, identityProvider, useEvents) { }
/// <summary> /// Creates a ServiceHub object that is able to process incoming messages /// </summary> /// <param name="backend">the backend that is used to exchange messages</param> /// <returns>the create hub instance</returns> public IServiceHub CreateHub(IServiceHubProvider backend) { return(new OpenServiceHubIm(backend)); }
/// <summary> /// Creates a ServiceHub object that is able to process incoming messages /// </summary> /// <param name="backend">the backend that is used to exchange messages</param> /// <returns>the create hub instance</returns> public IServiceHub CreateHub(IServiceHubProvider backend) { return(new AuthServiceHubIm(backend, new SimpleUserNameMapper(), new JsonSettingsSecurityRepository())); }
public AuthServiceHubRpc(IServiceHubProvider serviceBackend) : base(serviceBackend) { }
public GrpcClient(IServiceHubProvider serviceHub, string targetService, bool useEvents) : base(serviceHub, targetService, useEvents) { }
/// <summary> /// Initializes a new instance of the OpenEndpointInitializer class /// </summary> /// <param name="parent"></param> public OpenEndPointInitializer(IServiceHubProvider parent) { parent.RegisterEndPointInitializer(this); }
/// <summary> /// Initializes a new instance of the AuthenticationInit class /// </summary> /// <param name="parent">the object that initializes the web-host</param> public AuthenticationInit(IServiceHubProvider parent) { parent.RegisterAppConfigureProvider(this); parent.RegisterServicesConfigureProvider(this); }
public GrpcServer(IServiceHubProvider serviceHub, IDictionary <string, object> exposedObjects, string serviceName, bool useExtendedProxying) : this(serviceHub, exposedObjects, serviceName, useExtendedProxying, false, null) { }
public MessageServer(IServiceHubProvider serviceHub, IDictionary <string, object> exposedObjects, string serviceName, bool useExtendedProxying, bool useSecurity, ICustomServerSecurity security) : base(exposedObjects, useExtendedProxying, useSecurity, security) { hubClient = new LocalServiceHubConsumer(serviceName, serviceHub, null, security); hubClient.MessageArrived += ClientInvokation; }
public OpenServiceHubRpc(IServiceHubProvider serviceBackend) { this.serviceBackend = serviceBackend; }
public MessageClient(IServiceHubProvider serviceHub, string targetService, IIdentityProvider identityProvider, bool useEvents) : this(serviceHub, targetService, useEvents) { this.identityProvider = identityProvider; }
public AuthServiceHubIm(IServiceHubProvider serviceBackend, IUserNameMapper userMapper, ISecurityRepository securityRepo) : base(serviceBackend) { this.userMapper = userMapper; this.securityRepo = securityRepo; }
public MessageServer(IServiceHubProvider serviceHub, PluginFactory factory, string serviceName, bool useExtendedProxying, bool useSecurity, ICustomServerSecurity security) : base(factory, useExtendedProxying, useSecurity, security) { hubClient = new LocalServiceHubConsumer(serviceName, serviceHub, null, security); hubClient.MessageArrived += ClientInvokation; }