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


C# AllJoynMessageInfo类代码示例

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


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


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