Esempio n. 1
0
        public static void Start()
        {
            _founderAgent = new FounderAgent();
            _founderAgent.Compose(catalogs);
            ApplicationStartContext AppContext = new ApplicationStartContext();

            foreach (Lazy <IContractFounder, IContractMetadata> lazyFounder in _founderAgent.ContractFounders)
            {
                try
                {
                    lazyFounder.Value.PluginContract(MEFPool);
                }
                catch
                {
                }
                try
                {
                    lazyFounder.Value.PluginManyContract(MEFManyPool);
                }
                catch
                {
                }
            }
            foreach (Lazy <IApplicationStart, IContractMetadata> lazyStarter in _founderAgent._appStarts.OrderBy(m => m.Value.ContractVersion))
            {
                try
                {
                    lazyStarter.Value.PreStart(AppContext);
                }
                catch
                {
                }
            }
            foreach (Lazy <IApplicationStart, IContractMetadata> lazyStarter in _founderAgent._appStarts.OrderBy(m => m.Value.ContractVersion))
            {
                try
                {
                    lazyStarter.Value.Start(AppContext);
                }
                catch
                {
                }
            }
        }
Esempio n. 2
0
 public int Save(FounderDto founder, IEnumerable <FounderRoleDto> roles)
 {
     using (var agent = new FounderAgent())
         return(agent.Save(founder, roles));
 }
Esempio n. 3
0
 public IEnumerable <FounderWithQuoteCountDto> GetWithQuoteCountById(int id)
 {
     using (var agent = new FounderAgent())
         return(agent.GetWithQuoteCountById(id));
 }
Esempio n. 4
0
 public IEnumerable <FounderWithQuoteCountDto> GetWithQuoteCountByName(string searchText)
 {
     using (var agent = new FounderAgent())
         return(agent.GetWithQuoteCountByName(searchText, searchText));
 }
Esempio n. 5
0
 public IEnumerable <FounderWithQuoteCountDto> GetAllWithQuoteCount()
 {
     using (var agent = new FounderAgent())
         return(agent.GetWithQuoteCountByName("", ""));
 }
Esempio n. 6
0
 public IEnumerable <FounderDto> GetAll()
 {
     using (var agent = new FounderAgent())
         return(agent.GetAll());
 }
Esempio n. 7
0
 public FounderDto GetById(int id)
 {
     using (var agent = new FounderAgent())
         return(agent.GetById(id));
 }
Esempio n. 8
0
 public IEnumerable <FounderWithQuoteCountDto> GetWithQuoteCountByName(string firstName, string lastName)
 {
     using (var agent = new FounderAgent())
         return(agent.GetWithQuoteCountByName(firstName, lastName));
 }
Esempio n. 9
0
        public PartialViewResult Listing(string id)
        {
            List <FounderWithQuoteCountDto> model = new FounderAgent().GetWithQuoteCountByName(id, null).ToList();

            return(PartialView(model));
        }