void WriteObject_ServiceDescriptionImportStyle(System.Web.Services.Description.ServiceDescriptionImportStyle ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem) { System.Type type = ob.GetType(); if (type == typeof(System.Web.Services.Description.ServiceDescriptionImportStyle)) { } else { throw CreateUnknownTypeException(ob); } if (writeWrappingElem) { WriteStartElement(element, namesp, ob); } if (needType) { WriteXsiType("ServiceDescriptionImportStyle", "http://microsoft.com/webReference/"); } Writer.WriteString(GetEnumValue_ServiceDescriptionImportStyle(ob)); if (writeWrappingElem) { WriteEndElement(ob); } }
public System.Web.Services.Description.ServiceDescriptionImportStyle ReadObject_ServiceDescriptionImportStyle(bool isNullable, bool checkType) { Reader.ReadStartElement(); System.Web.Services.Description.ServiceDescriptionImportStyle res = GetEnumValue_ServiceDescriptionImportStyle(Reader.ReadString()); if (Reader.NodeType != XmlNodeType.None) { Reader.ReadEndElement(); } return(res); }
string GetEnumValue_ServiceDescriptionImportStyle(System.Web.Services.Description.ServiceDescriptionImportStyle val) { switch (val) { case System.Web.Services.Description.ServiceDescriptionImportStyle.Client: return("client"); case System.Web.Services.Description.ServiceDescriptionImportStyle.Server: return("server"); case System.Web.Services.Description.ServiceDescriptionImportStyle.ServerInterface: return("serverInterface"); default: throw CreateInvalidEnumValueException((long)val, typeof(System.Web.Services.Description.ServiceDescriptionImportStyle).FullName); } }
string Write2_ServiceDescriptionImportStyle(System.Web.Services.Description.ServiceDescriptionImportStyle v) { string s = null; switch (v) { case System.Web.Services.Description.ServiceDescriptionImportStyle.@Client: s = @"client"; break; case System.Web.Services.Description.ServiceDescriptionImportStyle.@Server: s = @"server"; break; case System.Web.Services.Description.ServiceDescriptionImportStyle.@ServerInterface: s = @"serverInterface"; break; default: throw CreateInvalidEnumValueException(((System.Int64)v).ToString(System.Globalization.CultureInfo.InvariantCulture), @"System.Web.Services.Description.ServiceDescriptionImportStyle"); } return(s); }