示例#1
0
 public ChefController(
     IChefService chefService,
     IMapper mapper,
     IImgurService imgurService)
 {
     this._chefService  = chefService;
     this._mapper       = mapper;
     this._imgurService = imgurService;
 }
示例#2
0
 public AccountController(ApplicationUserManager userManager,
                          ApplicationSignInManager signInManager,
                          IAuthenticationManager authenticationManager,
                          IChefService chefService)
 {
     _userManager           = userManager;
     _signInManager         = signInManager;
     _authenticationManager = authenticationManager;
     _chefService           = chefService;
 }
示例#3
0
 public AccountController(ApplicationUserManager userManager, 
     ApplicationSignInManager signInManager, 
     IAuthenticationManager authenticationManager,
     IChefService chefService)
 {
     _userManager = userManager;
     _signInManager = signInManager;
     _authenticationManager = authenticationManager;
     _chefService = chefService;
 }
示例#4
0
 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;
 }
示例#6
0
 public ChefsController(IChefService chefService)
 {
     _chefService = chefService;
 }
示例#7
0
 public TestController(IChefService chefService, IDishService dishService)
 {
     this.chefService = chefService;
     this.dishService = dishService;
 }
示例#8
0
 public ChefsController(IChefService chefService)
 {
     _chefService = chefService;
 }
 public ChefController(IChefService Service)
 {
     _service = Service;
 }
示例#10
0
 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();
                }
            }
        }
示例#13
0
 public FormChefs(IChefService service)
 {
     InitializeComponent();
     this.service = service;
 }
 public FormTakeChoiceInWork(IChefService serviceI, IMainService serviceM)
 {
     InitializeComponent();
     this.serviceI = serviceI;
     this.serviceM = serviceM;
 }