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


C# DataReader.ReadUInt64方法代碼示例

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


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

示例1: Read

 public void Read(DataReader reader)
 {
     t = (HeartBeatType)reader.ReadInt32();
     time = reader.ReadDateTime().UtcDateTime;
     cc = reader.ReadInt64();
     asdf = reader.ReadInt64();
     peak = reader.ReadInt64();
     max0 = reader.ReadUInt64();
     max1 = reader.ReadUInt64();
     ave0 = reader.ReadUInt64();
     ave1 = reader.ReadUInt64();
     ave = reader.ReadUInt64();
     beat = reader.ReadUInt64();
     audio = reader.ReadUInt64();
     noAudio = reader.ReadUInt64();
 }
開發者ID:ebragge,項目名稱:SDE,代碼行數:16,代碼來源:IotHubClient.cs

示例2: ReadFileAsync

        public async Task<IStorageFile> ReadFileAsync(StreamSocket socket, StorageFolder folder, string outputFilename = null)
        {
            StorageFile file;
            using (var rw = new DataReader(socket.InputStream))
            {
                // 1. Read the filename length
                await rw.LoadAsync(sizeof(Int32));
                var filenameLength = (uint)rw.ReadInt32();
                // 2. Read the filename
                await rw.LoadAsync(filenameLength);
                var originalFilename = rw.ReadString(filenameLength);
                if (outputFilename == null)
                {
                    outputFilename = originalFilename;
                }
                //3. Read the file length
                await rw.LoadAsync(sizeof(UInt64));
                var fileLength = rw.ReadUInt64();

                // 4. Reading file
                var buffer = rw.ReadBuffer((uint)fileLength);
                file = await ApplicationData.Current.LocalFolder.CreateFileAsync(outputFilename, CreationCollisionOption.ReplaceExisting);
                await FileIO.WriteBufferAsync(file, buffer);
                //using (var memStream = await DownloadFile(rw, fileLength))
                //{

                //    file = await folder.CreateFileAsync(outputFilename, CreationCollisionOption.ReplaceExisting);
                //    using (var fileStream1 = await file.OpenAsync(FileAccessMode.ReadWrite))
                //    {
                //        await RandomAccessStream.CopyAndCloseAsync(memStream.GetInputStreamAt(0), fileStream1.GetOutputStreamAt(0));
                //    }

                //    rw.DetachStream();
                //}
            }
            return file;
        }
開發者ID:GauravC12,項目名稱:Windows10BackgroundBluetoothSample,代碼行數:37,代碼來源:BluetoothTransferHelper.cs


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