Advertisement
Guest User

Untitled

a guest
May 28th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. <ServiceContract()> _
  2. Public Interface IServicevb
  3.  
  4. <OperationContract()> _
  5. Function GetData(ByVal value As Integer) As String
  6.  
  7. <OperationContract()> _
  8. Function GetDataUsingDataContract(ByVal composite As CompositeType) As CompositeType
  9.  
  10. ' TÂCHE : ajoutez vos opérations de service ici
  11. <OperationContract()> _
  12. Function getRandomInt(ByVal Min As Integer, ByVal Max As Integer) As Integer
  13.  
  14. <OperationContract()> _
  15. Function getSquare(ByVal i As Integer) As Integer
  16.  
  17. End Interface
  18.  
  19. ' Utilisez un contrat de données comme indiqué dans l’exemple ci-après pour ajouter les types composites aux opérations de service.
  20. <DataContract()> _
  21. Public Class CompositeType
  22.  
  23. Private boolValueField As Boolean
  24. Private stringValueField As String
  25. Private versionValueField As String
  26.  
  27. <DataMember()> _
  28. Public Property BoolValue() As Boolean
  29. Get
  30. Return Me.boolValueField
  31. End Get
  32. Set(ByVal value As Boolean)
  33. Me.boolValueField = value
  34. End Set
  35. End Property
  36.  
  37. <DataMember()> _
  38. Public Property StringValue() As String
  39. Get
  40. Return Me.stringValueField
  41. End Get
  42. Set(ByVal value As String)
  43. Me.stringValueField = value
  44. End Set
  45. End Property
  46.  
  47. <DataMember()> _
  48. Public Property VersionValue() As String
  49. Get
  50. Return Me.versionValueField
  51. End Get
  52. Set(ByVal value As String)
  53. Me.versionValueField = value
  54. End Set
  55. End Property
  56.  
  57. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement