当前位置: 首页>>代码示例>>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;未经允许,请勿转载。