Static methods in ServiceContract(WCF)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hakan Fatih YILDIRIM

    #1

    Static methods in ServiceContract(WCF)

    How can i declare a static method in servicecontract ?Ýs there any
    sample? i couldn't find any.

    Best Regards,

    Hakan Fatih YILDIRIM
    MCP
  • Marc Gravell

    #2
    Re: Static methods in ServiceContract (WCF)

    No; WCF contracts are interface based, and static methods don't relate
    to interfaces.

    Marc

    Comment

    • Nicholas Paldino [.NET/C# MVP]

      #3
      Re: Static methods in ServiceContract (WCF)

      Not only that, but depending on the instantiation method for the service
      at the address with the particular binding, even though you are working with
      an object proxy, you might effectively be making static calls (as there will
      be no state stored between calls).

      Remember, static (in the way you, the OP, are thinking) is a distinctly
      OO concept, something which does not translate directly to services in
      distributed systems.


      --
      - Nicholas Paldino [.NET/C# MVP]
      - mvp@spam.guard. caspershouse.co m

      "Marc Gravell" <marc.gravell@g mail.comwrote in message
      news:99e3fbcc-16f6-43e3-9b7d-ecb85bd8c48f@i2 9g2000prf.googl egroups.com...
      No; WCF contracts are interface based, and static methods don't relate
      to interfaces.
      >
      Marc

      Comment

      Working...