예제 #1
0
 /// <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;
 }
예제 #2
0
 /// <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);
 }
예제 #3
0
 /// <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);
     }
 }
예제 #4
0
        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;
        }
예제 #5
0
 public GrpcServer(IServiceHubProvider serviceHub, IDictionary <string, object> exposedObjects, string serviceName) : this(serviceHub, exposedObjects, serviceName, false, false, null)
 {
 }
예제 #6
0
 public GrpcServer(IServiceHubProvider serviceHub, IDictionary <string, object> exposedObjects, string serviceName, bool useExtendedProxying, bool useSecurity, ICustomServerSecurity security) : base(serviceHub, exposedObjects, serviceName, useExtendedProxying, useSecurity, security)
 {
 }
예제 #7
0
 public GrpcServer(IServiceHubProvider serviceHub, PluginFactory factory, string serviceName, bool useExtendedProxying) : this(serviceHub, factory, serviceName, useExtendedProxying, false, null)
 {
 }
예제 #8
0
 public GrpcServer(IServiceHubProvider serviceHub, PluginFactory factory, string serviceName) : this(serviceHub, factory, serviceName, false, false, null)
 {
 }
예제 #9
0
 public GrpcServer(IServiceHubProvider serviceHub, PluginFactory factory, string serviceName, bool useExtendedProxying, bool useSecurity, ICustomServerSecurity security) : base(serviceHub, factory, serviceName, useExtendedProxying, useSecurity, security)
 {
 }
예제 #10
0
 public InMemoryClient(IServiceHubProvider serviceHub, string targetService, IIdentityProvider identityProvider, bool useEvents) : base(serviceHub, targetService, identityProvider, useEvents)
 {
 }
예제 #11
0
 /// <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));
 }
예제 #12
0
 /// <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()));
 }
예제 #13
0
 public AuthServiceHubRpc(IServiceHubProvider serviceBackend) : base(serviceBackend)
 {
 }
예제 #14
0
 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);
 }
예제 #16
0
 /// <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);
 }
예제 #17
0
 public GrpcServer(IServiceHubProvider serviceHub, IDictionary <string, object> exposedObjects, string serviceName, bool useExtendedProxying) : this(serviceHub, exposedObjects, serviceName, useExtendedProxying, false, null)
 {
 }
예제 #18
0
 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;
 }
예제 #19
0
 public OpenServiceHubRpc(IServiceHubProvider serviceBackend)
 {
     this.serviceBackend = serviceBackend;
 }
예제 #20
0
 public MessageClient(IServiceHubProvider serviceHub, string targetService, IIdentityProvider identityProvider, bool useEvents) : this(serviceHub, targetService, useEvents)
 {
     this.identityProvider = identityProvider;
 }
예제 #21
0
 public AuthServiceHubIm(IServiceHubProvider serviceBackend, IUserNameMapper userMapper, ISecurityRepository securityRepo) : base(serviceBackend)
 {
     this.userMapper   = userMapper;
     this.securityRepo = securityRepo;
 }
예제 #22
0
 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;
 }