Ejemplo n.º 1
0
        /// <summary>
        /// Creates a Client instance with the given Config instance.
        /// </summary>
        /// <remarks>
        /// <p>The Config instance is not duplicated, so alterations to it will
        /// affect all Client instances using it.</p>
        /// </remarks>
        /// <param name="config">The configuration instance to use</param>
        public Client(Config config)
            : this(config,
					ResultFinderFactory.DefaultPersonFinder,
					ResultFinderFactory.DefaultBusinessFinder,
					ResultFinderFactory.DefaultPhoneFinder,
					ResultFinderFactory.DefaultLocationFinder)
        {
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a Client instance with the given Config and ResultFinder instances.
        /// </summary>
        /// <remarks>
        /// Normally, one should use the default ResultFinders, however there are
        /// advanced cases where alternative ResultFinders may be useful, such
        /// as with custom response parsers or stubbed finders for testing.
        /// </remarks>
        ///
        /// <param name="config">The configuration instance</param>
        /// <param name="personResultFinder">The ResultFinder used for FindPeople() lookups</param>
        /// <param name="businessResultFinder">The ResultFinder used for FindBusinesses() lookups</param>
        /// <param name="phoneResultFinder">The ResultFinder used for FindPhones() lookups</param>
        /// <param name="locationResultFinder">The ResultFinder used for FindLocations() lookups</param>
        private Client(Config config,
            IResultFinder<IPerson, PersonQuery> personResultFinder,
            IResultFinder<IBusiness, BusinessQuery> businessResultFinder,
            IResultFinder<IPhone, PhoneQuery> phoneResultFinder,
            IResultFinder<ILocation, LocationQuery> locationResultFinder)
        {
            _config = config;

            _personResultFinder = personResultFinder;
            _businessResultFinder = businessResultFinder;
            _phoneResultFinder = phoneResultFinder;
            _locationResultFinder = locationResultFinder;
        }