-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SLVS-1434 Extend JsonFileHandler #5661
SLVS-1434 Extend JsonFileHandler #5661
Conversation
…aps the model from the logic model to the json model and vice-versa
bool TryWriteToFile<T>(string filePath, T model) where T : class; | ||
} | ||
|
||
[Export(typeof(IJsonFileHandler))] | ||
[PartCreationPolicy(CreationPolicy.Shared)] | ||
[PartCreationPolicy(CreationPolicy.NonShared)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that you removed the lock it doesn't actually matter if it's shared or not 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I don't think there is a good reason for it to be a singleton. In fact, it might be dangerous if in some point any state is being added to the class.
/// <typeparam name="T">The type of the model that will be serialized</typeparam> | ||
/// <param name="filePath">The path to the file</param> | ||
/// <param name="content">The content of the file deserialized to the provided type</param> | ||
/// <returns>True if the file could be read and the model could be serialized successfully. False otherwise</returns> | ||
bool TryReadFile<T>(string filePath, out T content) where T : class; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this method going to be used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now, I think not. I could remove it.
Quality Gate failedFailed conditions |
6dc2527
into
feature/new-connected-mode
SLVS-1434
This PR targets this PR as both are preparation for the server connection repository