/// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        public static DBBookFirst getInstance()
        {
            if (instance == null)
            {
                instance = new DBBookFirst();
            }

            return(instance);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            DBBookFirst  dbfirst  = new DBBookFirst();
            DBBookSecond dbsecond = new DBBookSecond();

            Pipe1 pipe1 = new Pipe1();

            pipe1.LeftSource  = dbfirst;
            pipe1.RightSource = dbsecond;

            (new Thread(dbfirst.Run)).Start();
            (new Thread(dbsecond.Run)).Start();
            (new Thread(pipe1.Run)).Start();
        }