Exemplo n.º 1
0
        public SmtpClientInstance Construct(object host, object port)
        {
            if (host == Undefined.Value && port == Undefined.Value)
            {
                return(new SmtpClientInstance(this.InstancePrototype, new SmtpClient()));
            }

            return(port == Undefined.Value
                ? new SmtpClientInstance(this.InstancePrototype, new SmtpClient(TypeConverter.ToString(host)))
                : new SmtpClientInstance(this.InstancePrototype, new SmtpClient(TypeConverter.ToString(host), TypeConverter.ToInteger(port))));
        }