public Stream Open(FileLockMode lockMode, FileOpenMode openMode) { return System.IO.File.Open( this.path, fileMode[openMode], fileAccess[openMode], fileShare[lockMode] ); }
public Stream Open(FileLockMode lockMode, FileOpenMode openMode) { if (!this.stream.CanWrite) // disposed this.ReopenStream(); if (openMode == FileOpenMode.Append) { this.stream.Seek(0, SeekOrigin.End); return this.stream; } if (openMode == FileOpenMode.ReadOrWrite) { this.stream.Seek(0, SeekOrigin.Begin); return this.stream; } if (openMode == FileOpenMode.Recreate) { this.stream = new MemoryStream(); return this.stream; } throw new ArgumentOutOfRangeException("openMode"); }
public Stream Read(FileLockMode lockMode) { return System.IO.File.Open(this.path, FileMode.Open, FileAccess.Read, fileShare[lockMode]); }
public Stream Read(FileLockMode lockMode) { return this.assembly.GetManifestResourceStream(this.resourcePath); }
public Stream Open(FileLockMode lockMode, FileOpenMode openMode) { throw new NotImplementedException(); }
public Stream Read(FileLockMode lockMode) { if (!this.stream.CanRead) // disposed this.ReopenStream(); this.stream.Seek(0, SeekOrigin.Begin); return this.stream; }