ReadUInt64() public method

public ReadUInt64 ( ) : ulong
return ulong
Example #1
0
 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();
 }
        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;
        }