Class with property referenced with dll not serializing

Posted by djerry on Stack Overflow See other posts from Stack Overflow or by djerry
Published on 2010-05-18T12:58:28Z Indexed on 2010/05/18 13:00 UTC
Read the original article Hit count: 167

Filed under:
|
|
|
|

Hey guys,

I got this class TapiCall. It has 4 properties : 2 datetimes, 1 string and an object. The object is a class that's referenced by Atapi3.dll, so i cannot alter it. My class TapiCall looks like this :

[DataContract]
public class TapiCall
{
    private DateTime start, end;
    private TCall call;
    private string status;

    [DataMember]
    public string Status
    {
        get { return status; }
        set { status = value; }
    }
    [DataMember]
    public TCall Call
    {
        get { return call; }
        set { call = value; }
    }
    [DataMember]
    public DateTime End
    {
        get { return end; }
        set { end = value; }
    }
    [DataMember]
    public DateTime Start
    {
        get { return start; }
        set { start = value; }
    }
    public TapiCall()
    {

    }
    public TapiCall(DateTime start, DateTime end, TCall call)
    {
        this.Start = start;
        this.End = end;
        this.Call = call;
    }
}

Now when i use my visual studio command line, to generate my proxy class, it generates an error. When i remove TapiCall from the method in my app, i can rebuild my proxy again, so i know

[OperationContract]
    void StuurUpdatedCall(TapiCall tpCall);

is causing the problem. My question now is can i Serialize a class that's referenced by a dll?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about c#