I have written code to get latest from TFS using the client APIs. I would like to be updated on the progress and I understand that the properties "Total" and "Current" of GettingEventArgs can be used. But these properties are not visible during design time but only visible at runtime (see image below). But event at runtime, I am unable to fetch them using reflection as give below.
static void versionControl_Getting(object sender, GettingEventArgs e)
{
GettingEventArgs status = (GettingEventArgs)e;
int curr = (int)status.GetType().GetProperty("Current").GetValue(status, null);
int tot = (int)status.GetType().GetProperty("Total").GetValue(status, null);
}
This does not find the property and I get a Null reference on the "GetProperty". I hope the syntax is correct.
Any thoughts on how to get hold of these property values?
There is an error in GettingEventArgs status = (GettingEventArgs)e;. You probably ment