Ejemplo n.º 1
0
        private Address.Builder AddressToProto(Actor.Address address)
        {
            if (string.IsNullOrEmpty(address.Host) || !address.Port.HasValue)
            {
                throw new ArgumentException(string.Format("Address [{0}] could not be serialized: host or port missing", address));
            }

            return(Address.CreateBuilder()
                   .SetSystem(address.System)
                   .SetHostname(address.Host)
                   .SetPort((uint)address.Port.Value)
                   .SetProtocol(address.Protocol));
        }
Ejemplo n.º 2
0
 private Actor.Address AddressFromProto(Address address)
 {
     return(new Actor.Address(address.Protocol, address.System, address.Hostname, (int)address.Port));
 }
 private Actor.Address AddressFromProto(Address address)
 {
     return new Actor.Address(address.Protocol, address.System, address.Hostname, (int)address.Port);
 }