What do I need to change in my abstract database so that implementations do not have to implement BOTH methods when only one is required in any given scenario? My example:
internal abstract class BaseBar<T> where T : BaseThing { protected internal abstract T DataFromXmlElements(IEnumerable<XmlNode> nodes); protected internal abstract T DataFromXmlElements(IEnumerable<XmlNode> nodes, string[] fieldNames); } class FooBarMapper : BaseBar<FooData> { protected internal override SforceObjectValueData DataObjectFromXmlElements(IEnumerable<XmlNode> nodes) { throw new NotImplementedException(); } protected internal override FooData DataFromXmlElements(IEnumerable<XmlNode> nodes, string[] fieldNames) { FooData o = new FooData { bar1 = bar1, bar2 = bar2 }; return o; } }
Greetings.
edit: The design is strange / bad / stupid I know ... I work with outdated code, and time on my side is not for refactoring now. I am trying to add a second method with an array of strings.
source share