HostProtectionAttribute.UI 속성

정의

사용자 인터페이스가 노출되는지 여부를 나타내는 값을 가져오거나 설정합니다.Gets or sets a value indicating whether the user interface is exposed.

public:
 property bool UI { bool get(); void set(bool value); };
public bool UI { get; set; }
member this.UI : bool with get, set
Public Property UI As Boolean

속성 값

Boolean

사용자 인터페이스가 노출되면 true이고, 그렇지 않으면 false입니다.true if the user interface is exposed; otherwise, false. 기본값은 false입니다.The default is false.

예제

다음 코드 예제에서는 속성을 사용 하 여 특성을 사용 하는 방법을 보여 줍니다 HostProtectionAttribute UI .The following code example illustrates the use of the HostProtectionAttribute attribute with the UI property. 이 예제는에 대해 제공 된 큰 예제의 일부는 HostProtectionAttribute 클래스입니다.This example is part of a larger example provided for the HostProtectionAttribute class.

// Use the enumeration flags to indicate that this method exposes shared state, 
// self-affecting process management, and self-affecting threading.
// This method allows the user to quit the sample.

[HostProtection(SharedState=true,SelfAffectingProcessMgmt=true,
SelfAffectingThreading=true,UI=true)]
static void ExecuteBreak()
{
   Console::WriteLine( "Executing Debugger.Break." );
   Debugger::Break();
   Debugger::Log( 1, "info", "test message" );
}
// Use the enumeration flags to indicate that this method exposes shared 
// state, self-affecting process management, and self-affecting threading.
[HostProtectionAttribute(SharedState=true, SelfAffectingProcessMgmt=true,
     SelfAffectingThreading=true, UI=true)]
// This method allows the user to quit the sample.
private static void ExecuteBreak()
{
    Console.WriteLine("Executing Debugger.Break.");
    Debugger.Break();
    Debugger.Log(1,"info","test message");
}
' Use the enumeration flags to indicate that this method exposes shared
' state, self-affecting process management, and self-affecting threading.
<HostProtectionAttribute(SharedState := True, _
    SelfAffectingProcessMgmt := True, _
    SelfAffectingThreading := True, UI := True)> _
Private Shared Sub ExecuteBreak()

    ' This method allows the user to quit the sample.
    Console.WriteLine("Executing Debugger.Break.")
    Debugger.Break()
    Debugger.Log(1, "info", "test message")
End Sub

적용 대상

추가 정보