how to call any method of Project from classlibrary?
- by Pankaj Mishra
Hello
I have Class Library Where a class of multithreading Of Producer and consumer based.
private void WorkDeQueue()
{
while (true)
{
string Url = null;
lock (locker)
{
if (queueList.Count > 0)
{
Url = queueList.Dequeue();
/* return if a null is found in the queue */
if (Url == null) return;
}
}
if (Url != null)
{
/* if a job was found then process it */
GetData(Url); //This Is a Method
}
else
{
/* if a job was not found (meaning list is empty) then
* wait till something is added to it*/
wh.WaitOne();
}
}
}
this GetData method has no body on that class.
How can i call any method of my project in palace of getdata.
I tried with factory Pattern and also with reflection. but both didn't worked for me.
So plz tell me how can i call any method of my project from here.