J
Jared
My goal is to provide some additional functionallity inside the
database wrapper if the current object has the LongRunningAttribute
attribute applied. The attribute is never being instantiated by the
framework. What am I doing wrong?
TIA,
Jared
[LongRunning()]
private DatabaseWrapper _database = new DatabaseWrapper();
private void button2_Click(object sender, EventArgs e)
{
_database.ExecuteCommandMethod("some command", 30);
}
[AttributeUsage(AttributeTargets.Field)]
public class LongRunningAttribute : Attribute
{
public LongRunningAttribute(): base()
{
System.Diagnostics.Debug.Write(this.ToString());
}
}
public class DatabaseWrapper
{
private string _test = string.Empty;
public DatabaseWrapper()
{
this._test = "blah";
}
public object ExecuteCommandMethod(string commandText, int
commandTimeout)
{
return null;
}
}
TIA,
Jared
database wrapper if the current object has the LongRunningAttribute
attribute applied. The attribute is never being instantiated by the
framework. What am I doing wrong?
TIA,
Jared
[LongRunning()]
private DatabaseWrapper _database = new DatabaseWrapper();
private void button2_Click(object sender, EventArgs e)
{
_database.ExecuteCommandMethod("some command", 30);
}
[AttributeUsage(AttributeTargets.Field)]
public class LongRunningAttribute : Attribute
{
public LongRunningAttribute(): base()
{
System.Diagnostics.Debug.Write(this.ToString());
}
}
public class DatabaseWrapper
{
private string _test = string.Empty;
public DatabaseWrapper()
{
this._test = "blah";
}
public object ExecuteCommandMethod(string commandText, int
commandTimeout)
{
return null;
}
}
TIA,
Jared