Exemplo n.º 1
0
        protected override ServiceAddressModel GetServiceAddress(string machineNo, string serviceIdentity)
        {
            var client = new ServiceCollectionClient();

            var address = client.GetServiceAddress(new ServiceAddressRequest()
            {
                No = LocalConfig.MachineNo,

                ServiceGroup = "ExampleGroup",

                ServiceIdentity = serviceIdentity,

                MMode = ServiceAddressRequest.MatchMode.No,
            });

            client.Close();

            if (address == null)
                return null;

            return new ServiceAddressModel()
            {
                Address = address.Address,
                ServiceIdentity = address.ServiceIdentity, 
                PropertyList = address.PropertyList,
            };
        }