예제 #1
0
 public AgencyController(IMasterData <Models.Request.Agency, int> iMasterData, ILogger iLogger, IConnection <Core.Model.Agency.Agency> iAgency,
                         IConfiguration configuration,
                         IConnection <AgencyContacts> iAgencyContacts,
                         IConnection <IncludedCountryRelation> iAgencyIncludedCountry,
                         IConnection <ExcludedCountryRelation> iAgencyExcludedCountry,
                         IConnection <Payment> iAgencyPayment,
                         IConnection <Bank> iAgencyBank,
                         IConnection <AgencySupplierRelation> iAgencySupplierRelation,
                         IConnection <Agents> iAgencySuperUser,
                         IConnection <Branch> iAgencyBranch,
                         IConnection <BranchAgentRelation> iBranchAgentRelation,
                         IAgency agencyRepository)
     : base(iMasterData, iLogger, "AgencyController")
 {
     _iAgency                    = iAgency;
     _configuration              = configuration;
     _iAgencyContact             = iAgencyContacts;
     _iAgencyIncludedCountry     = iAgencyIncludedCountry;
     _iAgencyExcludedCountry     = iAgencyExcludedCountry;
     _iAgencySupplierRelation    = iAgencySupplierRelation;
     _iAgencyBank                = iAgencyBank;
     _iAgencyPayment             = iAgencyPayment;
     _iAgencySuperUser           = iAgencySuperUser;
     _iAgencyBranch              = iAgencyBranch;
     _iAgencyBranchAgentRelation = iBranchAgentRelation;
     _iLogger                    = iLogger;
     _iAgencyRepository          = agencyRepository;
 }
예제 #2
0
 public AgencyRepositoryTest()
 {
     iConfigurationMock         = new Mock <IConfiguration>();
     iAgencyMock                = new Mock <IConnection <Agency> >();
     iAgencyContactsMock        = new Mock <IConnection <AgencyContacts> >();
     iAgencyPaymentMock         = new Mock <IConnection <Payment> >();
     iAgencyBankMock            = new Mock <IConnection <Bank> >();
     iAgencySuppliersMock       = new Mock <IConnection <AgencySupplierRelation> >();
     iAgencyIncludedCountryMock = new Mock <IConnection <IncludedCountryRelation> >();
     iAgencyExcludedCountryMock = new Mock <IConnection <ExcludedCountryRelation> >();
     iAgencyBranchMock          = new Mock <IConnection <Branch> >();
     iAgencyAgentsMock          = new Mock <IConnection <Agents> >();
     iAgencyBranchAgentMock     = new Mock <IConnection <BranchAgentRelation> >();
     iCurrencyMock              = new Mock <IConnection <Currency> >();
     iCountryMock               = new Mock <IConnection <Country> >();
     agencyRepositoryMock       = new AgencyRepository(iAgencyMock.Object,
                                                       iAgencyContactsMock.Object,
                                                       iAgencyIncludedCountryMock.Object,
                                                       iAgencyExcludedCountryMock.Object,
                                                       iAgencyPaymentMock.Object,
                                                       iAgencyBankMock.Object,
                                                       iAgencySuppliersMock.Object,
                                                       iAgencyAgentsMock.Object,
                                                       iAgencyBranchMock.Object,
                                                       iAgencyBranchAgentMock.Object,
                                                       iCurrencyMock.Object,
                                                       iCountryMock.Object
                                                       );
 }
        /// <summary>
        /// The build.
        /// </summary>
        /// <param name="buildFrom">
        /// The build from.
        /// </param>
        /// <returns>
        /// The <see cref="AgencyType"/>.
        /// </returns>
        public AgencyType Build(IAgency buildFrom)
        {
            var builtObj = new AgencyType();
            string str0 = buildFrom.Id;
            if (!string.IsNullOrWhiteSpace(str0))
            {
                builtObj.id = buildFrom.Id;
            }

            if (buildFrom.Uri != null)
            {
                builtObj.uri = buildFrom.Uri;
            }

            IList<ITextTypeWrapper> names = buildFrom.Names;
            if (ObjectUtil.ValidCollection(names))
            {
                builtObj.Name = this.GetTextType(names);
            }

            // FUNC Missing maintenance information
            return builtObj;
        }
예제 #4
0
 public ActorMessageDispatcher(IAgency agency)
 {
     Agency = agency;
     Agent  = Agency.GetAgentFor <TActor>();
 }
예제 #5
0
 public void Init()
 {
     this.agency         = new Agency();
     this.inputGenerator = new InputGenerator();
 }
예제 #6
0
        /// <summary>
        /// Consructor used by TestAgency when creating
        /// an agent.
        /// </summary>
        /// <param name="agentId"></param>
        /// <param name="agency"></param>
		public TestAgent( Guid agentId, IAgency agency )
		{
			this.agency = agency;
			this.agentId = agentId;
		}
예제 #7
0
 /// <summary>
 /// Consructor used by TestAgency when creating
 /// an agent.
 /// </summary>
 /// <param name="agentId"></param>
 /// <param name="agency"></param>
 public TestAgent(Guid agentId, IAgency agency)
 {
     this.agency  = agency;
     this.agentId = agentId;
 }
예제 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AgencyMutableCore"/> class.
 /// </summary>
 /// <param name="objTarget">
 /// The obj target. 
 /// </param>
 public AgencyMutableCore(IAgency objTarget)
     : base(objTarget)
 {
 }
예제 #9
0
 public AgenciesController(IAgency agency, IUser user)
 {
     this._agency = agency;
     this._user   = user;
 }
예제 #10
0
 public SagaMessageDispatcher(IAgency agency, Saga.ISaga <TActor> saga)
 {
     Agency = agency;
     Agent  = Agency.GetAgentFor <TActor>();
     Saga   = saga;
 }
예제 #11
0
 public AgencyController(IAgency agency)
 {
     _agency = agency;
 }