protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing && ms != null) { ms.Dispose(); } disposedValue = true; } }