I have an ASP.Net Web Forms project, which is built as (among other things) a user interface to a CRM web service.
I have an interface, IMembershipService
, which exposes a number of methods for purchasing different kinds of subscriptions to a service. The concrete implementation of this, SpecificMemberService
, will abstract a number of web service calls to a third-party CRM system.
The concrete implementation requires that different 'subscription levels' be passed to it as specific 4-character string codes. Currently, I have defined the following in my service layer:
public static class MemberTypes
{
public const string Basic = "MEM1";
public const string Extra = "MEM2";
public const string Professional = "MEM3";
}
However, these codes are specific to the concrete class SpecificMemberService
and - as such - shouldn't really be independent of it as they currently are. How can I expose strongly-typed MemberType
codes to my web application, which are constant with respect to a concrete implementation of IMembershipService
?