Exemplo n.º 1
0
         private static void RunDataService(string profiletype)
        {
            while (true)
            {
             Api.SocialProfile.SocialProfile ApiobjSocialProfile=new Api.SocialProfile.SocialProfile ();
             List<Domain.Socioboard.Domain.SocialProfile> lstSocialProfile = (List<Domain.Socioboard.Domain.SocialProfile>)(new JavaScriptSerializer().Deserialize(ApiobjSocialProfile.SocialProfileByProfilType(profiletype.ToString()), typeof(List<Domain.Socioboard.Domain.SocialProfile>)));
            
                ThreadPool.SetMaxThreads(10, 4);           
                if (lstSocialProfile != null)
                {
                    if (lstSocialProfile.Count != 0)
                    {
                        foreach (var item in lstSocialProfile)
                        {
                            try
                            {
                                if (item.UserId.ToString()!="bbc23ca1-28f1-452c-a3a8-e58c5cc5a0f8")
                                {
                                    continue;
                                }

                                clsSocialSiteDataFeedsFactory objclsSocialSiteDataFeedsFactory = new clsSocialSiteDataFeedsFactory(item.ProfileType);
                                ISocialSiteData objSocialSiteDataFeeds = objclsSocialSiteDataFeedsFactory.CreateSocialSiteDataFeedsInstance();
                                if (objSocialSiteDataFeeds != null)
                                {
                                Console.WriteLine(objSocialSiteDataFeeds.GetData((object)item.UserId, item.ProfileId));
                                }
                            }
                            catch (Exception ex)
                            {
                                Console.WriteLine(ex.Message);
                            }
                        }
                    }
                    else
                    {

                        Console.WriteLine("No active record in Database");
                    }
                }
                else
                {
                    Console.WriteLine("No active record in Database");
                }

                Thread.Sleep(15*1000);
            }
        }
Exemplo n.º 2
0
        private static void RunDataService(string profiletype)
        {
            while (true)
            {
                Api.SocialProfile.SocialProfile ApiobjSocialProfile            = new Api.SocialProfile.SocialProfile();
                List <Domain.Socioboard.Domain.SocialProfile> lstSocialProfile = (List <Domain.Socioboard.Domain.SocialProfile>)(new JavaScriptSerializer().Deserialize(ApiobjSocialProfile.SocialProfileByProfilType(profiletype.ToString()), typeof(List <Domain.Socioboard.Domain.SocialProfile>)));

                ThreadPool.SetMaxThreads(10, 4);
                if (lstSocialProfile != null)
                {
                    if (lstSocialProfile.Count != 0)
                    {
                        foreach (var item in lstSocialProfile)
                        {
                            try
                            {
                                if (item.UserId.ToString() != "bbc23ca1-28f1-452c-a3a8-e58c5cc5a0f8")
                                {
                                    continue;
                                }

                                clsSocialSiteDataFeedsFactory objclsSocialSiteDataFeedsFactory = new clsSocialSiteDataFeedsFactory(item.ProfileType);
                                ISocialSiteData objSocialSiteDataFeeds = objclsSocialSiteDataFeedsFactory.CreateSocialSiteDataFeedsInstance();
                                if (objSocialSiteDataFeeds != null)
                                {
                                    Console.WriteLine(objSocialSiteDataFeeds.GetData((object)item.UserId, item.ProfileId));
                                }
                            }
                            catch (Exception ex)
                            {
                                Console.WriteLine(ex.Message);
                            }
                        }
                    }
                    else
                    {
                        Console.WriteLine("No active record in Database");
                    }
                }
                else
                {
                    Console.WriteLine("No active record in Database");
                }

                Thread.Sleep(15 * 1000);
            }
        }
Exemplo n.º 3
0
 private static void RunDataServiceInThreads(object objitem)
 {
     try
     {
         Domain.Socioboard.Domain.SocialProfile item = (Domain.Socioboard.Domain.SocialProfile)objitem;
         clsSocialSiteDataFeedsFactory          objclsSocialSiteDataFeedsFactory = new clsSocialSiteDataFeedsFactory(item.ProfileType);
         ISocialSiteData objSocialSiteDataFeeds = objclsSocialSiteDataFeedsFactory.CreateSocialSiteDataFeedsInstance();
         if (objSocialSiteDataFeeds != null)
         {
             Console.WriteLine(objSocialSiteDataFeeds.GetData((object)item.UserId, item.ProfileId));
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Exemplo n.º 4
0
 private static void RunDataServiceInThreads(object objitem)
 {
     try
     {
         Domain.Myfashion.Domain.SocialProfile item = (Domain.Myfashion.Domain.SocialProfile)objitem;
         clsSocialSiteDataFeedsFactory objclsSocialSiteDataFeedsFactory = new clsSocialSiteDataFeedsFactory(item.ProfileType);
         ISocialSiteData objSocialSiteDataFeeds = objclsSocialSiteDataFeedsFactory.CreateSocialSiteDataFeedsInstance();
         if (objSocialSiteDataFeeds != null)
         {
            
             Console.WriteLine(objSocialSiteDataFeeds.GetData((object)item.UserId, item.ProfileId));
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }