예제 #1
0
        public UserService(IBrandviserData brandviserData, IDateTimeProvider dateTimeProvider)
        {
            Guard.WhenArgument(brandviserData, nameof(IBrandviserData)).IsNull().Throw();
            Guard.WhenArgument(dateTimeProvider, nameof(IDateTimeProvider)).IsNull().Throw();

            this.brandviserData   = brandviserData;
            this.dateTimeProvider = dateTimeProvider;
        }
예제 #2
0
        public DomainService(IBrandviserData brandviserData, IDomainFactory domainFactory,
                             IDateTimeProvider dateTimeProvider, IWhois whois, ITxtRecordsChecker txtRecordsChecker)
        {
            Guard.WhenArgument(brandviserData, nameof(IBrandviserData)).IsNull().Throw();
            Guard.WhenArgument(domainFactory, nameof(IDomainFactory)).IsNull().Throw();
            Guard.WhenArgument(dateTimeProvider, nameof(IDateTimeProvider)).IsNull().Throw();
            Guard.WhenArgument(whois, nameof(IWhois)).IsNull().Throw();
            Guard.WhenArgument(txtRecordsChecker, nameof(ITxtRecordsChecker)).IsNull().Throw();


            this.domainFactory     = domainFactory;
            this.brandviserData    = brandviserData;
            this.dateTimeProvider  = dateTimeProvider;
            this.whois             = whois;
            this.txtRecordsChecker = txtRecordsChecker;
        }