Beispiel #1
0
 public CreatePieceCommand(
     IPieceRepositoryFacade repository,
     IDateService dateService,
     IPieceFactory pieceFactory,
     IArtistFactory artistFactory,
     IMediumFactory mediumFactory,
     IGenreFactory genreFactory,
     ISubgenreFactory subgenreFactory,
     ISubjectMatterFactory subjectMatterFactory,
     IAcquisitionFactory acquisitionFactory,
     IFundingSourceFactory fundingSourceFactory,
     IPieceSourceFactory pieceSourceFactory,
     ILocationFactory locationFactory,
     ICollectionFactory collectionFactory,
     IUnitOfWork unitOfWork)
 {
     this.repository           = repository;
     this.dateService          = dateService;
     this.pieceFactory         = pieceFactory;
     this.artistFactory        = artistFactory;
     this.mediumFactory        = mediumFactory;
     this.genreFactory         = genreFactory;
     this.subgenreFactory      = subgenreFactory;
     this.subjectMatterFactory = subjectMatterFactory;
     this.acquisitionFactory   = acquisitionFactory;
     this.fundingSourceFactory = fundingSourceFactory;
     this.pieceSourceFactory   = pieceSourceFactory;
     this.locationFactory      = locationFactory;
     this.collectionFactory    = collectionFactory;
     this.unitOfWork           = unitOfWork;
 }
        protected internal TransactionService(ITransactionDataConnector dataConnector, IAgentFactory agentFactory, ITransactionFeeListFactory transactionFeeListFactory,
                                              ITransactionContextFactory transactionContextFactory, ICustomerFactory customerFactory, ITransactionDeficienciesFactory transactionDeficienciesFactory, IDocumentService documentService,
                                              IEvidenceService evidenceService, ILocationFactory locationFactory, IRequirementEvaluator requirementEvaluator, ITransactionHistoryFactory transactionHistoryFactory,
                                              IFeeList feeList, IList <ITransactionType> registeredTransactions)
        {
            this.DataConnector                  = dataConnector ?? throw new ArgumentNullException("dataConnector");
            this.AgentFactory                   = agentFactory ?? throw new ArgumentNullException("agentFactory");
            this.TransactionFeeListFactory      = transactionFeeListFactory ?? throw new ArgumentNullException("feeListFactory");
            this.TransactionContextFactory      = transactionContextFactory ?? throw new ArgumentNullException("transactionContextFactory");
            this.CustomerFactory                = customerFactory ?? throw new ArgumentNullException("customerFactory");
            this.TransactionDeficienciesFactory = transactionDeficienciesFactory ?? throw new ArgumentNullException("transactionDeficienciesFactory");
            this.DocumentService                = documentService ?? throw new ArgumentNullException("documentService");
            this.EvidenceService                = evidenceService ?? throw new ArgumentNullException("evidenceService");
            this.LocationFactory                = locationFactory ?? throw new ArgumentNullException("locationFactory");
            this.RequirementEvaluator           = requirementEvaluator ?? throw new ArgumentNullException("requirementEvaluator");
            this.TransactionHistoryFactory      = transactionHistoryFactory ?? throw new ArgumentNullException("transactionHistoryFactory");
            this.FeeList = feeList ?? throw new ArgumentNullException("feeList");

            if (registeredTransactions == null)
            {
                this.RegisteredTransactionTypes = new List <ITransactionType>();
            }
            else
            {
                this.RegisteredTransactionTypes = registeredTransactions.ToList();
            }
        }
Beispiel #3
0
        public Transaction(IProcessExecutionContext executionContext, IAgentFactory agentFactory, ITransactionFeeListFactory transactionFeeListFactory, ITransactionContextFactory transactionContextFactory,
                           ICustomerFactory customerFactory, ITransactionDeficienciesFactory transactionDeficienciesFactory, IDocumentService documentService, IEvidenceService evidenceService,
                           ILocationFactory locationFactory, IRequirementEvaluator requirementEvaluator, ITransactionHistoryFactory transactionHistoryFactory, ITransactionService transactionService,
                           ITransactionType transactionType, ITransactionRecord record)
            : base(record.RecordType, record.Id)
        {
            this.ExecutionContext = executionContext ?? throw new ArgumentNullException("executionContext");

            this.AgentFactory = agentFactory ?? throw new ArgumentNullException("agentFactory");
            this.TransactionFeeListFactory      = transactionFeeListFactory ?? throw new ArgumentNullException("transactionFeeListFactory");
            this.TransactionContextFactory      = transactionContextFactory ?? throw new ArgumentNullException("transactionContextFactory");
            this.CustomerFactory                = customerFactory ?? throw new ArgumentNullException("customerFactory");
            this.TransactionDeficienciesFactory = transactionDeficienciesFactory ?? throw new ArgumentNullException("transactionDeficienciesFactory");
            this.DocumentService                = documentService ?? throw new ArgumentNullException("documentService");
            this.EvidenceService                = evidenceService ?? throw new ArgumentNullException("evidenceService");
            this.LocationFactory                = locationFactory ?? throw new ArgumentNullException("locationFactory");
            this.RequirementEvaluator           = requirementEvaluator ?? throw new ArgumentNullException("requirementEvaluator");
            this.TransactionHistoryFactory      = transactionHistoryFactory ?? throw new ArgumentNullException("transactionHistoryFactory");
            this.TransactionService             = transactionService ?? throw new ArgumentNullException("transactionService");

            this.TransactionType = transactionType ?? throw new ArgumentNullException("transactionType");

            this.Name                 = record.Name;
            this.ReferenceNumber      = record.ReferenceNumber;
            this.PricingDate          = record.PricingDate ?? DateTime.Now.Date;
            this.InitiatingProcessId  = record.InitiatingProcessId ?? throw new ArgumentNullException("InitiatingProcessId");
            this.CurrentProcessId     = record.CurrentProcessId ?? throw new ArgumentNullException("CurrentProcessId");
            this.CurrentStepId        = record.CurrentStepId ?? throw new ArgumentNullException("CurrentStepId");
            this.ContextRecordId      = record.ContextRecordId ?? throw new ArgumentNullException("contextRecordId");
            this.CustomerId           = record.CustomerId ?? throw new ArgumentNullException("customerId");
            this.InitiatingAgentId    = record.InitiatingAgentId ?? throw new ArgumentNullException("initiatingAgentId");
            this.InitiatingLocationId = record.InitiatingLocationId ?? throw new ArgumentNullException("initiatingLocationId");
        }
Beispiel #4
0
        public LocationManager(
            string path,
            FaultManager faultManager)
        {
            this.needsSaving     = false;
            this.locationFactory = new LocationFactory();
            this.Locations       = new List <ILocation>();

            this.locationBasePath = path + Path.DirectorySeparatorChar + "Locations";

            this.Big4Regions =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "Big4.txt");
            this.Counties =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "County.txt");
            this.Lines =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "Line.txt");
            this.Regions =
                this.ReadListFileContents(
                    this.locationBasePath + Path.DirectorySeparatorChar + "Region.txt");

            this.Locations = this.locationFactory.ReadLocations(
                this.locationBasePath + Path.DirectorySeparatorChar + "Location.txt",
                faultManager,
                this.Lines,
                this.Counties,
                this.Regions,
                this.Big4Regions);
        }
 public PlatformService(IPlatformSettingsFactory settingsFactory, IPlatformDataConnector dataConnector, IAgentFactory agentFactory, ILocationFactory locationFactory)
 {
     SettingsFactory = settingsFactory;
     DataConnector   = dataConnector;
     AgentFactory    = agentFactory;
     LocationFactory = locationFactory;
 }
        public LocationController(ILocationFactory locationFactory, ILocationService locationService)
        {
            Validator.ValidateForNull(locationFactory, "locationFactory");
            Validator.ValidateForNull(locationService, "locationService");

            this.locationFactory = locationFactory;
            this.locationService = locationService;
        }
Beispiel #7
0
 public LocController(ISession session, LocationHelper locHelper, ILocationFactory locFactory, OpHelper opHelper, SimpleEventBus eventBus, ILogger logger)
 {
     _session    = session;
     _locHelper  = locHelper;
     _locFactory = locFactory;
     _opHelper   = opHelper;
     _eventBus   = eventBus;
     _logger     = logger;
 }
Beispiel #8
0
 public UserContext(
     ILocationFactory locationFactory,
     IPurchaseFactory purchaseFactory,
     IUserQueryRepository userQueryRepository)
 {
     PurchaseFactory     = purchaseFactory;
     LocationFactory     = locationFactory;
     UserQueryRepository = userQueryRepository;
 }
        public CountryService(ILocationFactory locationFactory, IUsitData usitData)
        {
            if (usitData == null)
            {
                throw new NullReferenceException("UsitData");
            }

            if (locationFactory == null)
            {
                throw new NullReferenceException("LocationFactory");
            }

            this.usitData        = usitData;
            this.locationFactory = locationFactory;
        }
        public EsaFactory(
            IConstructFactory constructFactory,
            ILocationFactory locationFactory)
        {
            if (constructFactory == null)
            {
                throw new ArgumentNullException("constructFactory");
            }
            if (locationFactory == null)
            {
                throw new ArgumentNullException("locationFactory");
            }

            this.constructFactory = constructFactory;
            this.locationFactory  = locationFactory;
        }
        public LiteralExpressionPropertyTypeConvertor(IPropertyDeclarationFactory propertyDeclarationFactory, ILocationFactory locationFactory, IUnderlyingObjectFactory underlyingObjectFactory)
        {
            if (propertyDeclarationFactory == null)
            {
                throw new ArgumentNullException(nameof(propertyDeclarationFactory));
            }
            if (locationFactory == null)
            {
                throw new ArgumentNullException(nameof(locationFactory));
            }
            if (underlyingObjectFactory == null)
            {
                throw new ArgumentNullException(nameof(underlyingObjectFactory));
            }

            this.propertyDeclarationFactory = propertyDeclarationFactory;
            this.locationFactory            = locationFactory;
            this.underlyingObjectFactory    = underlyingObjectFactory;
        }
Beispiel #12
0
        public AstMethodsVisitor(IMethodFactory methodFactory, ILocationFactory locationFactory, IUnderlyingObjectFactory underlyingObjectFactory)
        {
            if (methodFactory == null)
            {
                throw new ArgumentNullException(nameof(methodFactory));
            }
            if (locationFactory == null)
            {
                throw new ArgumentNullException(nameof(locationFactory));
            }
            if (underlyingObjectFactory == null)
            {
                throw new ArgumentNullException(nameof(underlyingObjectFactory));
            }

            this.methodFactory           = methodFactory;
            this.locationFactory         = locationFactory;
            this.underlyingObjectFactory = underlyingObjectFactory;
        }
        public ConstructorExtractor(IConstructorFactory constructorFactory, ILocationFactory locationFactory, IUnderlyingObjectFactory underlyingObjectFactory)
        {
            if (constructorFactory == null)
            {
                throw new ArgumentNullException(nameof(constructorFactory));
            }
            if (locationFactory == null)
            {
                throw new ArgumentNullException(nameof(locationFactory));
            }
            if (underlyingObjectFactory == null)
            {
                throw new ArgumentNullException(nameof(underlyingObjectFactory));
            }

            this.constructorFactory      = constructorFactory;
            this.locationFactory         = locationFactory;
            this.underlyingObjectFactory = underlyingObjectFactory;
        }
        public LakeController(
            ILakeFactory lakeFactory,
            ILocationFactory locationFactory,
            ILakeService lakeService,
            ILocationService locationService,
            IFishService fishService)
        {
            Validator.ValidateForNull(lakeFactory, paramName: "lakeFactory");
            Validator.ValidateForNull(locationFactory, paramName: "locationFactory");
            Validator.ValidateForNull(lakeService, paramName: "lakeService");
            Validator.ValidateForNull(locationService, paramName: "locationService");
            Validator.ValidateForNull(fishService, paramName: "fishService");

            this.lakeFactory     = lakeFactory;
            this.locationFactory = locationFactory;
            this.lakeService     = lakeService;
            this.locationService = locationService;
            this.fishService     = fishService;
        }
Beispiel #15
0
        protected MethodTypeConvertorBase(IMethodFactory methodFactory, ILocationFactory locationFactory, IUnderlyingObjectFactory underlyingObjectFactory)
        {
            if (methodFactory == null)
            {
                throw new ArgumentNullException(nameof(methodFactory));
            }
            if (locationFactory == null)
            {
                throw new ArgumentNullException(nameof(locationFactory));
            }
            if (underlyingObjectFactory == null)
            {
                throw new ArgumentNullException(nameof(underlyingObjectFactory));
            }

            this.methodFactory           = methodFactory;
            this.locationFactory         = locationFactory;
            this.underlyingObjectFactory = underlyingObjectFactory;
        }
Beispiel #16
0
        public PropertyAccessorExtractor(
            IPropertyAccessorFactory propertyAccessorFactory,
            ILocationFactory locationFactory,
            IUnderlyingObjectFactory underlyingObjectFactory)
        {
            if (propertyAccessorFactory == null)
            {
                throw new ArgumentNullException(nameof(propertyAccessorFactory));
            }
            if (locationFactory == null)
            {
                throw new ArgumentNullException(nameof(locationFactory));
            }
            if (underlyingObjectFactory == null)
            {
                throw new ArgumentNullException(nameof(underlyingObjectFactory));
            }

            this.propertyAccessorFactory = propertyAccessorFactory;
            this.locationFactory         = locationFactory;
            this.underlyingObjectFactory = underlyingObjectFactory;
        }
 public LocationService(IAppUnitOfWork uow, ILocationFactory locationFactory)
 {
     _uow             = uow;
     _locationFactory = locationFactory;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateNewLocationRequestHandler"/> class.
 /// </summary>
 /// <param name="agencyRepository">The agency repository.</param>
 /// <param name="locationFactory">The location factory.</param>
 public CreateNewLocationRequestHandler(IAgencyRepository agencyRepository, ILocationFactory locationFactory)
 {
     _agencyRepository = agencyRepository;
     _locationFactory  = locationFactory;
 }
 public ExpressionBodyMethodTypeConvertor(IMethodFactory methodFactory, ILocationFactory locationFactory, IUnderlyingObjectFactory underlyingObjectFactory)
     : base(methodFactory, locationFactory, underlyingObjectFactory)
 {
 }
Beispiel #20
0
 public Realtor(IBanker banker, ILocationFactory locationFactory)
 {
     this.banker = banker;
     ownersBySpaceNumber = new Dictionary<int, IPlayer>();
     propertyList = locationFactory.BuildLocations();
 }
Beispiel #21
0
 public TransactionServiceFactory(IProcessSettingsFactory settingsFactory, ITransactionDataConnector dataConnector, IAgentFactory agentFactory, IAlternateBranchFactory alternateBranchFactory,
                                  ITransactionFeeListFactory transactionFeeListFactory, ITransactionContextFactory transactionContextFactory, ICustomerFactory customerFactory, ITransactionDeficienciesFactory transactionDeficienciesFactory,
                                  IDocumentService documentService, ILogicEvaluatorTypeFactory evaluatorTypeFactory, IEvidenceService evidenceService, ILocationFactory locationFactory,
                                  IParameterSerializer parameterSerializer, IPlatformService platformService, IProcessStepFactory processStepFactory, IProcessStepTypeFactory processStepTypeFactory,
                                  IRequirementEvaluator requirementEvaluator, IRequirementFactory requirementFactory, ITransactionHistoryFactory transactionHistoryFactory,
                                  ITransactionProcessFactory transactionProcessFactory, IFeeList feeList)
 {
     this.SettingsFactory                = settingsFactory ?? throw new ArgumentNullException("settingsFactory");
     this.DataConnector                  = dataConnector ?? throw new ArgumentNullException("dataConnector");
     this.AgentFactory                   = agentFactory ?? throw new ArgumentNullException("agentFactory.");
     this.AlternateBranchFactory         = alternateBranchFactory ?? throw new ArgumentNullException("alternateBrachFactory");
     this.TransactionFeeListFactory      = transactionFeeListFactory ?? throw new ArgumentNullException("transactionFeeListFactory");
     this.TransactionContextFactory      = transactionContextFactory ?? throw new ArgumentNullException("transactionContextFactory");
     this.CustomerFactory                = customerFactory ?? throw new ArgumentNullException("customerFactory.");
     this.TransactionDeficienciesFactory = transactionDeficienciesFactory ?? throw new ArgumentNullException("transactionDeficienciesFactory");
     this.DocumentService                = documentService ?? throw new ArgumentNullException("documentService");
     this.EvaluatorTypeFactory           = evaluatorTypeFactory ?? throw new ArgumentNullException("evaluatorTypeFactory.");
     this.EvidenceService                = evidenceService ?? throw new ArgumentNullException("evidenceService");
     this.LocationFactory                = locationFactory ?? throw new ArgumentNullException("locationFactory.");
     this.PlatformService                = platformService ?? throw new ArgumentNullException("platformService.");
     this.ProcessStepFactory             = processStepFactory ?? throw new ArgumentNullException("processStepFactory.");
     this.ProcessStepTypeFactory         = processStepTypeFactory ?? throw new ArgumentNullException("processStepTypeFactory.");
     this.RequirementEvaluator           = requirementEvaluator ?? throw new ArgumentNullException("requirementEvaluator");
     this.RequirementFactory             = requirementFactory ?? throw new ArgumentNullException("requirementFactory.");
     this.TransactionHistoryFactory      = transactionHistoryFactory ?? throw new ArgumentNullException("transactionHistoryFactory");
     this.TransactionProcessFactory      = transactionProcessFactory ?? throw new ArgumentNullException("transactionProcessFactory.");
     this.ParameterSerializer            = parameterSerializer ?? throw new ArgumentNullException("parameterSerializer");
     this.FeeList = feeList ?? throw new ArgumentNullException("feeList");
 }
Beispiel #22
0
 public Employee(ILocationFactory locationFactory)
 {
     // factory injected to get extensions support
     _locationFactory = locationFactory;
 }
Beispiel #23
0
 public PerformanceFactory(ILocationFactory locationFactory, IEventFactory eventFactory, IPerformerFactory performerFactory)
 {
     _locationFactory  = locationFactory;
     _eventFactory     = eventFactory;
     _performerFactory = performerFactory;
 }
 public WorldController(ILocationFactory locationFactory)
 {
     this.locationFactory = locationFactory;
 }
Beispiel #25
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="id">
        /// The ID of the location.
        /// </param>
        /// <param name="name">
        /// A string representing the name of the dungeon.
        /// </param>
        /// <param name="mapLocations">
        /// A list of map locations.
        /// </param>
        /// <param name="map">
        /// A 32-bit signed integer representing the number of maps in the dungeon.
        /// </param>
        /// <param name="compass">
        /// A 32-bit signed integer representing the number of compasses in the dungeon.
        /// </param>
        /// <param name="smallKeys">
        /// A 32-bit signed integer representing the number of small keys in the dungeon.
        /// </param>
        /// <param name="bigKey">
        /// A 32-bit signed integer representing the number of big keys in the dungeon.
        /// </param>
        /// <param name="mapItem">
        /// The map item.
        /// </param>
        /// <param name="compassItem">
        /// The compass item.
        /// </param>
        /// <param name="smallKeyItem">
        /// The small key item.
        /// </param>
        /// <param name="bigKeyItem">
        /// The big key item.
        /// </param>
        /// <param name="nodes">
        /// A list of dungeon node IDs within the dungeon.
        /// </param>
        /// <param name="items">
        /// A list of dungeon item IDs within the dungeon.
        /// </param>
        /// <param name="bosses">
        /// A list of dungeon item IDs for bosses within the dungeon.
        /// </param>
        /// <param name="smallKeyDoors">
        /// A list of small key door IDs within the dungeon.
        /// </param>
        /// <param name="bigKeyDoors">
        /// A list of big key door IDs within the dungeon.
        /// </param>
        /// <param name="entryNodes">
        /// A list of entry nodes for this dungeon.
        /// </param>
        public Dungeon(
            IItemDictionary items, IMode mode, IMutableDungeon.Factory mutableDungeonFactory,
            ILocationFactory locationFactory, IMapLocationFactory mapLocationFactory,
            ISectionFactory sectionFactory, IMarking.Factory markingFactory,
            ILocationNoteCollection notes, IDungeonFactory dungeonFactory,
            IKeyLayoutFactory keyDoorFactory, IDungeonState.Factory stateFactory, LocationID id)
            : base(locationFactory, mapLocationFactory, sectionFactory, markingFactory, notes, id)
        {
            _items = items;
            _mode  = mode;
            _mutableDungeonFactory = mutableDungeonFactory;
            _stateFactory          = stateFactory;

            Map       = dungeonFactory.GetDungeonMapCount(id);
            Compass   = dungeonFactory.GetDungeonCompassCount(id);
            SmallKeys = dungeonFactory.GetDungeonSmallKeyCount(id);
            BigKey    = dungeonFactory.GetDungeonBigKeyCount(id);

            MapItem      = dungeonFactory.GetDungeonMapItem(id);
            CompassItem  = dungeonFactory.GetDungeonCompassItem(id);
            SmallKeyItem = dungeonFactory.GetDungeonSmallKeyItem(id);
            BigKeyItem   = dungeonFactory.GetDungeonBigKeyItem(id);

            Nodes = dungeonFactory.GetDungeonNodes(id);

            DungeonItems = dungeonFactory.GetDungeonItems(id);
            Bosses       = dungeonFactory.GetDungeonBosses(id);

            SmallKeyDrops = dungeonFactory.GetDungeonSmallKeyDrops(id);
            BigKeyDrops   = dungeonFactory.GetDungeonBigKeyDrops(id);

            SmallKeyDoors = dungeonFactory.GetDungeonSmallKeyDoors(id);
            BigKeyDoors   = dungeonFactory.GetDungeonBigKeyDoors(id);

            KeyLayouts = keyDoorFactory.GetDungeonKeyLayouts(this);
            EntryNodes = dungeonFactory.GetDungeonEntryNodes(id);

            foreach (var section in Sections)
            {
                section.PropertyChanged += OnSectionChanged;
            }

            foreach (var node in EntryNodes)
            {
                node.ChangePropagated += OnNodeChangePropagated;
            }

            if (BigKeyItem != null)
            {
                BigKeyItem.PropertyChanged += OnItemChanged;
            }

            for (int i = 0; i < Environment.ProcessorCount; i++)
            {
                CreateDungeonData();
            }

            _mode.PropertyChanged += OnModeChanged;
            SubscribeToConnectionRequirements();
            UpdateSectionAccessibility();
        }