public async Task <CreateChannelViewModel> Init()
        {
            var token   = AppsContainer.AccessToken();
            var channel = await ChannelService.CreateChannelAsync(await token(), "");

            return(channel);
        }
示例#2
0
        public async Task <CreateChannelViewModel> Init(string userId)
        {
            var token = await _appsContainer.AccessToken();

            var channel = await _channelService.CreateChannelAsync(token, $"Kahla User Channel for Id:{userId}");

            return(channel);
        }
示例#3
0
        public async Task <IActionResult> IntegratedTest()
        {
            var token  = AppsContainer.AccessToken();
            var result = await ChannelService.CreateChannelAsync(await token(), "Test Channel");

            await Task.Factory.StartNew(async() =>
            {
                await _debugger.SendDebuggingMessages(await token(), result.ChannelId);
            });

            var model = new ChannelAddressModel
            {
                Id  = result.ChannelId,
                Key = result.ConnectKey
            };

            return(View("Test", model));
        }
示例#4
0
        public async Task <IActionResult> IntegratedTest()
        {
            var token = await _appsContainer.AccessToken();

            var result = await _channelService.CreateChannelAsync(token, "Test Channel");

            _cannonService.FireAsync <DebugMessageSender>(d =>
            {
                return(d.SendDebuggingMessages(token, result.ChannelId));
            });
            var model = new ChannelAddressModel
            {
                Id  = result.ChannelId,
                Key = result.ConnectKey
            };

            return(View("Test", model));
        }