removing attributes out of interfaces??
-
Hi i currently define: Model.Validation.IContactValidation public interface IContactValidation : IValidate<Contact> { ValidationResult ValidateMessage(String message); ValidationResult ValidateSubject(String subject); ValidationResult ValidateReplyEmail(String replyemail); ValidationResult ValidateName(String name); } I want to force the wcf service ModelValidation/ContactValidation/Method to implement and expose this interface. currently I want the publicly exposed wcf service to be json format. but internal network version of the service to be binary format. in some other cases with working with vendors the services need to support both json and xml format. so how can i keep this base interface clean and not have to stick concrete requirements in my interface? [WebInvoke( Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "ContactValidate/{message}")] ValidationResult ValidateMessage(string message); Seems currently i would need to manage this using msbuild and using preprocessor directives to achieve what i want. however shouldn't there be an easier way?