private void RaiseClientInfoChanged(WcfClientInfo clientInfo)
        {
            Logger.Log(LogLevel.Debug, "Firing ClientConnected");

            if (ClientInfoChanged != null && clientInfo != null)
            {
                ClientInfoChanged(this, clientInfo);
            }
        }
Ejemplo n.º 2
0
        ///
        public bool Match(WcfClientInfo clientInfo, ServiceConfiguration sericeConfiguration)
        {
            var minServerVersion = Version.Parse(clientInfo.MinServerVersion);
            var serverVersion    = Version.Parse(sericeConfiguration.ServerVersion);

            var minClientVersion = Version.Parse(sericeConfiguration.MinClientVersion);
            var clientVersion    = Version.Parse(clientInfo.ClientVersion);

            return(minServerVersion <= serverVersion && minClientVersion <= clientVersion);
        }
        /// <summary>
        /// Sets the state of the <see cref="WcfClientInfo"/> and increases the tries
        /// </summary>
        private void SetClientInfoState(WcfClientInfo clientInfo, InternalConnectionState internalState)
        {
            var newState = StateTransformer.FromInternal(internalState, clientInfo.State);

            if (clientInfo.State == newState)
            {
                clientInfo.Tries++;
            }
            else
            {
                clientInfo.State = newState;
                clientInfo.Tries = 1;
            }

            RaiseClientInfoChanged(clientInfo);
        }