SecurityState.EnsureState 方法

定义

在派生类中重写时,确保由 SecurityState 表示的状态在宿主上可用。When overridden in a derived class, ensures that the state that is represented by SecurityState is available on the host.

public:
 abstract void EnsureState();
public abstract void EnsureState ();
abstract member EnsureState : unit -> unit
Public MustOverride Sub EnsureState ()

注解

此方法的实现应与下面的示例类似。The implementation of this method should be similar to the following example.

public override void EnsureState()  
{  
    if (!IsStateAvailable())  
          throw new ApplicationException("WebcamSecurityState not available");  
}  

适用于