//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:2.0.50727.42
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.42.
//
#pragma warning disable 1591
namespace DataBindingFundamentalsSample.EmployeesWebService {
using System.Diagnostics;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Xml.Serialization;
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="EmployeesServiceSoap", Namespace="http://tempuri.org/")]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(MarshalByRefObject))]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(Employee[]))]
public partial class EmployeesService : System.Web.Services.Protocols.SoapHttpClientProtocol {
private System.Threading.SendOrPostCallback GetEmployeesOperationCompleted;
private System.Threading.SendOrPostCallback UpdateEmployeesOperationCompleted;
private bool useDefaultCredentialsSetExplicitly;
///
public EmployeesService() {
this.Url = global::DataBindingFundamentalsSample.Properties.Settings.Default.DataBindingFundamentalsSample_EmployeesWebService_EmployeesService;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
public new string Url {
get {
return base.Url;
}
set {
if ((((this.IsLocalFileSystemWebService(base.Url) == true)
&& (this.useDefaultCredentialsSetExplicitly == false))
&& (this.IsLocalFileSystemWebService(value) == false))) {
base.UseDefaultCredentials = false;
}
base.Url = value;
}
}
public new bool UseDefaultCredentials {
get {
return base.UseDefaultCredentials;
}
set {
base.UseDefaultCredentials = value;
this.useDefaultCredentialsSetExplicitly = true;
}
}
///
public event GetEmployeesCompletedEventHandler GetEmployeesCompleted;
///
public event UpdateEmployeesCompletedEventHandler UpdateEmployeesCompleted;
///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetEmployees", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public Employee[] GetEmployees() {
object[] results = this.Invoke("GetEmployees", new object[0]);
return ((Employee[])(results[0]));
}
///
public void GetEmployeesAsync() {
this.GetEmployeesAsync(null);
}
///
public void GetEmployeesAsync(object userState) {
if ((this.GetEmployeesOperationCompleted == null)) {
this.GetEmployeesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetEmployeesOperationCompleted);
}
this.InvokeAsync("GetEmployees", new object[0], this.GetEmployeesOperationCompleted, userState);
}
private void OnGetEmployeesOperationCompleted(object arg) {
if ((this.GetEmployeesCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetEmployeesCompleted(this, new GetEmployeesCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateEmployees", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void UpdateEmployees(Employee[] employees) {
this.Invoke("UpdateEmployees", new object[] {
employees});
}
///
public void UpdateEmployeesAsync(Employee[] employees) {
this.UpdateEmployeesAsync(employees, null);
}
///
public void UpdateEmployeesAsync(Employee[] employees, object userState) {
if ((this.UpdateEmployeesOperationCompleted == null)) {
this.UpdateEmployeesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateEmployeesOperationCompleted);
}
this.InvokeAsync("UpdateEmployees", new object[] {
employees}, this.UpdateEmployeesOperationCompleted, userState);
}
private void OnUpdateEmployeesOperationCompleted(object arg) {
if ((this.UpdateEmployeesCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.UpdateEmployeesCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
///
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
private bool IsLocalFileSystemWebService(string url) {
if (((url == null)
|| (url == string.Empty))) {
return false;
}
System.Uri wsUri = new System.Uri(url);
if (((wsUri.Port >= 1024)
&& (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) {
return true;
}
return false;
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class Employee {
private int employeeIDField;
private string lastNameField;
private string firstNameField;
private string titleField;
private string titleOfCourtesyField;
private System.DateTime birthDateField;
private System.DateTime hireDateField;
private string addressField;
private string cityField;
private string regionField;
private string postalCodeField;
private string countryField;
private string homePhoneField;
private string extensionField;
private Image photoField;
private string notesField;
private int reportsToField;
private string photoPathField;
///
public int EmployeeID {
get {
return this.employeeIDField;
}
set {
this.employeeIDField = value;
}
}
///
public string LastName {
get {
return this.lastNameField;
}
set {
this.lastNameField = value;
}
}
///
public string FirstName {
get {
return this.firstNameField;
}
set {
this.firstNameField = value;
}
}
///
public string Title {
get {
return this.titleField;
}
set {
this.titleField = value;
}
}
///
public string TitleOfCourtesy {
get {
return this.titleOfCourtesyField;
}
set {
this.titleOfCourtesyField = value;
}
}
///
public System.DateTime BirthDate {
get {
return this.birthDateField;
}
set {
this.birthDateField = value;
}
}
///
public System.DateTime HireDate {
get {
return this.hireDateField;
}
set {
this.hireDateField = value;
}
}
///
public string Address {
get {
return this.addressField;
}
set {
this.addressField = value;
}
}
///
public string City {
get {
return this.cityField;
}
set {
this.cityField = value;
}
}
///
public string Region {
get {
return this.regionField;
}
set {
this.regionField = value;
}
}
///
public string PostalCode {
get {
return this.postalCodeField;
}
set {
this.postalCodeField = value;
}
}
///
public string Country {
get {
return this.countryField;
}
set {
this.countryField = value;
}
}
///
public string HomePhone {
get {
return this.homePhoneField;
}
set {
this.homePhoneField = value;
}
}
///
public string Extension {
get {
return this.extensionField;
}
set {
this.extensionField = value;
}
}
///
public Image Photo {
get {
return this.photoField;
}
set {
this.photoField = value;
}
}
///
public string Notes {
get {
return this.notesField;
}
set {
this.notesField = value;
}
}
///
public int ReportsTo {
get {
return this.reportsToField;
}
set {
this.reportsToField = value;
}
}
///
public string PhotoPath {
get {
return this.photoPathField;
}
set {
this.photoPathField = value;
}
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public abstract partial class Image : MarshalByRefObject {
private object tagField;
private ColorPalette paletteField;
///
public object Tag {
get {
return this.tagField;
}
set {
this.tagField = value;
}
}
///
public ColorPalette Palette {
get {
return this.paletteField;
}
set {
this.paletteField = value;
}
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public partial class ColorPalette {
}
///
[System.Xml.Serialization.XmlIncludeAttribute(typeof(Image))]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.42")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")]
public abstract partial class MarshalByRefObject {
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
public delegate void GetEmployeesCompletedEventHandler(object sender, GetEmployeesCompletedEventArgs e);
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetEmployeesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetEmployeesCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
///
public Employee[] Result {
get {
this.RaiseExceptionIfNecessary();
return ((Employee[])(this.results[0]));
}
}
}
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.42")]
public delegate void UpdateEmployeesCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
}
#pragma warning restore 1591