private OpenDMS.IO.FileStream GetStream() { OpenDMS.IO.File file = null; if (_version.Content.Stream == null) { if (string.IsNullOrEmpty(_version.Content.LocalFilepath)) { TriggerOnError("Data.Content has no source.", new NullReferenceException()); return null; } file = new OpenDMS.IO.File(_version.Content.LocalFilepath); if (!file.Exists()) { TriggerOnError("Data.Content has no source.", new NullReferenceException()); return null; } return file.GetStream(System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.None, System.IO.FileOptions.None, _sendBufferSize, this); } else { return _version.Content.Stream; } }