public ChefController( IChefService chefService, IMapper mapper, IImgurService imgurService) { this._chefService = chefService; this._mapper = mapper; this._imgurService = imgurService; }
public AccountController(ApplicationUserManager userManager, ApplicationSignInManager signInManager, IAuthenticationManager authenticationManager, IChefService chefService) { _userManager = userManager; _signInManager = signInManager; _authenticationManager = authenticationManager; _chefService = chefService; }
public AppHub( IUserService userService, ICategoryService categoryService, IDishService dishService, IChefService chefService) { this.userService = userService; this.categoryService = categoryService; this.dishService = dishService; this.chefService = chefService; }
public HomeController( IRecipeService recipeService, IChefService chefService, IMapper mapper, UserManager <ApplicationUser> userManager) { this._recipeService = recipeService; this._chefService = chefService; this._mapper = mapper; this._userManager = userManager; }
public ChefsController(IChefService chefService) { _chefService = chefService; }
public TestController(IChefService chefService, IDishService dishService) { this.chefService = chefService; this.dishService = dishService; }
public ChefController(IChefService Service) { _service = Service; }
public ChefController(IChefService chefService) { this.chefService = chefService; }
/// <summary> /// Method to channel factory for Chef Service /// </summary> private void InitializeChefChannel() { try { this.chefServiceAddress = new EndpointAddress(new Uri("net.tcp://localhost:4501/ChefService")); this.chefServiceFactory = new ChannelFactory<IChefService>( new NetTcpBinding(), this.chefServiceAddress); this.chefClient = this.chefServiceFactory.CreateChannel(); this.timer = new System.Windows.Forms.Timer(); this.timer.Interval = 15000; this.timer.Tick += new EventHandler(this.OrderStatus_TimerElapsed); this.timer.Start(); } catch (FaultException<RestaurantService.Contracts.ServiceFaultDetails> ex) { MessageBox.Show(ex.Message, "FaultException", MessageBoxButtons.OK, MessageBoxIcon.Warning); } catch (CommunicationException ex) { ((IClientChannel)chefClient).Abort(); this.chefClient = null; MessageBox.Show(ex.Message, "Communication Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.chefServiceFactory.Abort(); System.Environment.Exit(1); } }
/// <summary> /// Method to Clean up. /// </summary> private void CleanUp() { try { this.timer.Stop(); ((IClientChannel)chefClient).Close(); chefClient = null; chefServiceFactory.Close(); chefServiceFactory = null; } catch (CommunicationException commProblem) { Console.WriteLine(commProblem.Message); if (chefServiceFactory != null) { chefServiceFactory.Abort(); } Console.ReadLine(); } catch (Exception ex) { Console.WriteLine(ex.Message); if (chefServiceFactory != null) { chefServiceFactory.Abort(); } Console.ReadLine(); } finally { if (chefClient != null) { ((IClientChannel)chefClient).Close(); } if (chefServiceFactory != null) { chefServiceFactory.Abort(); } } }
public FormChefs(IChefService service) { InitializeComponent(); this.service = service; }
public FormTakeChoiceInWork(IChefService serviceI, IMainService serviceM) { InitializeComponent(); this.serviceI = serviceI; this.serviceM = serviceM; }