I am trying to write a plugin for Autocad, and there, they have these Extension Dictionaries where you can save data into an Autocad object so that when you close a drawing file, the saved data persists.
Now I need 4 functions to manipulate the extension dictionary:
- exist - for checking if an extension dictionary exists
- create - for creating an extension dictionary
- set - for setting data inside the extension dictionary
- get - for getting data from the extension dictionary
currently, what I have is I have an ExtensionDictionaryManager.cs that is partial broken down into 4 .cs files like this:
partial class ExtensionDictionaryManager
{
public bool Exist() {...}
}
partial class ExtensionDictionaryManager
{
public bool Create() {...}
}
partial class ExtensionDictionaryManager
{
public bool Set() {...}
}
partial class ExtensionDictionaryManager
{
public bool Get() {...}
}
Does this follow the Single Responsibility Principle? Or should I break it down even more into ExtensionDictionaryCreator, ExtensionDictionaryChecker, ExtensionDictionarySetter and ExtensionDictionaryGetter?
My concern is if I did break it into absolute single responsibilities, not grouping related functionalities together, and doing it consistently throughout my program, I would end up with so many objects.
Which would be the right way to do this?