Brunet.Connections.Connection.ConnectionTypeToString C# (CSharp) Метод

ConnectionTypeToString() статический публичный Метод

static public ConnectionTypeToString ( ConnectionType t ) : string
t ConnectionType
Результат string
    static public string ConnectionTypeToString(ConnectionType t)
    {
      if( t == ConnectionType.Structured ) {
        return "structured";
      }
      if( t == ConnectionType.Leaf ) {
        return "leaf";
      }
      return String.Intern( t.ToString().ToLower() );
    }

Usage Example

Пример #1
0
 /**
  * @param t connection type
  * @param target the Address of the target node
  * @param token unique token used to associate all connection setup messages
  *              with each other
  */
 public ConnectToMessage(ConnectionType t, NodeInfo target, string token)
 {
     _ct        = Connection.ConnectionTypeToString(t);
     _target_ni = target;
     _neighbors = new NodeInfo[0]; //Make sure this isn't null
     _token     = token;
 }
All Usage Examples Of Brunet.Connections.Connection::ConnectionTypeToString