ServicePoint.ConnectionName Proprietà

Definizione

Ottiene il nome della connessione.

public:
 property System::String ^ ConnectionName { System::String ^ get(); };
public string ConnectionName { get; }
member this.ConnectionName : string
Public ReadOnly Property ConnectionName As String

Valore della proprietà

Oggetto String che rappresenta il nome della connessione.

Esempio

Console::WriteLine( "ConnectionName = {0}", sp->ConnectionName );

// Display the maximum number of connections allowed on this 
// ServicePoint instance.
Console::WriteLine( "ConnectionLimit = {0}", sp->ConnectionLimit );

// Display the number of connections associated with this 
// ServicePoint instance.
Console::WriteLine( "CurrentConnections = {0}", sp->CurrentConnections );
Console.WriteLine("ConnectionName = " + sp.ConnectionName);

// Display the maximum number of connections allowed on this
// ServicePoint instance.
Console.WriteLine("ConnectionLimit = " + sp.ConnectionLimit);

// Display the number of connections associated with this
// ServicePoint instance.
Console.WriteLine("CurrentConnections = " + sp.CurrentConnections);
Console.WriteLine(("ConnectionName = " + sp.ConnectionName))

' Display the maximum number of connections allowed on this 
' ServicePoint instance.
Console.WriteLine(("ConnectionLimit = " + sp.ConnectionLimit.ToString()))

' Display the number of connections associated with this 
' ServicePoint instance.
Console.WriteLine(("CurrentConnections = " + sp.CurrentConnections.ToString()))

Commenti

Se l'oggetto ServicePoint è stato costruito chiamando un overload con un UriFindServicePoint argomento, la ConnectionName proprietà rappresenta la Scheme proprietà dell'oggetto Uri utilizzato.

Se l'oggetto ServicePoint è stato costruito da un host di rete e da una porta, la ConnectionName proprietà contiene una stringa che rappresenta l'host e la porta di rete. Se la ConnectionName proprietà viene impostata quando viene costruita da un host e da una porta, solo WebRequest gli oggetti con lo stesso ConnectionGroupName valore possono utilizzare questo ServicePoint oggetto.

Si applica a

Vedi anche