ServicePoint.ConnectionName Свойство

Определение

Возвращает имя подключения.

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

Значение свойства

Значение, String представляющее имя подключения.

Примеры

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()))

Комментарии

Предостережение

WebRequest, HttpWebRequest, ServicePointи устарели, и WebClient вы не должны использовать их для новой разработки. Вместо этого используйте HttpClient.

ServicePoint Если объект был создан путем вызова перегрузки с аргументом FindServicePointUri, ConnectionName свойство представляет Scheme свойство используемого Uri объекта.

ServicePoint Если объект был создан из сетевого узла и порта, ConnectionName свойство содержит строку, представляющую узел и сетевой порт. ConnectionName Если свойство задано при построении из узла и порта, то только WebRequest объекты с тем же ConnectionGroupName значением могут использовать этот ServicePoint объект.

Применяется к

См. также раздел