Exemple #1
0
        private bool SwitchToState(BattleNetCSharp.ConnectionState state)
        {
            if (state == this.m_connectionState)
            {
                return(false);
            }
            bool flag = true;

            if (state != BattleNetCSharp.ConnectionState.Disconnected || this.m_connectionState != BattleNetCSharp.ConnectionState.Ready)
            {
                flag = (state > this.m_connectionState);
            }
            if (flag)
            {
                this.m_logSource.LogDebug("Expected state change {0} -> {1}", new object[]
                {
                    this.m_connectionState.ToString(),
                    state.ToString()
                });
            }
            else
            {
                this.m_logSource.LogWarning("Unexpected state changes {0} -> {1}", new object[]
                {
                    this.m_connectionState.ToString(),
                    state.ToString()
                });
                this.m_logSource.LogDebugStackTrace("SwitchToState", 5, 0);
            }
            this.m_connectionState = state;
            return(true);
        }
Exemple #2
0
 private bool InState(BattleNetCSharp.ConnectionState state)
 {
     return(this.m_connectionState == state);
 }