namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter09.Listing09_09
{
    using Listing09_10;

    public class Program
    {
        public void SwitchInt()
        {
            int connectionState;
            // ...
            // Inicjowanie connectionState na potrzeby przykładu
            connectionState = 2;

            switch(connectionState)
            {
                case 0:
                    // ...
                    break;
                case 1:
                    // ...
                    break;
                case 2:
                    // ...
                    break;
                case 3:
                    // ...
                    break;
            }

        }

        public void SwitchEnum()
        {
            ConnectionState connectionState;
            // ...

            // Inicjowanie connectionState na potrzeby przykładu
            connectionState = ConnectionState.Connecting;

            switch(connectionState)
            {
                case ConnectionState.Connected:
                    // ...
                    break;
                case ConnectionState.Connecting:
                    // ...
                    break;
                case ConnectionState.Disconnected:
                    // ...
                    break;
                case ConnectionState.Disconnecting:
                    // ...
                    break;
            }
        }
    }
}
