Beispiel #1
0
 public EventPublisher(IDbContextScopeFactory dbContextScopeFactory, IEventRepository eventRepository,
                       IReferenceGenerator generator)
 {
     this.dbContextScopeFactory = dbContextScopeFactory;
     this.eventRepository       = eventRepository;
     this.generator             = generator;
 }
 public CallService(ICallRepository callRepository, IReferenceGenerator referenceGenerator)
 {
     Check.If(callRepository).IsNotNull();
     Check.If(referenceGenerator).IsNotNull();
     _callRepository = callRepository;
     _referenceGenerator = referenceGenerator;
 }
 public CommandService(ICommandRepository commandRepository, IDbContextScopeFactory dbContextScopeFactory,
                       IReferenceGenerator generator)
 {
     this.commandRepository     = commandRepository;
     this.dbContextScopeFactory = dbContextScopeFactory;
     this.generator             = generator;
 }
        public Requirement CreateReference(IReferenceGenerator referenceGenerator)
        {
            Check.If(referenceGenerator).IsNotNull();

            RequirementReference = referenceGenerator.CreateReference(Constants.ReferenceLength);

            return this;
        }
 public void GenerateReference(IReferenceGenerator referenceGenerator)
 {
     Check.If(referenceGenerator).IsNotNull();
     //don't overwrite an existing reference
     if (string.IsNullOrEmpty(PhoneNumberReference))
         // ReSharper disable once PossibleNullReferenceException
         PhoneNumberReference = referenceGenerator.CreateReference(Constants.ReferenceLength);
 }
        public void GenerateReference(IReferenceGenerator referenceGenerator)
        {
            Check.If(referenceGenerator).IsNotNull();

            //don't overwrite an existing reference
            if (string.IsNullOrEmpty(EmailAddressReference))
                EmailAddressReference = referenceGenerator.CreateReference(Constants.ReferenceLength);
        }
        public SmsService(ISmsRepository smsRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(smsRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _smsRepository = smsRepository;
            _referenceGenerator = referenceGenerator;
        }
        public PhoneNumberService(IPhoneNumberRepository phoneNumberRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(phoneNumberRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _phoneNumberRepository = phoneNumberRepository;
            _referenceGenerator = referenceGenerator;
        }
        public ContactDetailService(IContactDetailRepository contactDetailRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(contactDetailRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _contactDetailRepository = contactDetailRepository;
            _referenceGenerator = referenceGenerator;
        }
        public EmailService(IEmailRepository emailRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(emailRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _emailRepository = emailRepository;
            _referenceGenerator = referenceGenerator;
        }
        public UploadService(IUploadRepository uploadRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(uploadRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _uploadRepository = uploadRepository;
            _referenceGenerator = referenceGenerator;
        }
Beispiel #12
0
        public NoteService(INoteRepository noteRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(noteRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _noteRepository = noteRepository;
            _referenceGenerator = referenceGenerator;
        }
        public PriceRangeService(IPriceRangeRepository priceRangeRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(priceRangeRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _priceRangeRepository = priceRangeRepository;
            _referenceGenerator = referenceGenerator;
        }
        public PropertyDetailService(IPropertyDetailRepository propertyDetailRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(propertyDetailRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _propertyDetailRepository = propertyDetailRepository;
            _referenceGenerator = referenceGenerator;
        }
        public CertificateService(ICertificateRepository certificateRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(certificateRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _certificateRepository = certificateRepository;
            _referenceGenerator = referenceGenerator;
        }
        public TelephoneNumberService(ITelephoneNumberRepository telephoneNumberRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(telephoneNumberRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _telephoneNumberRepository = telephoneNumberRepository;
            _referenceGenerator = referenceGenerator;
        }
        public AmenityService(IAmenityRepository amenityRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(amenityRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _amenityRepository = amenityRepository;
            _referenceGenerator = referenceGenerator;
        }
        public TelephoneNumber CreateReference(IReferenceGenerator referenceGenerator)
        {
            Check.If(referenceGenerator).IsNotNull();

            TelephoneNumberReference = referenceGenerator.CreateReference(Constants.ReferenceLength);

            return this;
        }
        public AddressService(IAddressRepository addressRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(addressRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _addressRepository = addressRepository;
            _referenceGenerator = referenceGenerator;
        }
Beispiel #20
0
        public EventService(IEventRepository eventRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(eventRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _eventRepository = eventRepository;
            _referenceGenerator = referenceGenerator;
        }
        public VideoService(IVideoRepository videoRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(videoRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _videoRepository = videoRepository;
            _referenceGenerator = referenceGenerator;
        }
Beispiel #22
0
        public Email CreateReference(IReferenceGenerator referenceGenerator)
        {
            Check.If(referenceGenerator).IsNotNull();

            EmailReference = referenceGenerator.CreateReference(Constants.ReferenceLength);

            return this;
        }
        public AttachmentService(IAttachmentRepository attachmentRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(attachmentRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _attachmentRepository = attachmentRepository;
            _referenceGenerator = referenceGenerator;
        }
        public PropertyCheckService(IPropertyCheckRepository checkRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(checkRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _checkRepository = checkRepository;
            _referenceGenerator = referenceGenerator;
        }
        public AppointmentService(IAppointmentRepository appointmentRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(appointmentRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _appointmentRepository = appointmentRepository;
            _referenceGenerator = referenceGenerator;
        }
        public FeatureService(IFeatureRepository featureRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(featureRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _featureRepository = featureRepository;
            _referenceGenerator = referenceGenerator;
        }
        public TemplateService(ITemplateRepository templateRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(templateRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _templateRepository = templateRepository;
            _referenceGenerator = referenceGenerator;
        }
        public CheckResult CreateReference(IReferenceGenerator referenceGenerator)
        {
            Check.If(referenceGenerator).IsNotNull();

            CheckResultReference = referenceGenerator.CreateReference(Constants.ReferenceLength);

            return this;
        }
        public PostcodeDistrictService(IPostcodeDistrictRepository postcodeDistrictRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(postcodeDistrictRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _postcodeDistrictRepository = postcodeDistrictRepository;
            _referenceGenerator = referenceGenerator;
        }
 public PlayerService(IOptions <AppSettings> appSettings, IDbContextScopeFactory dbContextScopeFactory,
                      IReferenceGenerator generator, IMapper mapper, IPlayerRepository playerRepository)
 {
     this.appSettings           = appSettings.Value;
     this.dbContextScopeFactory = dbContextScopeFactory;
     this.generator             = generator;
     this.mapper           = mapper;
     this.playerRepository = playerRepository;
 }
Beispiel #31
0
        public void SetUp()
        {
            _fileSystemMock      = MockRepository.GenerateStrictMock <IFileSystem> ();
            _assemblyDefinition1 = AssemblyDefinitionObjectMother.CreateMultiModuleAssemblyWithCtorsAndMethodBody();
            _tracker             = MockRepository.GenerateStrictMock <IAssemblyTracker> ();

            _checker            = MockRepository.GenerateStrictMock <IMixinChecker>();
            _referenceGenerator = MockRepository.GenerateStrictMock <IReferenceGenerator>();
            _codeGenerator      = new ILCodeGenerator(_referenceGenerator, _checker);
        }
        /// <summary>
        /// Adds a given reference generator to the list of sensors held by the input manager.
        /// </summary>
        /// <param name="referenceGenerator">The reference generator to be attached to the input manager.</param>
        protected void AddReferenceGenerator(IReferenceGenerator referenceGenerator)
        {
            if (referenceGenerator == null)
            {
                throw new System.ArgumentNullException("The provided reference generator object is empty.");
            }

            referenceGenerators.Add(referenceGenerator);
            refGenNum++;
        }
        public ExternalSmsService(ISmsRepository smsRepository, IErrorEngine errorEngine, IReferenceGenerator referenceGenerator)
        {
            Check.If(smsRepository).IsNotNull();
            Check.If(errorEngine).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _smsRepository = smsRepository;
            _errorEngine = errorEngine;
            _referenceGenerator = referenceGenerator;
        }
        /// <summary>
        /// Removes a given reference generator from the list of reference generators held by the input manager.
        /// </summary>
        /// <param name="sensor">The reference generator to be removed from the input manager.</param>
        /// <returns>True if the reference generator was removed successfully.</returns>
        protected bool RemoveReferenceGenerator(IReferenceGenerator referenceGenerator)
        {
            if (referenceGenerator == null)
            {
                throw new System.ArgumentNullException("The provided reference generator object is empty.");
            }

            refGenNum--;
            return(referenceGenerators.Remove(referenceGenerator));
        }
Beispiel #35
0
 public MessageForwarder(ICommandRepository commandRepository, IDbContextScopeFactory dbContextScopeFactory,
                         IEventRepository eventRepository, IJobRepository jobRepository, IJobScheduler jobScheduler,
                         IReferenceGenerator generator, IWorkerRegistry workerRegistry)
 {
     this.commandRepository     = commandRepository;
     this.dbContextScopeFactory = dbContextScopeFactory;
     this.eventRepository       = eventRepository;
     this.generator             = generator;
     this.jobRepository         = jobRepository;
     this.jobScheduler          = jobScheduler;
     this.workerRegistry        = workerRegistry;
 }
        public AdvertiseService(IFactory<IAdvertiseProvider> autoAdvertiseProviderFactory,
            IAdvertiseResultRepository autoAdvertiseResultRepository, IPropertyServiceFacade propertyService,
            IReferenceGenerator referenceGenerator)
        {
            Check.If(autoAdvertiseProviderFactory).IsNotNull();
            Check.If(autoAdvertiseResultRepository).IsNotNull();
            Check.If(propertyService).IsNotNull();

            _autoAdvertiseProviderFactory = autoAdvertiseProviderFactory;
            _autoAdvertiseResultRepository = autoAdvertiseResultRepository;
            _propertyService = propertyService;
            _referenceGenerator = referenceGenerator;
        }
        public PropertyService(IPropertyRepository propertyService, ILandlordRepository landlordRepository,
            IPropertySubmissionRepository propertySubmissionRepository, IReferenceGenerator referenceGenerator)
        {
            Check.If(propertyService).IsNotNull();
            Check.If(landlordRepository).IsNotNull();
            Check.If(propertySubmissionRepository).IsNotNull();
            Check.If(referenceGenerator).IsNotNull();

            _propertyRepository = propertyService;
            _landlordRepository = landlordRepository;
            _propertySubmissionRepository = propertySubmissionRepository;
            _referenceGenerator = referenceGenerator;
        }
Beispiel #38
0
        /// <summary>
        /// Sets the active reference generator from the list of available reference generators
        /// </summary>
        /// <param name="refGenType">The reference generator type to set as active.</param>
        private void SetActiveReferenceGenerator(ReferenceGeneratorType refGenType)
        {
            IReferenceGenerator refGen;

            if (GetReferenceGenerator(refGenType, out refGen))
            {
                activeGenerator = refGen;
            }
            else
            {
                throw new System.ArgumentException("Reference generator " + refGenType.ToString() + " unavailable.");
            }
        }
 /// <summary>
 /// Looks for a reference generator of the given type within the list of reference generators in the input manager and is returned if found.
 /// </summary>
 /// <param name="refGenType">The type of reference generator to look for.</param>
 /// <param name="outRefGen">The reference generator object to put the found reference generator in.</param>
 /// <returns>True if a reference generator was found.</returns>
 protected bool GetReferenceGenerator(ReferenceGeneratorType refGenType, out IReferenceGenerator outRefGen)
 {
     // Look for a reference generator with the given type.
     foreach (IReferenceGenerator refGen in referenceGenerators)
     {
         // If found set it to the referenced reference generator and return true.
         if (refGen.GeneratorType().Equals(refGenType))
         {
             outRefGen = refGen;
             return(true);
         }
     }
     // Failed to find a reference generator with the provided type.
     outRefGen = null;
     return(false);
 }
Beispiel #40
0
        /// <summary>
        /// Input manager that allows for dynamic customization of sensors and reference generators.
        /// </summary>
        /// <param name="sensor">A sensor to initialize the manager with.</param>
        /// <param name="referenceGenerator">A reference generator to initialize the manager with.</param>
        public ConfigurableInputManager(ISensor sensor, IReferenceGenerator referenceGenerator)
        {
            if (sensor == null)
            {
                throw new System.ArgumentNullException("The provided sensor object is empty.");
            }
            if (referenceGenerator == null)
            {
                throw new System.ArgumentNullException("The provided reference generator object is empty.");
            }

            AddSensor(sensor);
            activeSensor = sensor;
            AddReferenceGenerator(referenceGenerator);
            activeGenerator = referenceGenerator;
        }
Beispiel #41
0
        /// <summary>
        /// Input manager that allows for dynamic customization of sensors and reference generators.
        /// </summary>
        /// <param name="sensor">A sensor to initialize the manager with.</param>
        /// <param name="referenceGenerator">A reference generator to initialize the manager with.</param>
        public ConfigurableInputManager(List <ISensor> sensorList, List <IReferenceGenerator> referenceGeneratorList)
        {
            if (sensorList == null)
            {
                throw new System.ArgumentNullException("The provided sensor object is empty.");
            }
            if (referenceGeneratorList == null)
            {
                throw new System.ArgumentNullException("The provided reference generator object is empty.");
            }

            // Add all sensors in list.
            foreach (ISensor sensor in sensorList)
            {
                if (sensor == null)
                {
                    throw new System.ArgumentNullException("The provided sensor object is empty.");
                }

                AddSensor(sensor);
            }
            // Set the first sensor as active
            activeSensor = sensorList[0];

            // Add all ref gens in list.
            foreach (IReferenceGenerator refGen in referenceGeneratorList)
            {
                if (refGen == null)
                {
                    throw new System.ArgumentNullException("The provided reference generator object is empty.");
                }

                AddReferenceGenerator(refGen);
            }
            // Set the first ref gen as active
            activeGenerator = referenceGeneratorList[0];
        }
Beispiel #42
0
 public ProductConfiguration CreateReference(IReferenceGenerator referenceGenerator)
 {
     ProductConfigurationReference = referenceGenerator.CreateReference(Constants.Constants.ReferenceLength);
     return(this);
 }
Beispiel #43
0
 public Handler(ShopContext db, IReferenceGenerator referenceGenerator)
 {
     _db = db;
     _referenceGenerator = referenceGenerator;
 }
 public ILCodeGenerator(IReferenceGenerator referenceGenerator, IMixinChecker checker)
 {
     _referenceGenerator = referenceGenerator;
     _checker            = checker;
 }
 public Handler(ShopContext db, IReferenceGenerator referenceGenerator, IPasswordHasher passwordHasher)
 {
     _db = db;
     _referenceGenerator = referenceGenerator;
     _passwordHasher     = passwordHasher;
 }
 public ReferenceService(IReferenceGenerator referenceGenerator, IUserRepository userRepository)
 {
     _referenceGenerator = referenceGenerator;
     _userRepository     = userRepository;
 }
 public Basket CreateReference(IReferenceGenerator referenceGenerator)
 {
     BasketReference = referenceGenerator.CreateReference("B-", Constants.Constants.ReferenceLength);
     return(this);
 }
 public Order CreateReference(IReferenceGenerator referenceGenerator)
 {
     OrderReference = referenceGenerator.CreateReference("B-", Constants.Constants.ReferenceLength);
     return(this);
 }
Beispiel #49
0
 public CanvasNormalize(IReferenceGenerator referenceGenerator, IRatioCalculator ratioCalculator)
 {
     _referenceGenerator = referenceGenerator;
     _ratioCalculator    = ratioCalculator;
 }
 public LaunchShip(ICommandService commandService, IReferenceGenerator generator)
 {
     this.commandService = commandService;
     this.generator      = generator;
 }
 /// <summary>
 /// Creates the manager for BONI, a bone conduction feedback system.
 /// </summary>
 /// <param name="bcController">The boni controller.</param>
 /// <param name="bcRefGen">The boni reference generator.</param>
 public BoniManager(IController bcController, IReferenceGenerator bcRefGen)
 {
     this.controller         = bcController;
     this.referenceGenerator = bcRefGen;
 }
 public ProductComponentCompatibility CreateReference(IReferenceGenerator referenceGenerator)
 {
     ProductComponentCompatibilityReference = referenceGenerator.CreateReference("PCC-", Constants.Constants.ReferenceLength);
     return(this);
 }
Beispiel #53
0
        public User CreateReference(IReferenceGenerator referenceGenerator)
        {
            UserReference = referenceGenerator.CreateReference(Constants.Settings.ReferenceLength);

            return(this);
        }
 /// <summary>
 /// Creates an input manager with the given sensor and reference generator.
 /// </summary>
 /// <param name="sensor"></param>
 /// <param name="refGen"></param>
 public SingleInputManager(ISensor sensor, IReferenceGenerator refGen)
 {
     this.sensorManager      = sensor;
     this.referenceGenerator = refGen;
     enableControllerManager = new VIVEControllerManager();
 }