当前位置: 首页>>代码示例>>C#>>正文


C# Listeners.ResponseListener类代码示例

本文整理汇总了C#中ConnectSdk.Windows.Service.Capability.Listeners.ResponseListener的典型用法代码示例。如果您正苦于以下问题:C# ResponseListener类的具体用法?C# ResponseListener怎么用?C# ResponseListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ResponseListener类属于ConnectSdk.Windows.Service.Capability.Listeners命名空间,在下文中一共展示了ResponseListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UrlServiceSubscription

 public UrlServiceSubscription(DeviceService service, string uri, JsonObject payload, bool isWebOs,
     ResponseListener listener)
     : base(service, uri, payload, listener)
 {
     if (isWebOs)
         HttpMethod = "subscribe";
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:7,代码来源:URLServiceSubscription.cs

示例2: AppStoreCommandExecute

        private void AppStoreCommandExecute(object obj)
        {
            if (appStoreSession != null)
            {
                appStoreSession.Close(null);
                appStoreSession = null;
            }
            var listener = new ResponseListener
                (
                loadEventArg =>
                {
                    var session = LoadEventArgs.GetValue<LaunchSession>(loadEventArg);
                    appStoreSession = session;
                },
                serviceCommandError =>
                {

                }
                );

            String appId = null;

            if (selectedDevice.GetServiceByName("Netcast TV") != null)
                appId = "125071";
            else if (selectedDevice.GetServiceByName("webOS TV") != null)
                appId = "redbox";
            else if (selectedDevice.GetServiceByName("Roku") != null)
                appId = "13535";

            launcher.LaunchAppStore(appId, listener);
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:31,代码来源:ModelCommandsImplementationApps.cs

示例3: ServiceCommand

 public ServiceCommand(IServiceCommandProcessor service, string targetUrl, Object payload, ResponseListener listener)
 {
     Service = service;
     Target = targetUrl;
     Payload = payload;
     responseListener = listener;
     HttpMethod = TypePost;
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:8,代码来源:ServiceCommand.cs

示例4: SetControlKeys

        private void SetControlKeys()
        {
            if (selectedDevice != null)
            {
                KeyCommand.Enabled = selectedDevice.HasCapability(KeyControl.KeyCode);
                ChannelCommand.Enabled = selectedDevice.HasCapability(TvControl.ChannelUp);
                PowerCommand.Enabled = selectedDevice.HasCapability(PowerControl.Off);

                if (selectedDevice.HasCapability(TvControl.ChannelList))
                {
                    var listener = new ResponseListener
                        (
                        loadEventArg =>
                        {
                            var channels = LoadEventArgs.GetValue<List<ChannelInfo>>(loadEventArg);
                            App.MainDispatcher.RunAsync(CoreDispatcherPriority.High, () =>
                            {
                                Channels = channels;
                            });
                        },
                        serviceCommandError =>
                        {

                        }
                        );
                    tvControl.GetChannelList(listener);
                }

                if (selectedDevice.HasCapability(TvControl.ChannelSubscribe))
                {
                    var listener = new ResponseListener
                        (
                        loadEventArg =>
                        {
                            var channel = LoadEventArgs.GetValue<ChannelInfo>(loadEventArg);
                            App.MainDispatcher.RunAsync(CoreDispatcherPriority.High, () =>
                            {
                                SelectedChannel = channel;
                            });
                        },
                        serviceCommandError =>
                        {

                        }
                        );
                    tvControl.SubscribeCurrentChannel(listener);
                }
            }
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:49,代码来源:ModelCommandsImplementationKey.cs

示例5: InputCommandExecute

        private void InputCommandExecute(object obj)
        {
            var listener = new ResponseListener
                (
                loadEventArg =>
                {
                    var launchPickerSession = LoadEventArgs.GetValue<LaunchSession>(loadEventArg);
                    inputPickerSession = launchPickerSession;
                },
                serviceCommandError =>
                {

                }
                );
            externalInputControl.LaunchInputPicker(listener);
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:16,代码来源:ModelCommandsImplementationSystem.cs

示例6: CloseWebAppCommandExecute

        private void CloseWebAppCommandExecute(object obj)
        {
            CloseWebAppCommand.Enabled = false;
            SendMessageCommand.Enabled = false;
            SendJsonCommand.Enabled = false;
            LeaveWebAppCommand.Enabled = false;
            isLaunched = false;
            mWebAppSession.WebAppSessionListener = null;

            var listener = new ResponseListener
                (
                loadEventArg =>
                {
                    LaunchWebAppCommand.Enabled = true;
                },
                serviceCommandError =>
                {
                    LaunchWebAppCommand.Enabled = true;
                }
                );
            mWebAppSession.Close(listener);
        }
开发者ID:ConnectSDK,项目名称:Connect-SDK-Windows-Sampler,代码行数:22,代码来源:ModelCommandsImplementationWebApp.cs

示例7: PlayMedia

 public void PlayMedia(string url, string mimeType, string title, string description, string iconSrc,
     bool shouldLoop, ResponseListener listener)
 {
     if (dlnaService != null)
     {
         dlnaService.PlayMedia(url, mimeType, title, description, iconSrc, shouldLoop, listener);
     }
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:8,代码来源:NetcastTVService.cs

示例8: Pause

 public void Pause(ResponseListener listener)
 {
     SendVirtualKeyCode((int)NetcastVirtualKeycodes.PAUSE, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs

示例9: Next

 public void Next(ResponseListener listener)
 {
     throw new NotImplementedException();
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs

示例10: LaunchYouTube

 public void LaunchYouTube(string contentId, ResponseListener listener)
 {
     const string appName = "YouTube";
     LaunchNamedApplication(appName, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:5,代码来源:NetcastTVService.cs

示例11: LaunchInputPicker

        public void LaunchInputPicker(ResponseListener pListener)
        {
            const string appName = "Input List";
            var encodedStr = HttpMessage.Encode(appName);

            var responseListener = new ResponseListener
            (
                loadEventArg =>
                {

                    var responseLaunchListener = new ResponseListener
                    (
                        loadEventArg2 =>
                        {
                            if (inputPickerSession == null)
                            {
                                inputPickerSession = (LaunchSession)loadEventArg2;
                            }

                            Util.PostSuccess(pListener, loadEventArg2);
                        },
                        serviceCommandError => Util.PostError(pListener, serviceCommandError)
                    );
                    LaunchApplication(appName, ((AppInfo)loadEventArg).Id, null, responseLaunchListener);
                },
                serviceCommandError => Util.PostError(pListener, serviceCommandError)
            );

            GetApplication(encodedStr, responseListener);
        }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:30,代码来源:NetcastTVService.cs

示例12: LaunchBrowser

 public void LaunchBrowser(string url, ResponseListener listener)
 {
     const string appName = "Internet";
     LaunchNamedApplication(appName, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:5,代码来源:NetcastTVService.cs

示例13: GetMute

 public void GetMute(ResponseListener listener)
 {
     var responseListener = new ResponseListener
     (
         loadEventArg => Util.PostSuccess(listener, ((VolumeStatus)loadEventArg).IsMute),
         serviceCommandError => Util.PostError(listener, serviceCommandError)
     );
     GetVolumeStatus(responseListener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:9,代码来源:NetcastTVService.cs

示例14: GetExternalInputList

 public void GetExternalInputList(ResponseListener listener)
 {
     throw new NotImplementedException();
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs

示例15: LaunchAppWithInfo

 public void LaunchAppWithInfo(AppInfo appInfo, ResponseListener listener)
 {
     LaunchAppWithInfo(appInfo, null, listener);
 }
开发者ID:DmitrySigaev,项目名称:Connect-SDK-Windows,代码行数:4,代码来源:NetcastTVService.cs


注:本文中的ConnectSdk.Windows.Service.Capability.Listeners.ResponseListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。