Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 18th, 2012  |  syntax: None  |  size: 0.61 KB  |  hits: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. WCF persistent vars?
  2. <ServiceContract(Namespace:="")> _
  3. <AspNetCompatibilityRequirements(RequirementsMode:=AspNetCompatibilityRequirementsMode.Allowed)> _
  4. <ServiceBehavior(InstanceContextMode:=ServiceModel.InstanceContextMode.Single, ConcurrencyMode:=ServiceModel.ConcurrencyMode.Single)> _
  5. Public Class MyServices
  6.     Public testint As Integer = 0
  7.  
  8.     <WebGet()>
  9.     <OperationContract()> _
  10.     Public Function test1() As Boolean
  11.         testint = 42
  12.         return true
  13.     End Function
  14.  
  15.     <WebGet()>
  16.     <OperationContract()> _
  17.     Public Function test2() As Integer
  18.         return testint
  19.     End Function
  20. End Class