Поделиться через


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

Комментарии

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

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

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

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