У меня есть два веб-сервиса. Одна из них является «полной» версией, а другая - «новой» версией с другой реализацией нескольких методов веб-службы «полной» версии. Когда я генерирую прокси-классы этих сервисов в Visual Studio 2017 (. Net Framework 4.7.2, через «Add Service Reference Tool»), они имеют разное значение System.CodeDom.Compiler.GeneratedCodeAttribute
и разные типы одних и тех же полей.
Прокси "полного" веб-сервиса:
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="LtrDocumentObject", Namespace="http://schemas.datacontract.org/2004/07/TrafficApplicationServer.KP.Objects")]
[System.SerializableAttribute()]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(WsdlParsing_Framework.IRS_Service.TeoDocumentObject))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(WsdlParsing_Framework.IRS_Service.KpDocumentObject))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(WsdlParsing_Framework.IRS_Service.TeoOperationObject))]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(WsdlParsing_Framework.IRS_Service.TeoExpeditionObject))]
public partial class LtrDocumentObject : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
[System.Runtime.Serialization.OptionalFieldAttribute()]
private System.Nullable<System.Guid> ClientGuidField;
Прокси "нового" веб-сервиса:
/// <remarks/>
[System.Xml.Serialization.XmlIncludeAttribute(typeof(KpDocumentObject))]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(TeoDocumentObject))]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.datacontract.org/2004/07/TrafficApplicationServer.KP.Objects")]
public partial class LtrDocumentObject : object, System.ComponentModel.INotifyPropertyChanged {
private string clientGuidField;
В чем причина такого поведения?