Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RemoteMessageHub"/> class.
        /// </summary>
        /// <param name="inner">The inner hub</param>
        protected RemoteMessageHub(LocalMessageHub inner)
        {
            if (inner == null)
            {
                inner = (LocalMessageHub)LocalMessageHub.Create();
            }

            _innerHub = inner;
            _innerHub.Broadcasting += OnInnerHubBroadcast;
        }
Exemple #2
0
 /// <summary>
 /// Configures this hub instance with the configuration provided
 /// </summary>
 /// <param name="config">The configuration object</param>
 /// <returns>The current instance</returns>
 public virtual IRemoteMessageHub WithConfiguration(IHubConfiguration config)
 {
     UseEncryption = config.UseEncryption;
     _innerHub     = (LocalMessageHub)_innerHub.WithSerializationType(config.DefaultSerializationType);
     return(this);
 }