Code on the server
<DataContract(Namespace:="http://schema.aam.us.com/2010/6", Name:="TradeStatus")>
Public Enum TradeStatus
NewOrder = 100
SendToProvider = 101
ProviderSubmitted = 102
ProviderAccepted = 103
ExecutionPending = 104
Executed = 105
TicketsCreated = 106 'TERMINAL STATE
End Enum
<DataContract(Namespace:="http://schema.aam.us.com/2010/6", Name:="StatusUpdate")> _
Public Class StatusUpdate
Public Sub New(ByVal tradeStatus As TradeStatus, ByVal additionalInformation As String)
Me.TradeStatus = tradeStatus
Me.AdditionalInforamtion = additionalInformation
End Sub
<DataMember(IsRequired:=True)> _
Public Property AdditionalInforamtion() As String
<DataMember(IsRequired:=True)> _
Public Property TradeStatus() As TradeStatus
End Class
Generated code
<System.Diagnostics.DebuggerStepThroughAttribute(), _
System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0"), _
System.Runtime.Serialization.DataContractAttribute(Name:="StatusUpdate", [Namespace]:="http://schema.aam.us.com/2010/6"), _
System.SerializableAttribute()> _
Partial Public Class StatusUpdate
Inherits Object
Implements System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
<System.NonSerializedAttribute()> _
Private extensionDataField As System.Runtime.Serialization.ExtensionDataObject
Private AdditionalInforamtionField As String
Private TradeStatusField As String
<Global.System.ComponentModel.BrowsableAttribute(false)> _
Public Property ExtensionData() As System.Runtime.Serialization.ExtensionDataObject Implements System.Runtime.Serialization.IExtensibleDataObject.ExtensionData
Get
Return Me.extensionDataField
End Get
Set
Me.extensionDataField = value
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute(IsRequired:=true)> _
Public Property AdditionalInforamtion() As String
Get
Return Me.AdditionalInforamtionField
End Get
Set
If (Object.ReferenceEquals(Me.AdditionalInforamtionField, value) <> true) Then
Me.AdditionalInforamtionField = value
Me.RaisePropertyChanged("AdditionalInforamtion")
End If
End Set
End Property
<System.Runtime.Serialization.DataMemberAttribute(IsRequired:=true, EmitDefaultValue:=false)> _
Public Property TradeStatus() As String
Get
Return Me.TradeStatusField
End Get
Set
If (Object.ReferenceEquals(Me.TradeStatusField, value) <> true) Then
Me.TradeStatusField = value
Me.RaisePropertyChanged("TradeStatus")
End If
End Set
End Property
Public Event PropertyChanged As System.ComponentModel.PropertyChangedEventHandler Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged
Protected Sub RaisePropertyChanged(ByVal propertyName As String)
Dim propertyChanged As System.ComponentModel.PropertyChangedEventHandler = Me.PropertyChangedEvent
If (Not (propertyChanged) Is Nothing) Then
propertyChanged(Me, New System.ComponentModel.PropertyChangedEventArgs(propertyName))
End If
End Sub
End Class