Service Factory Issue

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

When you create a Data Contract with number of primitive properties, be sure that the name of the property is never "Value". Following example shows a Data Contract which you should not use:

image

In this case the Data Contract generator would create following code, which is invalid, but it can be compiled:

[WcfSerialization::DataContract(Namespace = "http://daenet.eu/xsylon",
Name = "Token")]
public partial class Token
{
      private System.Guid tokenValue;

      [WcfSerialization::DataMember(Name = "TokenValue",
        IsRequired = false, Order = 0)]
       public System.Guid TokenValue
       {
          get { return tokenValue; }
         
set { value = value; }
       }                    
}


Posted Jan 29 2008, 02:49 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.