public void Close() { if (profile_ == null) { return; } if (needsFlushing_) { Flush(); } doc_ = null; if (file_ != null) { file_.Close(); file_ = null; } if (profile_ != null) { profile_.buffer_ = null; profile_ = null; } }
internal XmlBuffer(XmlProfile profile, bool lockFile) { profile_ = profile; if (lockFile && File.Exists(profile_.Name)) { file_ = new FileStream(profile_.Name, FileMode.Open, FileAccess.ReadWrite, FileShare.Read); } }