You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor SimaiFile for flexibility and resource management
SimaiFile class was refactored to improve the flexibility and ensure the proper disposal of the StreamReader object. Now, different types of file input (FileSystemInfo, string, Stream, StreamReader) are supported, which optimizes the file reading depending on the available input format. A IDisposable interface was implemented to ensure that the StreamReader (_simaiReader) is properly disposed, which helps to manage system resources by freeing up memory when the object is no longer needed. A 'Dispose' method was added to close the StreamReader when it's no longer needed. The changes lead to more flexible and efficient file reading and help manage system resources effectively.