HostProtectionAttribute.UI 속성

정의

사용자 인터페이스가 노출되는지 여부를 나타내는 값을 가져오거나 설정합니다.

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입니다. 기본값은 false입니다.

예제

다음 코드 예제에서는 속성과 HostProtectionAttribute 함께 특성을 사용하는 방법을 보여 줍니다 UI . 이 예제는에 대해 제공 된 큰 예제의 일부는 HostProtectionAttribute 클래스입니다.

// 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

적용 대상

추가 정보