コード例 #1
0
        public ContactManager(AddressRepository addressRepository,
                              AddressTypeRepository addressTypeRepository,
                              PhoneRepository phoneRepository,
                              PhoneTypeRepository phoneTypeRepository,
                              ProfileAddressRepository profileAddressRepository,
                              ProfilePhoneRepository profilePhoneRepository,
                              ProfileRepository profileRepository)
        {
            if (addressRepository == null)
            {
                throw new ArgumentNullException("addressRepository");
            }

            if (addressTypeRepository == null)
            {
                throw new ArgumentNullException("addressTypeRepository");
            }

            if (phoneRepository == null)
            {
                throw new ArgumentNullException("phoneRepository");
            }

            if (phoneTypeRepository == null)
            {
                throw new ArgumentNullException("phoneTypeRepository");
            }

            if (profileAddressRepository == null)
            {
                throw new ArgumentNullException("profileAddressRepository");
            }

            if (profilePhoneRepository == null)
            {
                throw new ArgumentNullException("profilePhoneRepository");
            }

            if (profileRepository == null)
            {
                throw new ArgumentNullException("profileRepository");
            }

            _addressRepository        = addressRepository;
            _addressTypeRepository    = addressTypeRepository;
            _phoneRepository          = phoneRepository;
            _phoneTypeRepository      = phoneTypeRepository;
            _profileAddressRepository = profileAddressRepository;
            _profilePhoneRepository   = profilePhoneRepository;
            _profileRepository        = profileRepository;
        }
コード例 #2
0
        public ContactManager(AddressRepository addressRepository,
                              AddressTypeRepository addressTypeRepository,
                              PhoneRepository phoneRepository,
                              PhoneTypeRepository phoneTypeRepository,
                              ProfileAddressRepository profileAddressRepository,
                              ProfilePhoneRepository profilePhoneRepository,
                              ProfileRepository profileRepository)
        {
            if (addressRepository == null)
                throw new ArgumentNullException("addressRepository");

            if (addressTypeRepository == null)
                throw new ArgumentNullException("addressTypeRepository");

            if (phoneRepository == null)
                throw new ArgumentNullException("phoneRepository");

            if (phoneTypeRepository == null)
                throw new ArgumentNullException("phoneTypeRepository");

            if (profileAddressRepository == null)
                throw new ArgumentNullException("profileAddressRepository");

            if (profilePhoneRepository == null)
                throw new ArgumentNullException("profilePhoneRepository");

            if (profileRepository == null)
                throw new ArgumentNullException("profileRepository");

            _addressRepository = addressRepository;
            _addressTypeRepository = addressTypeRepository;
            _phoneRepository = phoneRepository;
            _phoneTypeRepository = phoneTypeRepository;
            _profileAddressRepository = profileAddressRepository;
            _profilePhoneRepository = profilePhoneRepository;
            _profileRepository = profileRepository;
        }