how to call any method of Project from classlibrary?

Posted by Pankaj Mishra on Stack Overflow See other posts from Stack Overflow or by Pankaj Mishra
Published on 2010-03-19T21:45:29Z Indexed on 2010/03/19 21:51 UTC
Read the original article Hit count: 296

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about class-library

Related posts about c#