コード例 #1
0
 public FizzClient(IFizzSessionProvider sessionClient)
 {
     _dispatcher       = new FizzActionDispatcher();
     _sessionClient    = sessionClient;
     _chat             = new FizzChatClient(_dispatcher);
     _restClient       = new FizzRestClient(_dispatcher);
     _authClient       = new FizzAuthRestClient(_restClient);
     _ingestionClient  = new FizzIngestionClient(new FizzInMemoryEventLog(), _dispatcher);
     _moderationClient = new FizzModerationClient();
 }
コード例 #2
0
        public FizzClient(string appId, IFizzSessionProvider sessionClient)
        {
            if (string.IsNullOrEmpty(appId))
            {
                throw FizzException.ERROR_INVALID_APP_ID;
            }

            _sessionClient    = sessionClient;
            _chat             = new FizzChatClient(appId, _dispatcher);
            _restClient       = new FizzRestClient(_dispatcher);
            _authClient       = new FizzAuthRestClient(_restClient);
            _ingestionClient  = new FizzIngestionClient(new FizzInMemoryEventLog(), _dispatcher);
            _moderationClient = new FizzModerationClient();
        }
コード例 #3
0
        public FizzClient(string appId, string appSecret)
        {
            if (string.IsNullOrEmpty(appId))
            {
                throw FizzException.ERROR_INVALID_APP_ID;
            }

            if (string.IsNullOrEmpty(appSecret))
            {
                throw FizzException.ERROR_INVALID_APP_SECRET;
            }

            _dispatcher       = new FizzActionDispatcher();
            _chat             = new FizzChatClient(_dispatcher);
            _restClient       = new FizzRestClient(_dispatcher);
            _sessionClient    = new FizzIdSecretSessionProvider(appId, appSecret, _restClient);
            _authClient       = new FizzAuthRestClient(_restClient);
            _ingestionClient  = new FizzIngestionClient(new FizzInMemoryEventLog(), _dispatcher);
            _moderationClient = new FizzModerationClient();
        }