using System;
using System.Runtime.Remoting;
using System.Collections.Generic;
using System.Text;

using SharedLibrary;

namespace IpcClient
{
    class Program
    {
        static void Main(string[] args)
        {
            ISharedObject<string> stringObject = (ISharedObject<string>)Activator.GetObject(typeof(ISharedObject<string>), "ipc://Generics-Remoting/StringObject.rem");

            ISharedObject<DateTime> dateObject = (ISharedObject<DateTime>)Activator.GetObject(typeof(ISharedObject<DateTime>), "ipc://Generics-Remoting/DateObject.rem");

            stringObject.PrintMessage("Pozdrowienia od klienta IPC");
            dateObject.PrintMessage(DateTime.Now);

            Console.WriteLine("Komunikaty zdalne zostały wysłane.");
            Console.ReadLine();
        }
    }
}
