How to avoid conflicts when using services? (.NET C#) -
Imagine this class This is the return type of a WCF service method. When I use svcutil.exe it re-creates the square from the metadata: But it conflicts with common library definitions I am having compilation errors when I pass the Web Service Method (Report) for the method of a CommonLibrary Try: There is some such invalid argument in error 4 'GoodLoader Method Match (CommonLibrary.Report) for CommonLibrary.ClassName.MethodName this How to solve without creating additional namespace ? (I want to avoid type conversion)
namespace CommonLibrary {public square report () {public Start Date Time {Get; Set; } Public int count {get; Set; }}}
Name space CommonLibrary {[System.CodeDom.Compiler.GeneratedCodeAttribute ("System.Runtime.Serialization", "3.0. 0.0 ")] [System.Runtime.Serialization.DataContractAttribute (name =" TrafficProblemReport ", namespace =" http://schemas.datacontract.org/2004/07/Indica ")] Public partial class TrafficProblemReport: Object, System. Runtime.Serialization.IExtensibleDataObject {Private Systems. time to time. Serialization. ExtensionData Object ExtensionData field; Private Systems DateTime Startfield; Private integer calculation field; [System.Runtime.Serialization.DataMemberAttribute ()] Public System.DateTime start {{get it. BackField Return; } Set {this.BeginField = value; }} [System.Runtime.Serialization.DataMemberAttribute ()] Public int calculation {get {return this.CountField; } Set {this.CountField = value; }}}}
I could not find the time to try right now , But do / switch switches?
According to this I must be correct:
Comments
Post a Comment