Exemple #1
0
        public override bool Equals(object o)
        {
            if (o == this)
            {
                return(true);
            }
            SimulationTransportAddress other = o as SimulationTransportAddress;

            return(other != null ? ID == other.ID : false);
        }
Exemple #2
0
        protected static TransportAddress NoCacheCreateInstance(string s)
        {
            string scheme = s.Substring(0, s.IndexOf(":"));
            string t      = scheme.Substring(scheme.IndexOf('.') + 1);
            //Console.Error.WriteLine(t);

            TransportAddress result = null;

            TransportAddress.TAType ta_type = StringToType(t);

            switch (ta_type)
            {
            case TransportAddress.TAType.Tcp:
                result = new IPTransportAddress(s);
                break;

            case TransportAddress.TAType.Udp:
                result = new IPTransportAddress(s);
                break;

            case TransportAddress.TAType.Function:
                result = new IPTransportAddress(s);
                break;

            case TransportAddress.TAType.S:
                result = new SimulationTransportAddress(s);
                break;

            case TransportAddress.TAType.Tls:
                result = new IPTransportAddress(s);
                break;

            case TransportAddress.TAType.TlsTest:
                result = new IPTransportAddress(s);
                break;

            case TransportAddress.TAType.Tunnel:
                result = new TunnelTransportAddress(s);
                break;
            }

            return(result);
        }
Exemple #3
0
    protected static TransportAddress NoCacheCreateInstance(string s) {
      string scheme = s.Substring(0, s.IndexOf(":"));
      string t = scheme.Substring(scheme.IndexOf('.') + 1);
      //Console.Error.WriteLine(t);
      
      TransportAddress result = null;
      TransportAddress.TAType ta_type = StringToType(t);
      
      switch(ta_type) {
        case TransportAddress.TAType.Tcp:
          result = new IPTransportAddress(s);
          break;
        case TransportAddress.TAType.Udp:
          result = new IPTransportAddress(s);
          break;
        case TransportAddress.TAType.Function:
          result = new IPTransportAddress(s);
          break;
        case TransportAddress.TAType.S:
          result = new SimulationTransportAddress(s);
          break;
        case TransportAddress.TAType.Tls:
          result = new IPTransportAddress(s);
          break;
        case TransportAddress.TAType.TlsTest:
          result = new IPTransportAddress(s);
          break;
        case TransportAddress.TAType.Tunnel:
          result = new TunnelTransportAddress(s);
          break;
      }

      return result;
    }