예제 #1
0
        public static Bind Create(Location coordinates, IEnumerable <Address> addresses)
        {
            var adrList = addresses.ToList();

            if (adrList.Count == 0)
            {
                return(Create(coordinates.ToString(), new Exception("Адрес не найден")));
            }

            Bind bind = new Bind {
                OriginalAddress = coordinates.ToString(), Addresses = adrList
            };

            bind.Address = BindAddress.Create(addresses, coordinates);
            return(bind);
        }
예제 #2
0
        public static Bind Create(string originalAddress, IEnumerable <Address> addresses)
        {
            var adrList = addresses.ToList();

            if (adrList.Count == 0)
            {
                return(Create(originalAddress, new Exception("Адрес не найден")));
            }

            Bind bind = new Bind {
                OriginalAddress = originalAddress, Addresses = addresses.ToList()
            };

            bind.Address = BindAddress.Create(addresses);
            return(bind);
        }