當前位置: 首頁>>代碼示例>>C#>>正文


C# Guid.ToNative方法代碼示例

本文整理匯總了C#中System.Guid.ToNative方法的典型用法代碼示例。如果您正苦於以下問題:C# Guid.ToNative方法的具體用法?C# Guid.ToNative怎麽用?C# Guid.ToNative使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Guid的用法示例。


在下文中一共展示了Guid.ToNative方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ShowDialogAsync

        /// <summary>
        /// Shows a dialog on the connected Band device.
        /// </summary>
        /// <param name="tileId">The tile identifier.</param>
        /// <param name="title">The message title.</param>
        /// <param name="body">The message body.</param>
        public async Task ShowDialogAsync(Guid tileId, string title, string body)
        {
#if __ANDROID__ || __IOS__
            await Native.ShowDialogTaskAsync(tileId.ToNative(), title, body);
#elif WINDOWS_PHONE_APP
            await Native.ShowDialogAsync(tileId.ToNative(), title, body);
#endif
        }
開發者ID:JamesEarle,項目名稱:Microsoft-Band-SDK-Bindings,代碼行數:14,代碼來源:BandNotificationManager.cs

示例2: SendMessageAsync

        /// <summary>
        /// Sends a message to a specific tile to the connected Band device with the provided tile ID, title, body, 
        /// timestamp and with message flags to control how the message is provided.
        /// </summary>
        /// <param name="tileId">The tile identifier.</param>
        /// <param name="title">The message title.</param>
        /// <param name="body">The message body.</param>
        /// <param name="timestamp">The message timestamp.</param>
        /// <param name="messageFlags">The message flags to control how the message is provided to the Band device.</param>
        public async Task SendMessageAsync(Guid tileId, string title, string body, DateTime timestamp, MessageFlags messageFlags)
        {
#if __ANDROID__ || __IOS__
            await Native.SendMessageTaskAsync(tileId.ToNative(), title, body, timestamp, messageFlags.ToNative());
#elif WINDOWS_PHONE_APP
            await Native.SendMessageAsync(tileId.ToNative(), title, body, timestamp, messageFlags.ToNative());
#endif
        }
開發者ID:JamesEarle,項目名稱:Microsoft-Band-SDK-Bindings,代碼行數:17,代碼來源:BandNotificationManager.cs

示例3: SetTilePageDataAsync

        public async Task SetTilePageDataAsync(Guid tileId, IEnumerable<PageData> pageData)
        {
#if __ANDROID__
            await Native.SetPagesTaskAsync(tileId.ToNative(), pageData.Select(pd => pd.ToNative()).ToArray());
#elif __IOS__
            await Native.SetPagesTaskAsync(pageData.Select(pd => pd.ToNative()).ToArray(), tileId.ToNative());
#elif WINDOWS_PHONE_APP
            await Native.SetPagesAsync(tileId.ToNative(), pageData.Select(pd => pd.ToNative()).ToArray());
#endif
        }
開發者ID:JamesEarle,項目名稱:Microsoft-Band-SDK-Bindings,代碼行數:10,代碼來源:BandTileManager.cs

示例4: RemoveTilePagesAsync

        public async Task RemoveTilePagesAsync(Guid tileId)
        {
#if __ANDROID__ || __IOS__
            await Native.RemovePagesTaskAsync(tileId.ToNative());
#elif WINDOWS_PHONE_APP
            await Native.RemovePagesAsync(tileId.ToNative());
#endif
        }
開發者ID:JamesEarle,項目名稱:Microsoft-Band-SDK-Bindings,代碼行數:8,代碼來源:BandTileManager.cs


注:本文中的System.Guid.ToNative方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。