/// <summary> /// Closes the map resources /// </summary> /// <remarks>Eg, tag manager, string id manager, IO streams, etc</remarks> public virtual void Close() { if (!CacheId.IsNull) { CloseTagIndexManager(); refManager = null; StringIdManagerDispose(); if (!IsSharedReference && InputStream != null) { InputStream.Close(); } InputStream = null; if (!IsSharedReference && OutputStream != null) { OutputStream.Close(); } OutputStream = null; CacheId = DatumIndex.Null; } }
public void Close() { if (InputStream != null) { InputStream.Close(); InputStream = null; } if (OutputStream != null) { OutputStream.Close(); OutputStream = null; } }
/// <summary> /// Creates the file /// </summary> /// <remarks>Closes existing file streams</remarks> public void Create() { string dir = System.IO.Path.GetDirectoryName(path); if (!System.IO.Directory.Exists(dir)) { System.IO.Directory.CreateDirectory(dir); } if (!System.IO.File.Exists(path)) { System.IO.File.Create(path).Close(); } if (InputStream != null) { InputStream.Close(); InputStream = null; } if (OutputStream != null) { OutputStream.Close(); OutputStream = null; } }