using System;
using System.Xml;
using System.Xml.Serialization;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Diagnostics;
using System.Runtime;
using System.Runtime.Serialization;
using Tdo;
using Tdo.Common;
using Tdo.Common.Entities;
using Tdo.Common.Entities.Tables;
using Tdo.Common.Entities.Views;
using Tdo.Common.Helper;
using Tdo.Common.TdoSqlExpressionDom;
using Tdo.Common.TdoTypes;
namespace Tdo.Common{
/// <summary>
/// A Tdo-defined state object that will be passed to the callBack procedure.
/// Retrieve user-object from within the callBack procedure using the System.IAsyncResult.AsyncState property.
/// </summary>
[Serializable()]
internal class TdoStateObject
{
private string pMethodName;
private AsyncCallback pcallBack;
private object pStateObject;
private Guid pAsyncCommandUniqueIdentifier;
/// <summary>
/// Private default constructor.
/// </summary>
private TdoStateObject()
{
}
/// <summary>
/// TdoStateObject constructor
/// </summary>
/// <param name="callBack">References the callBack method to be called when the asynchronous operation is completed.</param>
/// <param name="stateObject">Gets a user-defined object that qualifies or contains information about an asynchronous operation.</param>
/// <param name="methodName">method name async.ly invoked</param>
internal TdoStateObject(AsyncCallback callBack, object stateObject, string methodName)
{
this.pcallBack = callBack;
this.pStateObject = stateObject;
this.pMethodName = methodName;
this.pAsyncCommandUniqueIdentifier = Guid.NewGuid();
}
/// <summary>
/// References the callBack method to be called when the asynchronous operation is completed.
/// </summary>
public AsyncCallback callBack
{
get
{
return this.pcallBack;
}
}
/// <summary>
/// Gets a user-defined object that qualifies or contains information about an asynchronous operation.
/// </summary>
public object StateObject
{
get
{
return this.pStateObject;
}
}
/// <summary>
/// References async command unique identifier (System.Guid).
/// </summary>
public Guid AsyncCommandUniqueIdentifier
{
get
{
return this.pAsyncCommandUniqueIdentifier;
}
}
public string MethodName
{
get
{
return this.pMethodName;
}
}
}
}
|