/// <summary> /// Opens a file identified by a URI for read or write. /// </summary> /// <param name="uri"></param> /// <param name="mode"></param> /// <param name="compression"></param> /// <param name="archival"></param> /// <returns></returns> public Stream Open(Uri uri, DataFileMode mode, DataFileCompression compression, DataFileArchival archival) { this.uri = uri; this.mode = mode; this.compression = compression; this.archival = archival; return(Open()); }
/// <summary> /// Initializes private member variables. /// </summary> private void InitializeMembers() { this.uri = null; this.mode = DataFileMode.Read; this.compression = DataFileCompression.Automatic; this.archival = DataFileArchival.Automatic; this.userName = null; this.password = null; }
private void InitializeMembers(StreamingContext context) { this.sources = null; this.destinations = null; this.uri = null; this.fileFormatFactoryType = null; this.streamFactoryType = null; this.archival = DataFileArchival.Zip; this.timeout = 1200; // *** TODO: get from settings }
protected void Open(DataFileMode fileMode, DataFileArchival archival) { EnsureNotOpen(); if (baseStream == null) { // Open input stream // Check if the archival option is turned on and open archive // file if necessary by opening an IArchiveInputStream var sf = GetStreamFactory(); sf.Uri = uri; sf.Mode = fileMode; sf.Archival = archival; // TODO: add authentication options here baseStream = sf.Open(); ownsBaseStream = true; } else { // Do nothing } }
private void InitializeMembers(StreamingContext context) { this.sources = null; this.destinations = null; this.uri = null; this.fileFormatFactoryType = null; this.streamFactoryType = null; this.archival = DataFileArchival.Zip; this.timeout = 1200; // *** TODO: get from settings }
/// <summary> /// Initializes private member variables. /// </summary> private void InitializeMembers() { this.uri = null; this.mode = DataFileMode.Read; this.compression = DataFileCompression.Automatic; this.archival = DataFileArchival.Automatic; this.userName = null; this.password = null; }
/// <summary> /// Opens a file identified by a URI for read or write. /// </summary> /// <param name="uri"></param> /// <param name="mode"></param> /// <param name="compression"></param> /// <param name="archival"></param> /// <returns></returns> public Stream Open(Uri uri, DataFileMode mode, DataFileCompression compression, DataFileArchival archival) { this.uri = uri; this.mode = mode; this.compression = compression; this.archival = archival; return Open(); }
protected void Open(DataFileMode fileMode, DataFileArchival archival) { EnsureNotOpen(); if (baseStream == null) { // Open input stream // Check if the archival option is turned on and open archive // file if necessary by opening an IArchiveInputStream var sf = GetStreamFactory(); sf.Uri = uri; sf.Mode = fileMode; sf.Archival = archival; // TODO: add authentication options here baseStream = sf.Open(); ownsBaseStream = true; } else { // Do nothing } }