예제 #1
0
        internal static QueryWebSocket Get()
        {
            if (QueryWebSocket._instance == null)
            {
                QueryWebSocket._instance = new QueryWebSocket();
            }

            return(QueryWebSocket._instance);
        }
예제 #2
0
        internal static IQuery Get()
        {
            if (Query._instance == null)
            {
                switch (Settings.ConnectionType)
                {
                case Settings.Connection.HttpPost:
                    Query._instance = QueryHttp.Get();
                    break;

                case Settings.Connection.WebSocket:
                    Query._instance = QueryWebSocket.Get();
                    break;

                default:
                    throw new NotImplementedException($"Unexpected Connection Method: {Settings.ConnectionType}");
                }
            }

            return(Query._instance);
        }