public DynamicFileByteProvider ( string fileName, bool readOnly ) : System | ||
fileName | string | The name of the file from which bytes should be provided. |
readOnly | bool | |
return | System |
public DynamicFileByteProvider(string fileName, bool readOnly)
{
_fileName = fileName;
if (!readOnly)
{
_fileStream = File.Open(fileName, FileMode.Open, FileAccess.ReadWrite, FileShare.Read);
}
else
{
_fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
}
_readOnly = readOnly;
ReInitialize();
}
DynamicFileByteProvider::DynamicFileByteProvider ( string fileName ) : System |