Ejemplo n.º 1
0
 public CloneVacancyOrchestrator(IRecruitVacancyClient vacancyClient,
                                 ITimeProvider timeProvider, ILogger <CloneVacancyOrchestrator> logger, IUtility utility) : base(logger)
 {
     _vacancyClient = vacancyClient;
     _timeProvider  = timeProvider;
     _utility       = utility;
 }
Ejemplo n.º 2
0
 public NumberOfPositionsOrchestrator(IRecruitVacancyClient vacancyClient, ILogger <NumberOfPositionsOrchestrator> logger, IReviewSummaryService reviewSummaryService, IUtility utility)
     : base(logger)
 {
     _vacancyClient        = vacancyClient;
     _reviewSummaryService = reviewSummaryService;
     _utility = utility;
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="utility">The utility</param>
 public UtilityViewModel(IUtility utility)
 {
     Utility       = utility;
     DisplayHeader = new LocalizedString(() => Utility.DisplayHeader);
     InfoText      = new LocalizedString(() => Utility.InfoText);
     WarningText   = new LocalizedString(() => Utility.WarningText);
 }
Ejemplo n.º 4
0
        public void Setup()
        {
            _utility = Substitute.For <IUtility>();
            _decoder = Substitute.For <IDecoder>();
            _uut     = new Analyser(_utility, _decoder);

            _uut.SeparationEvent += (o, args) =>
            {
                ++_nSeparationEventsRaised;
            };

            _uut.AnalysedDataReadyEvent += (o, args) =>
            {
                ++_nAnalysedDataReadyEventsRaised;
            };

            _uut.TrackEnteredAirSpaceEvent += (o, args) =>
            {
                ++_nTrackEnteredAirspaceEventsRaised;
            };

            _uut.TrackLeftAirSpaceEvent += (o, args) =>
            {
                ++_nTrackLeftAirspaceEventsRaised;
            };
        }
Ejemplo n.º 5
0
 public Dock(long id, string name, ILocation location, IUtility utility)
 {
     _id       = id;
     _name     = name;
     _location = location;
     _utility  = utility;
 }
Ejemplo n.º 6
0
 public VacancyManageOrchestrator(ILogger <VacancyManageOrchestrator> logger, DisplayVacancyViewModelMapper vacancyDisplayMapper, IRecruitVacancyClient vacancyClient, EmployerRecruitSystemConfiguration systemConfig, IUtility utility) : base(logger)
 {
     _vacancyDisplayMapper = vacancyDisplayMapper;
     _client       = vacancyClient;
     _systemConfig = systemConfig;
     _utility      = utility;
 }
 public WageOrchestrator(IRecruitVacancyClient vacancyClient, ILogger <WageOrchestrator> logger, IReviewSummaryService reviewSummaryService, IMinimumWageProvider minimumWageProvider, IUtility utility) : base(logger)
 {
     _vacancyClient        = vacancyClient;
     _reviewSummaryService = reviewSummaryService;
     _minimumWageProvider  = minimumWageProvider;
     _utility = utility;
 }
Ejemplo n.º 8
0
 public UtilityInstancesAddedEventArgs(IUtility[] utilities)
 {
     if (utilities == null)
         _Utilities = new IUtility[0];
     else
         _Utilities = utilities;
 }
Ejemplo n.º 9
0
        public void Should_be_equal_to_two_utilities()
        {
            IUtility utility = Utilities.For(Utilities.Electrical, Utilities.Water);

            Assert.IsTrue(utility.IsEnabled(Utilities.Electrical));
            Assert.IsTrue(utility.IsEnabled(Utilities.Water));
        }
Ejemplo n.º 10
0
        void UtilitysComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox comboBox = (ComboBox)sender;

            if (comboBox != null)
            {
                ComboBoxItem selected = (ComboBoxItem)comboBox.SelectedItem;
                if (selected != null)
                {
                    Utility = Utilitys.Find(d => d.Name == (string)selected.Content);

                    InitializeButton();

                    if (Utility.HasOtherInputs)
                    {
                        OthersBoxLabel.Visibility = Visibility.Visible;
                        OthersBox.Visibility      = Visibility.Visible;
                        OthersBoxLabel.Content    = Utility.OtherInputsText;
                    }
                    else
                    {
                        OthersBoxLabel.Visibility = Visibility.Collapsed;
                        OthersBox.Visibility      = Visibility.Collapsed;
                        OthersBoxLabel.Content    = string.Empty;
                    }
                }
            }
        }
Ejemplo n.º 11
0
 public CommonController(ICrud crud, Context _db, IUtility utility, IWebHostEnvironment webHostEnvironment)
 {
     _crud               = crud;
     _utility            = utility;
     this._db            = _db;
     _webHostEnvironment = webHostEnvironment;
 }
 public SkillsOrchestrator(IRecruitVacancyClient vacancyClient, ILogger <SkillsOrchestrator> logger, IReviewSummaryService reviewSummaryService, IUtility utility) : base(logger)
 {
     _vacancyClient        = vacancyClient;
     _reviewSummaryService = reviewSummaryService;
     _utility      = utility;
     _skillsHelper = new SkillsOrchestratorHelper(() => vacancyClient.GetCandidateSkillsAsync().Result);
 }
Ejemplo n.º 13
0
        public void SetUp()
        {
            //fakes init
            _fakeReceiver = Substitute.For <ITransponderReceiver>();

            //Real init
            _realUtility  = new Utility();
            _realDecoder  = new Decoder(_fakeReceiver, _realUtility);
            _realAnalyser = new Analyser(_realUtility, _realDecoder);


            _realAnalyser.SeparationEvent += (o, args) =>
            {
                ++_nSeparationEventsRaised;
            };

            _realAnalyser.AnalysedDataReadyEvent += (o, args) =>
            {
                ++_nAnalysedDataReadyEventsRaised;
            };

            _realAnalyser.TrackEnteredAirSpaceEvent += (o, args) =>
            {
                ++_nTrackEnteredAirspaceEventsRaised;
            };

            _realAnalyser.TrackLeftAirSpaceEvent += (o, args) =>
            {
                ++_nTrackLeftAirspaceEventsRaised;
            };
        }
Ejemplo n.º 14
0
        static void CalculateFromFile(ICalculator calc, IUtility utility)
        {
            var read = File.OpenText(@"c:\Calculate_Log.txt");

            string txt;
            var counter = 0;

            while ((txt = read.ReadLine()) != null)
            {
                if (counter == 0)
                    calc.Process = txt;

                if (counter == 1)
                {
                    if (utility.IsNUmeric(txt))
                        calc.FirstNumber = Convert.ToDouble(txt);
                }
                if (counter == 2)
                {
                    if (utility.IsNUmeric(txt))
                        calc.SecondNumber = Convert.ToDouble(txt);
                }
                counter++;
            }

            read.Close();

            calc.Calculate();
        }
Ejemplo n.º 15
0
        public void Should_not_be_equal_to_either_utilities()
        {
            IUtility utility = Utilities.For(null);

            Assert.IsFalse(utility.IsEnabled(Utilities.Electrical));
            Assert.IsFalse(utility.IsEnabled(Utilities.Water));
        }
Ejemplo n.º 16
0
 /// <summary>
 ///  Constructor to initialize logger, deviceResponse and carouselManager
 /// </summary>
 /// <param name="logger"></param>
 /// <param name="deviceResponse"></param>
 /// <param name="carouselManager"></param>
 /// <param name="utility"></param>
 public CarouselProcess(ILogger <CarouselProcess> logger, IDeviceResponse deviceResponse,
                        ICarouselManager carouselManager, IUtility utility)
 {
     _logger          = logger;
     _deviceResponse  = deviceResponse;
     _carouselManager = carouselManager;
     _utility         = utility;
 }
 public TitleOrchestrator(IEmployerVacancyClient client, IRecruitVacancyClient vacancyClient, ILogger <TitleOrchestrator> logger, IReviewSummaryService reviewSummaryService, ITrainingProviderService trainingProviderService, IUtility utility) : base(logger)
 {
     _client                  = client;
     _vacancyClient           = vacancyClient;
     _reviewSummaryService    = reviewSummaryService;
     _trainingProviderService = trainingProviderService;
     _utility                 = utility;
 }
Ejemplo n.º 18
0
 public DatesOrchestrator(IRecruitVacancyClient vacancyClient, ILogger <DatesOrchestrator> logger, ITimeProvider timeProvider, IReviewSummaryService reviewSummaryService, IApprenticeshipProgrammeProvider apprenticeshipProgrammeProvider, IUtility utility) : base(logger)
 {
     _vacancyClient                   = vacancyClient;
     _timeProvider                    = timeProvider;
     _reviewSummaryService            = reviewSummaryService;
     _apprenticeshipProgrammeProvider = apprenticeshipProgrammeProvider;
     _utility = utility;
 }
 public TrainingOrchestrator(IEmployerVacancyClient client, IRecruitVacancyClient vacancyClient, ILogger <TrainingOrchestrator> logger, IReviewSummaryService reviewSummaryService, IUtility utility, IEmployerVacancyClient employerVacancyClient) : base(logger)
 {
     _client                = client;
     _vacancyClient         = vacancyClient;
     _reviewSummaryService  = reviewSummaryService;
     _utility               = utility;
     _employerVacancyClient = employerVacancyClient;
 }
Ejemplo n.º 20
0
 public VacancyTaskListOrchestrator(ILogger <VacancyTaskListOrchestrator> logger, IRecruitVacancyClient recruitVacancyClient, IUtility utility,
                                    IEmployerVacancyClient employerVacancyClient, DisplayVacancyViewModelMapper displayVacancyViewModelMapper) : base(logger)
 {
     _recruitVacancyClient = recruitVacancyClient;
     _utility = utility;
     _employerVacancyClient         = employerVacancyClient;
     _displayVacancyViewModelMapper = displayVacancyViewModelMapper;
 }
Ejemplo n.º 21
0
        static async Task <int> RunAsync(object opt, Dictionary <Type, Type> dict)
        {
            Type optionType = opt.GetType();
            Type jobType    = dict[optionType];

            using (IUtility utility = (IUtility)Activator.CreateInstance(jobType, opt)) {
                return(await utility.RunAsync());
            }
        }
Ejemplo n.º 22
0
        public Decoder(ITransponderReceiver receiver, IUtility utility)
        {
            _receiver         = receiver;
            _utility          = utility;
            _Aircrafts        = new List <AircraftData>();
            _OldAircraftDatas = new List <AircraftData>();

            receiver.TransponderDataReady += DecoderOnTransponderDataReady;
        }
        public void CopyToArrayCopiesZeroCommentsToArrayIfNoneAreSelected()
        {
            Guid[] ids = InitializeTestEntries(3);

            IUtility[] arr = new IUtility[0];

            _selected.CopyTo(arr, 0);
            Assert.Equal(0, arr.Length);
        }
Ejemplo n.º 24
0
        public void ControlShouldReturnVelocity()
        {
            double supplementaryHeat = 0.0;

            vent = new ForcedVentilation(6.0, 22.0, 1.5, 5.0, 0.8, 0.04, 0.8, 293.0, 2.0, 4.0, 10000.0);
            anim = new DummyAnimal(1, 50, 650.0, 25.0, 0, 40.0);
            util = new Utility();
            Assert.AreEqual(0.0041322314049586778, vent.Control(anim.HeatProduction(), 10.0, 0.0, 600.0, 1.0 * util.GetsaturatedWaterVapourPressure(10.0), ref supplementaryHeat));
        }
 public QualificationsOrchestrator(IEmployerVacancyClient client, IRecruitVacancyClient vacancyClient, ILogger <QualificationsOrchestrator> logger, IReviewSummaryService reviewSummaryService, IUtility utility, IFeature feature)
     : base(logger)
 {
     _client = client;
     _reviewSummaryService = reviewSummaryService;
     _utility       = utility;
     _feature       = feature;
     _vacancyClient = vacancyClient;
 }
Ejemplo n.º 26
0
        private static void OpenConnectionForUtility()
        {
            //Otvaranje kanala ka utility
            ChannelFactory <IUtility> cf1 = new ChannelFactory <IUtility>(new NetTcpBinding(), new EndpointAddress("net.tcp://localhost:10050/IUtility"));

            proxyUtility = cf1.CreateChannel();

            Console.WriteLine("Connected with Utility!");
        }
Ejemplo n.º 27
0
 public IUtilityPresenter Create(IUtility utility, IUtilityView view)
 {
     IUtilityPresenter pres = null;
     if (utility!=null && view!=null)
     {
         pres = new UtilityPresenter(utility, view);
     }
     return pres;
 }
Ejemplo n.º 28
0
 public LostItemClaimController(UserManager <ApplicationUser> userManager,
                                IEmailNotifier emailNotifier, IUtility utility, ILostItemRepository lostItemRepository, ILostItemClaimRepository claimRepository)
 {
     this.userManager        = userManager;
     this.emailNotifier      = emailNotifier;
     this.utility            = utility;
     this.lostItemRepository = lostItemRepository;
     this.claimRepository    = claimRepository;
 }
Ejemplo n.º 29
0
        public Analyser(IUtility utility, IDecoder decoder)
        {
            _FilteredAircrafts = new List <AircraftData>();
            //_OldFilteredAircrafts = new List<AircraftData>();
            _utility = utility;

            /* Here we hook our [Analyser]eventHandler to the AnalyserOfTransponderDataEventArgs method */
            decoder.DecodedDataReadyEvent += AnalyseEventMethod;
        }
 public EmployerNameOrchestrator(IEmployerVacancyClient employerVacancyClient, IRecruitVacancyClient recruitVacancyClient,
                                 ILogger <EmployerNameOrchestrator> logger, IReviewSummaryService reviewSummaryService, IUtility utility)
     : base(logger)
 {
     _employerVacancyClient = employerVacancyClient;
     _recruitVacancyClient  = recruitVacancyClient;
     _reviewSummaryService  = reviewSummaryService;
     _utility = utility;
 }
 public VacancyDescriptionOrchestrator(
     IRecruitVacancyClient vacancyClient,
     ILogger <VacancyDescriptionOrchestrator> logger,
     IReviewSummaryService reviewSummaryService,
     IUtility utility) : base(logger)
 {
     _vacancyClient        = vacancyClient;
     _reviewSummaryService = reviewSummaryService;
     _utility = utility;
 }
Ejemplo n.º 32
0
 public FoundItemClaimController(IFoundItemClaimRepository claimRepository,
                                 IEmailNotifier emailNotifier, IFoundItemRepository foundItemRepository, IUtility utility,
                                 UserManager <ApplicationUser> userManager)
 {
     this.claimRepository     = claimRepository;
     this.emailNotifier       = emailNotifier;
     this.foundItemRepository = foundItemRepository;
     this.utility             = utility;
     this.userManager         = userManager;
 }
Ejemplo n.º 33
0
 public ArtistRepo(
     IArtistData artist,
     IUtility utility,
     IMap map
     )
 {
     _artist  = artist;
     _utility = utility;
     _map     = map;
 }
 public EmployerOrchestrator(
     IEmployerVacancyClient client,
     IRecruitVacancyClient vacancyClient,
     ILogger <EmployerOrchestrator> logger,
     IUtility utility) : base(logger)
 {
     _client        = client;
     _vacancyClient = vacancyClient;
     _logger        = logger;
     _utility       = utility;
 }
        public void CopyToArrayCopiesSelectedCommentsToArray()
        {
            Guid[] ids = InitializeTestEntries(3);
            Guid id2 = ids[2];
            IUtility el2 = _Utilities[id2];

            _Utilities[id2].SetIsSelected(true, SelectionSource.Code, SelectionOrigin.None);

            IUtility[] arr = new IUtility[1];

            _selected.CopyTo(arr, 0);
            Assert.NotNull(arr[0]);
            Assert.Same(el2, arr[0]);
        }
Ejemplo n.º 36
0
        static void CalculateFromConsole(ICalculator calc, IUtility utility)
        {
            var firstNumber = Console.ReadLine();
            if (utility.IsNUmeric(firstNumber))
                calc.FirstNumber = Convert.ToDouble(firstNumber);

            calc.Process = Console.ReadLine();

            var secondNumber = Console.ReadLine();

            if (utility.IsNUmeric(secondNumber))
                calc.SecondNumber = Convert.ToDouble(secondNumber);

            calc.Calculate();
        }
        public void CopyToArrayThrowExceptionWhenMoreCommentsAreSelectedThanTheAvailableLengthOfTheArray()
        {
            Guid[] ids = InitializeTestEntries(3);
            Guid id0 = ids[0];
            Guid id2 = ids[2];
            IUtility el0 = _Utilities[id0];
            IUtility el2 = _Utilities[id2];
            _Utilities[id0].SetIsSelected(true, SelectionSource.Code, SelectionOrigin.None);
            _Utilities[id2].SetIsSelected(true, SelectionSource.Code, SelectionOrigin.None);

            IUtility[] arr = new IUtility[1];

            _selected.CopyTo(arr, 0);
            Assert.NotNull(arr[0]);
            Assert.Same(el0, arr[0]);
        }
Ejemplo n.º 38
0
 internal void utility_SelectionChanged(IUtility sender, SelectionEventArgs ea)
 {
     if (sender != null)
     {
         UtilitiesMgr[sender.Id].SetIsSelected(ea.IsSelected, ea.Source, ea.Origin);
     }
 }
Ejemplo n.º 39
0
 internal void ClearSubscriptions(IUtility ut)
 {
     ut.SelectionChanged -= utility_SelectionChanged;
 }
Ejemplo n.º 40
0
 public UtilityCollectionEventArgs(CollectionAction action, IUtility[] elements)
     : base(action)
 {
     _Utilities = elements;
 }
Ejemplo n.º 41
0
 public UtilityCollectionEventArgs(CollectionAction action, IUtility element)
     : base(action)
 {
     _Utilities = new IUtility[1];
     _Utilities[0] = element;
 }
Ejemplo n.º 42
0
 public UtilityInstancesAddedEventArgs(IUtility utility)
 {
     _Utilities = new IUtility[1];
     _Utilities[0] = utility;
 }
Ejemplo n.º 43
0
 internal void SubscribeToComment(IUtility utility)
 {
     if (utility != null)
     {
     //        utility.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(_Comment_PropertyChanged);
     }
 }
Ejemplo n.º 44
0
 internal void UnsubscribeFromComment(IUtility utility)
 {
     if (utility != null)
     {
        //         utility.PropertyChanged -= _Comment_PropertyChanged;
         utility = null;
     }
 }
Ejemplo n.º 45
0
 internal void _Comment_CommentReset(IUtility sender, ResetEventArgs ea)
 {
     if (sender != null)
     {
         CommentView.Reset();
     }
 }
Ejemplo n.º 46
0
 internal void _Comment_SelectionChanged(IUtility sender, SelectionEventArgs ea)
 {
     // selection change can be initiated from code since the sender is the IElement, ie model
     if (sender != null)
     {
         // the change originated at the model level and has already been applied to the model
         if (_View.IsSelected != ea.IsSelected)
         {
             // propagate the selection change to the View if the Source is a Model source:  Code
             if (ea.Source == SelectionSource.Code)
             {
                 _View.SetIsSelected(ea.IsSelected, ea.Source, ea.Origin);
                 VerifySelectionStates(_View, _Comment);
             }
         }
     }
 }
Ejemplo n.º 47
0
 /// <summary>
 /// Verifies both the <paramref name="view"/> and the <paramref name="model"/> have the
 /// same selected setting.
 /// </summary>
 /// <param name="view"></param>
 /// <param name="model"></param>
 private void VerifySelectionStates(IUtilityView view, IUtility model)
 {
     if (view.IsSelected != model.IsSelected)
     {
         throw new InvalidOperationException("Both the view and model must have the same selected value!");
     }
 }
Ejemplo n.º 48
0
 public UtilityPresenter(IUtility utility, IUtilityView view)
 {
     CommentModel = utility;
     CommentView = view;
 }