zinhokis

I have run svcutil and I show you part of the code I have obtained:

namespace System.Drawing

{

using System;

using System.Runtime.Serialization;

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]

[System.SerializableAttribute()]

public partial class Bitmap : System.Drawing.Image

{

public Bitmap(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) :

base(info, context)

{

}

}

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]

[System.SerializableAttribute()]

[System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Drawing.Bitmap))]

public partial class Image : object, System.Runtime.Serialization.ISerializable

{

private System.Runtime.Serialization.SerializationInfo info;

public Image(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)

{

this.info = info;

}

public System.Runtime.Serialization.SerializationInfo SerializationInfo

{

get

{

return this.info;

}

set

{

this.info = value;

}

}

public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)

{

if ((this.SerializationInfo == null))

{

return;

}

System.Runtime.Serialization.SerializationInfoEnumerator enumerator = this.SerializationInfo.GetEnumerator();

for (

; enumerator.MoveNext();

)

{

System.Runtime.Serialization.SerializationEntry entry = enumerator.Current;

info.AddValue(entry.Name, entry.Value);

}

}

}

}

This is the part in witch it seems to make the Image and Bitmap classes (System.Drawing) serializables. The problem is that, though the key "partial" is added, the compiler tells me that there are a conflict between the class in "System.Drawing.dll" and the one in "proxy.cs" and I can't have access to the specific methods of those classes.

Maybe it's a stupid problem, but I'm blocked with this.

Thanks!



Re: Windows Communication Foundation (Indigo) WCF Web Service proxy problem with serialization

joe zhou - MSFT

Bitmap itself is serializable, so if you want to use it, you can use /r:[pathToYourFramewordDir]System.Drawing.dll then svcutil won't regenerated a bitmap type.



Re: Windows Communication Foundation (Indigo) WCF Web Service proxy problem with serialization

zinhokis

Thanks! I'm sorry but WCF is new for me.

Works great!