/// <summary> /// Release reference to the repository. /// </summary> public override void Release() { ALFAERFResourceRepository Container = Repository as ALFAERFResourceRepository; ReleaseRef(); if (Container == null) { throw new OEIShared.IO.OEIIOException(OEIShared.IO.OEIIOExceptionCause.BadRepositoryState); } Container.ErfFile[EncapsulatedFileName].FlushData(); }
/// <summary> /// Get a resource stream for the resource. /// </summary> /// <param name="Write">Supplies true if write access is requested, /// else false if only read only access is requested.</param> /// <returns>The I/O stream object.</returns> public override Stream GetStream(bool Write) { if (Write == true) { throw new OEIShared.IO.OEIIOException(OEIShared.IO.OEIIOExceptionCause.BadParameter); } ALFAERFResourceRepository Container = Repository as ALFAERFResourceRepository; if (Container == null) { throw new OEIShared.IO.OEIIOException(OEIShared.IO.OEIIOExceptionCause.BadRepositoryState); } GetRef(); return(new MemoryStream(Container.ErfFile[EncapsulatedFileName].Data)); }