FindAddressCandidates() public méthode

This method is called when a query is made to the locator. This must be implemented in such a way that Single and Multi line searches can be preformaed
public FindAddressCandidates ( IPropertySet address ) : IArray
address IPropertySet Review code for the structure of this property set
Résultat IArray
        public void TestFindAddressCandidatesWithEmptyInput()
        {
            BindRunTime();

            IPropertySet addressObj = new PropertySetClass();

            BNG_Locator bng = new BNG_Locator();
            IArray matches = bng.FindAddressCandidates(addressObj);
            Assert.IsTrue(matches.Count == 0);
        }
        public void TestFindAddressCandidatesCannotMatchAddress(string address)
        {
            BindRunTime();

            // Get the input from the IPropertySet
            object names = null;
            object values = null;

            IPropertySet addressObj = new PropertySetClass();
            names = new string[] { "Single Line Address" };
            // Get centre point of Envelope for geocode location
            // Workaround for currnet non Point geometry issue
            values = new object[] { address };

            addressObj.SetProperties(names, values);

            BNG_Locator bng = new BNG_Locator();
            IArray matches = bng.FindAddressCandidates(addressObj);
            Assert.IsTrue(matches.Count == 0);
        }