Свойство ServerConnection.UserProfile
Возвращает профиль пользователя, связанный с указанным соединением.
Пространство имен: Microsoft.SqlServer.Management.Common
Сборка: Microsoft.SqlServer.ConnectionInfo (в Microsoft.SqlServer.ConnectionInfo.dll)
Синтаксис
'Декларация
Public ReadOnly Property UserProfile As ServerUserProfiles
Get
'Применение
Dim instance As ServerConnection
Dim value As ServerUserProfiles
value = instance.UserProfile
public ServerUserProfiles UserProfile { get; }
public:
property ServerUserProfiles UserProfile {
ServerUserProfiles get ();
}
member UserProfile : ServerUserProfiles
function get UserProfile () : ServerUserProfiles
Значение свойства
Тип: Microsoft.SqlServer.Management.Common.ServerUserProfiles
Значение объекта ServerUserProfiles, указывающее профиль пользователя, связанный с указанным по ссылке соединением.
Примеры
C#
ServerConnection conn = new ServerConnection();
Console.WriteLine(conn.UserProfile.ToString());
PowerShell
$conn = new-object Microsoft.SqlServer.Management.Common.ServerConnection
Write-Host $conn.UserProfile