• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# AllJoynMessageInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetLastUploadTimeAsync

 public IAsyncOperation<SecuritySystemGetLastUploadTimeResult> GetLastUploadTimeAsync(AllJoynMessageInfo info)
 {
     return Task.Run(() =>
     {
         return SecuritySystemGetLastUploadTimeResult.CreateSuccessResult(this.storage.LastUploadTime.ToString());
     }).AsAsyncOperation();
 }
开发者ID:VictorBarbosa,项目名称:securitysystem,代码行数:7,代码来源:AllJoynManager.cs


示例2: GetVersionAsync

 public IAsyncOperation<SecuritySystemGetVersionResult> GetVersionAsync(AllJoynMessageInfo info)
 {
     return Task.Run(() =>
     {
         return SecuritySystemGetVersionResult.CreateSuccessResult(Package.Current.Id.Version.Major);
     }).AsAsyncOperation();
 }
开发者ID:VictorBarbosa,项目名称:securitysystem,代码行数:7,代码来源:AllJoynManager.cs


示例3:

 IAsyncOperation<LampClearLampFaultResult> ILampService.ClearLampFaultAsync(AllJoynMessageInfo info, string lampID, uint lampFault)
 {
     var light = LightingClientService.GetLightById(lampID);
     if (light == null)
         return Task.FromResult(LampClearLampFaultResult.CreateFailureResult(16)).AsAsyncOperation();
     return light.ClearLampFaultAsync(lampFault).AsAsyncOperation();
 }
开发者ID:dotMorten,项目名称:AllJoynLightingController,代码行数:7,代码来源:ControllerService.LampService.cs


示例4: GetDoorStateAsync

 public IAsyncOperation<GarageDoorGetDoorStateResult> GetDoorStateAsync(AllJoynMessageInfo info)
 {
     Task<GarageDoorGetDoorStateResult> task = new Task<GarageDoorGetDoorStateResult>(() =>
     {
         var newState = new GarageDoorDoorState();
         var status = _driver.GetCurrentStatus();
         newState.Value1 = Convert.ToByte(status);
         switch(status)
         {
             case DoorStatus.Closed:
                 newState.Value2 = "Closed";
                 break;
             case DoorStatus.Opened:
                 newState.Value2 = "Opened";
                 break;
             case DoorStatus.Closing:
                 newState.Value2 = "Closing";
                 break;
             case DoorStatus.Opening:
                 newState.Value2 = "Opening";
                 break;
             default:
                 newState.Value2 = "Unknown";
                 break;
         }
         return GarageDoorGetDoorStateResult.CreateSuccessResult(newState);
     });
     task.Start();
     return task.AsAsyncOperation();
 }
开发者ID:mlinnen,项目名称:HacksterIOWin10IoT,代码行数:30,代码来源:GarageDoorService.cs


示例5: TriggerCaptureAsync

 public IAsyncOperation<SecuritySystemTriggerCaptureResult> TriggerCaptureAsync(AllJoynMessageInfo info)
 {
     return Task.Run(async () =>
     {
         await this.camera.TriggerCapture();
         return SecuritySystemTriggerCaptureResult.CreateSuccessResult();
     }).AsAsyncOperation();
 }
开发者ID:VictorBarbosa,项目名称:securitysystem,代码行数:8,代码来源:AllJoynManager.cs


示例6: GetRedLedStateAsync

 public IAsyncOperation<FezHatGetRedLedStateResult> GetRedLedStateAsync(AllJoynMessageInfo info)
 {
     return (
         Task.Run(() =>
         {
             return FezHatGetRedLedStateResult.CreateSuccessResult(_redLedState);
         }).AsAsyncOperation());
 }
开发者ID:ianlee74,项目名称:FezHatAllJoyn,代码行数:8,代码来源:MainPage.xaml.cs


示例7: GetPowerAsync

 public IAsyncOperation<InternetRadioGetPowerResult> GetPowerAsync(AllJoynMessageInfo info)
 {
     return Task.Run(() =>
     {
         StartupTask.WriteTelemetryEvent("Action_AllJoyn");
         return InternetRadioGetPowerResult.CreateSuccessResult(PowerState.Powered == this.powerManager.PowerState);
     }).AsAsyncOperation();
 }
开发者ID:farukc,项目名称:internetradio,代码行数:8,代码来源:AllJoynInterfaceManager.cs


示例8: GetVolumeAsync

 public IAsyncOperation<InternetRadioGetVolumeResult> GetVolumeAsync(AllJoynMessageInfo info)
 {
     return Task.Run(() =>
     {
         TelemetryManager.WriteTelemetryEvent("Action_AllJoyn");
         return InternetRadioGetVolumeResult.CreateSuccessResult(this.playbackManager.Volume);
     }).AsAsyncOperation();
 }
开发者ID:codekaizen,项目名称:internetradio,代码行数:8,代码来源:AllJoynInterfaceManager.cs


示例9: GetLocationAsync

 public IAsyncOperation<GarageDoorGetLocationResult> GetLocationAsync(AllJoynMessageInfo info)
 {
     Task<GarageDoorGetLocationResult> task = new Task<GarageDoorGetLocationResult>(() =>
     {
         return GarageDoorGetLocationResult.CreateSuccessResult(_location);
     });
     task.Start();
     return task.AsAsyncOperation();
 }
开发者ID:mlinnen,项目名称:HacksterIOWin10IoT,代码行数:9,代码来源:GarageDoorService.cs


示例10: GetCurrentlyPlayingAsync

 public IAsyncOperation<InternetRadioGetCurrentlyPlayingResult> GetCurrentlyPlayingAsync(AllJoynMessageInfo info)
 {
     return Task.Run(() =>
     {
         StartupTask.WriteTelemetryEvent("Action_AllJoyn");
         return InternetRadioGetCurrentlyPlayingResult.CreateSuccessResult(
             (null != this.playlistManager.CurrentTrack) ? this.playlistManager.CurrentTrack.Name : string.Empty);
     }).AsAsyncOperation();
 }
开发者ID:farukc,项目名称:internetradio,代码行数:9,代码来源:AllJoynInterfaceManager.cs


示例11:

        // Method to handle calls to the GetScanInfo method.
        IAsyncOperation<OnboardingGetScanInfoResult> IOnboardingService.GetScanInfoAsync(AllJoynMessageInfo info)
        {
            Task<OnboardingGetScanInfoResult> task = new Task<OnboardingGetScanInfoResult>(() =>
            {
                return OnboardingGetScanInfoResult.CreateSuccessResult(1, AppData.SampleNetworkScanList);
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:t-angma,项目名称:Windows-universal-samples,代码行数:11,代码来源:OnboardingService.cs


示例12: StopToastingAsync

        // Implement this function to handle calls to the stopToasting method.
        public IAsyncOperation<toasterStopToastingResult> StopToastingAsync(AllJoynMessageInfo info)
        {
            Task<toasterStopToastingResult> task = new Task<toasterStopToastingResult>(() =>
            {
                return toasterStopToastingResult.CreateSuccessResult();
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:snowzk,项目名称:AllJoynToasterDemo,代码行数:11,代码来源:toasterService.cs


示例13: GetDarknessAsync

        // Implement this function to handle requests for the value of the Darkness property.
        //
        // Currently, info will always be null, because no information is available about the requestor.
        public IAsyncOperation<toasterGetDarknessResult> GetDarknessAsync(AllJoynMessageInfo info)
        {
            Task<toasterGetDarknessResult> task = new Task<toasterGetDarknessResult>(() =>
            {
                return toasterGetDarknessResult.CreateSuccessResult(darkness);
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:snowzk,项目名称:AllJoynToasterDemo,代码行数:13,代码来源:toasterService.cs


示例14: GetStateAsync

        public IAsyncOperation<relaynodeGetStateResult> GetStateAsync(AllJoynMessageInfo info, int interfaceMemberRelayId)
        {
            Task<relaynodeGetStateResult> task = new Task<relaynodeGetStateResult>(() =>
            {
                return relaynodeGetStateResult.CreateSuccessResult((byte)(_hm.GetRelayState(interfaceMemberRelayId ) ? 1 : 0));
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:martincalsyn,项目名称:CortanaAllJoynDemo,代码行数:10,代码来源:relayService.cs


示例15: SetLocationAsync

 public IAsyncOperation<CurrentTemperatureSetLocationResult> SetLocationAsync(AllJoynMessageInfo info, string value)
 {
     Task<CurrentTemperatureSetLocationResult> task = new Task<CurrentTemperatureSetLocationResult>(() =>
     {
         _location = value;
         return CurrentTemperatureSetLocationResult.CreateSuccessResult();
     });
     task.Start();
     return task.AsAsyncOperation();
 }
开发者ID:mlinnen,项目名称:HacksterIOWin10IoT,代码行数:10,代码来源:CurrentTemperatureService.cs


示例16: GetIsUpperCaseEnabledAsync

        // Method to handle requests for the value of the IsUpperCaseEnabled property.
        public IAsyncOperation<SecureInterfaceGetIsUpperCaseEnabledResult> GetIsUpperCaseEnabledAsync(AllJoynMessageInfo info)
        {
            Task<SecureInterfaceGetIsUpperCaseEnabledResult> task = new Task<SecureInterfaceGetIsUpperCaseEnabledResult>(() =>
            {
                return SecureInterfaceGetIsUpperCaseEnabledResult.CreateSuccessResult(AppData.IsUpperCaseEnabled);
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:t-angma,项目名称:Windows-universal-samples,代码行数:11,代码来源:SecureInterfaceService.cs


示例17: GetVersionAsync

        public IAsyncOperation<CurrentTemperatureGetVersionResult> GetVersionAsync(AllJoynMessageInfo info)
        {
            Task<CurrentTemperatureGetVersionResult> task = new Task<CurrentTemperatureGetVersionResult>(() =>
            {
                return CurrentTemperatureGetVersionResult.CreateSuccessResult(_version);
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:mlinnen,项目名称:HacksterIOWin10IoT,代码行数:10,代码来源:CurrentTemperatureService.cs


示例18: SendAsync

        public IAsyncOperation<CharacterLCDSendResult> SendAsync(AllJoynMessageInfo info, string interface_message)
        {
            Task<CharacterLCDSendResult> task = new Task<CharacterLCDSendResult>(() =>
            {
                lcd.WriteLCD(interface_message);
                return CharacterLCDSendResult.CreateSuccessResult();
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:Robotonics,项目名称:CharacterLCD,代码行数:11,代码来源:CharacterLCDService.cs


示例19: StartToastingAsync

        // Implement this function to handle calls to the startToasting method.
        public IAsyncOperation<toasterStartToastingResult> StartToastingAsync(AllJoynMessageInfo info)
        {
            Task<toasterStartToastingResult> task = new Task<toasterStartToastingResult>(() =>
            {
                Task.Delay(TimeSpan.FromSeconds(darkness)).ContinueWith(_ => _toasterSignals.ToastDone(AllJoynStatus.Ok));
                return toasterStartToastingResult.CreateSuccessResult();
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:snowzk,项目名称:AllJoynToasterDemo,代码行数:12,代码来源:toasterService.cs


示例20: SetStateAsync

        public IAsyncOperation<relaynodeSetStateResult> SetStateAsync(AllJoynMessageInfo info, int interfaceMemberRelayId, byte interfaceMemberState)
        {
            Task<relaynodeSetStateResult> task = new Task<relaynodeSetStateResult>(() =>
            {
                _hm.SetRelay(interfaceMemberRelayId, interfaceMemberState != 0);
                _relayNodeSignals.RelayStateChanged(interfaceMemberRelayId, interfaceMemberState);
                return relaynodeSetStateResult.CreateSuccessResult();
            });

            task.Start();
            return task.AsAsyncOperation();
        }
开发者ID:martincalsyn,项目名称:CortanaAllJoynDemo,代码行数:12,代码来源:relayService.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AllocationType类代码示例发布时间:2022-05-24
下一篇:
C# AllFramesReadyEventArgs类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap