WCF communication with graph

Mar 1, 2010 at 7:00 AM

I am developing a monitoring appplication for a local rehab center. In what way should I set the return of the service? I tried stream but the graph doesn't bind it.



    <OperationContract()> _
    Public Function dateTimeAcc(ByVal fileID As String) As Stream
        Dim dateTimeAccRT As String = ""
        ' Create a new DataTable.
        Dim table As DataTable = New DataTable("ParentTable")
        ' Declare variables for DataColumn and DataRow objects.
        Dim column As DataColumn
        Dim row As DataRow
        ' Create new DataColumn, set DataType, ColumnName 
        ' and add to DataTable.    
        column = New DataColumn()
        column.DataType = System.Type.GetType("System.DateTime")
        column.ColumnName = "dateAndTime"
        column.ReadOnly = True
        column.Unique = True
        ' Add the Column to the DataColumnCollection.
        ' Create second column.
        column = New DataColumn()
        column.DataType = System.Type.GetType("System.Double")
        column.ColumnName = "value"
        column.ReadOnly = False
        column.Unique = False
        ' Add the column to the table.
        Dim i As Integer
        For i = 1 To 20000
            row = table.NewRow()
            row("dateAndTime") = Now.AddMinutes(i)
            row("value") = i
        Next i
        Return dateTimeAccRT
    End Function

    <OperationContract()> _

    Public Function dateTimeAcc(ByVal fileID As String) As Stream


    End Function




Mar 15, 2010 at 3:33 PM

hi 24marshall

We expect the service to return a collection of TimePoint objects (infact any IEnumerable of TimePoint) so that the result can be directly bound to graphs.

In this case the service is returning a string which contains some information XML format.  Silverlight client will have to parse the XML string and construct a collection of timepoint objects and bind to the graph.

Hope this helps


Tom Chapman

MSCUI Release Manager