Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. removing attributes out of interfaces??

removing attributes out of interfaces??

Scheduled Pinned Locked Moved WCF and WF
questioncsharpvisual-studiowcfsysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leblanc Meneses 0
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups