2 writes to _handle
mscorlib (2)
system\io\filestream.cs (2)
845_handle = Win32Native.SafeCreateFile(tempPath, fAccess, share, secAttrs, mode, flagsAndAttributes, IntPtr.Zero); 1015_handle = handle;
60 references to _handle
mscorlib (60)
system\io\filestream.cs (60)
847if (_handle.IsInvalid) { 893int fileType = Win32Native.GetFileType(_handle); 895_handle.Close(); 913b = ThreadPool.BindHandle(_handle); 920_handle.Close(); 1024int handleType = Win32Native.GetFileType(_handle); 1050b = ThreadPool.BindHandle(_handle); 1142r = ReadFileNative(_handle, bytes, 0, 0, null, out hr); 1145r = WriteFileNative(_handle, bytes, 0, 0, null, out hr); 1177if (_handle.IsClosed) __Error.FileNotOpen(); 1181lo = Win32Native.GetFileSize(_handle, out hi); 1224if (_handle.IsClosed) __Error.FileNotOpen(); 1254if (_handle.IsClosed) __Error.FileNotOpen(); 1255return new FileSecurity(_handle, _fileName, AccessControlSections.Access | AccessControlSections.Owner | AccessControlSections.Group); 1265if (_handle.IsClosed) __Error.FileNotOpen(); 1267fileSecurity.Persist(_handle, _fileName); 1281if (_handle != null && !_handle.IsClosed) { 1293if (_handle != null && !_handle.IsClosed) 1294_handle.Dispose(); 1310if (_handle != null) { 1311BCLDebug.Correctness(_handle.IsClosed, "You didn't close a FileStream & it got finalized. Name: \""+_fileName+"\""); 1325if (_handle.IsClosed) __Error.FileNotOpen(); 1350if (!Win32Native.FlushFileBuffers(_handle)) 1420return _handle.DangerousGetHandle(); 1438return _handle; 1449if (_handle.IsClosed) __Error.FileNotOpen(); 1481if (!Win32Native.SetEndOfFile(_handle)) { 1508if (_handle.IsClosed) __Error.FileNotOpen(); 1570Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 1589int r = ReadFileNative(_handle, buffer, offset, count, null, out hr); 1613if (_handle.IsClosed) __Error.FileNotOpen(); 1691Contract.Assert(!_handle.IsClosed && CanSeek, "!_handle.IsClosed && CanSeek"); 1696ret = Win32Native.SetFilePointer(_handle, offset, origin, out hr); 1717_handle.Dispose(); 1762if (_handle.IsClosed) __Error.FileNotOpen(); 1826Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 1846int r = WriteFileNative(_handle, buffer, offset, count, null, out hr); 1882if (_handle.IsClosed) __Error.FileNotOpen(); 2012Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 2026FileStreamAsyncResult asyncResult = new FileStreamAsyncResult(numBufferedBytesRead, bytes, _handle, userCallback, stateObject, false); 2066int r = ReadFileNative(_handle, bytes, offset, numBytes, intOverlapped, out hr); 2091if (!_handle.IsClosed && CanSeek) // Update Position - It could be anywhere. 2161if (_handle.IsClosed) __Error.FileNotOpen(); 2194if (_handle.IsClosed) __Error.FileNotOpen(); 2272Contract.Assert(!_handle.IsClosed, "!_handle.IsClosed"); 2281FileStreamAsyncResult asyncResult = new FileStreamAsyncResult(0, bytes, _handle, userCallback, stateObject, true); 2325int r = WriteFileNative(_handle, bytes, offset, numBytes, intOverlapped, out hr); 2348if (!_handle.IsClosed && CanSeek) // Update Position - It could be anywhere. 2416if (_handle.IsClosed) __Error.FileNotOpen(); 2437if (_handle.IsClosed) __Error.FileNotOpen(); 2444if (!Win32Native.LockFile(_handle, positionLow, positionHigh, lengthLow, lengthHigh)) 2453if (_handle.IsClosed) __Error.FileNotOpen(); 2460if (!Win32Native.UnlockFile(_handle, positionLow, positionHigh, lengthLow, lengthHigh)) 2532_handle.Dispose(); 2589_handle.Dispose(); 2625if (_handle.IsClosed) 2677if (_handle.IsClosed) 2840if (_handle.IsClosed)