Ejemplo n.º 1
0
 public List <string> GetThreads()
 {
     try
     {
         IThreadManager m = ThreadManagerFactory.ThreadManager();
         return(m.GetThreads());
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + "\n" + ex.StackTrace);
     }
 }
Ejemplo n.º 2
0
 public bool CreateThread(string name, Guid?creatorID)
 {
     try
     {
         IThreadManager m = ThreadManagerFactory.ThreadManager();
         return(m.CreateThread(name, creatorID));
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + "\n" + ex.StackTrace);
     }
 }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            IThreadManager m = ThreadManagerFactory.ThreadManager();

            m.CreateThread("Test Thread", null);

            //IForumUnitOfWork uow = ForumUOWFactory.ForumUnitOfWork();
            //uow.UserRepository.Create(new User { Username = "******" });
            //uow.SaveChanges();
            ////uow.PostRepository.Create(new Post { Content = "Hello!!" });
            ////uow.SaveChanges();

            //List<Post> posts = uow.PostRepository.All().ToList();

            //foreach(Post p in posts)
            //{
            //    Console.WriteLine(p.Content);
            //}


            //Console.ReadLine();


            //ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();

            //ShowPosts(client.GetPosts().ToList());

            //string input = Console.ReadLine();

            //while (input != "exit")
            //{

            ////    bool added =client.AddPost(input);

            //    if(added)
            //    {
            //        ShowPosts(client.GetPosts().ToList());
            //    }
            //    input = Console.ReadLine();
            //}
        }