FeatureSupport.IsPresent 메서드

정의

지정된 기능이 시스템에 설치되어 있는지 여부를 확인합니다.

오버로드

IsPresent(Object)

지정된 기능에 대한 임의의 버전이 시스템에 설치되어 있는지 여부를 확인합니다.

IsPresent(Object, Version)

지정된 기능의 새 버전 또는 지정된 버전이 시스템에 설치되어 있는지 여부를 확인합니다.

IsPresent(String, String)

지정된 기능에 대한 임의의 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 static입니다.

IsPresent(String, String, Version)

지정된 기능의 새 버전 또는 지정된 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 static입니다.

IsPresent(Object)

지정된 기능에 대한 임의의 버전이 시스템에 설치되어 있는지 여부를 확인합니다.

public:
 virtual bool IsPresent(System::Object ^ feature);
public virtual bool IsPresent (object feature);
abstract member IsPresent : obj -> bool
override this.IsPresent : obj -> bool
Public Overridable Function IsPresent (feature As Object) As Boolean

매개 변수

feature
Object

찾을 기능입니다.

반환

기능이 존재하면 true이고 존재하지 않으면 false입니다.

구현

예제

다음 코드 예제에서는 합니다 OSFeature 구현의 FeatureSupport 에 대 한 쿼리는 LayeredWindows 기능입니다. 버전을 확인 하는 경우 확인 null을 기능이 있는지 여부를 결정 합니다. 결과 텍스트 상자에 표시 됩니다. 이 코드를 실행 하려면 textBox1 생성 되어 폼에 배치 합니다.

private:
   void LayeredWindows()
   {
      // Gets the version of the layered windows feature.
      Version^ myVersion = OSFeature::Feature->GetVersionPresent(
         OSFeature::LayeredWindows );
      
      // Prints whether the feature is available.
      if ( myVersion != nullptr )
      {
         textBox1->Text = "Layered windows feature is installed.\n";
      }
      else
      {
         textBox1->Text = "Layered windows feature is not installed.\n";
      }

      
      // This is an alternate way to check whether a feature is present.
      if ( OSFeature::Feature->IsPresent( OSFeature::LayeredWindows ) )
      {
         textBox1->Text = String::Concat( textBox1->Text,
            "Again, layered windows feature is installed." );
      }
      else
      {
         textBox1->Text = String::Concat( textBox1->Text,
            "Again, layered windows feature is not installed." );
      }
   }
private void LayeredWindows() {
   // Gets the version of the layered windows feature.
   Version myVersion = OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows);

   // Prints whether the feature is available.
   if (myVersion != null)
      textBox1.Text = "Layered windows feature is installed." + '\n';
   else
      textBox1.Text = "Layered windows feature is not installed." + '\n';

   // This is an alternate way to check whether a feature is present.
   if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows))
      textBox1.Text += "Again, layered windows feature is installed.";
   else
      textBox1.Text += "Again, layered windows feature is not installed.";
}
Private Sub LayeredWindows()
    ' Gets the version of the layered windows feature.
    Dim myVersion As Version = _
       OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows)
       
    ' Prints whether the feature is available.
    If (myVersion IsNot Nothing) Then
        textBox1.Text = "Layered windows feature is installed." & _
           ControlChars.CrLf
    Else
        textBox1.Text = "Layered windows feature is not installed." & _
           ControlChars.CrLf
    End If 
    'This is an alternate way to check whether a feature is present.
    If OSFeature.Feature.IsPresent(OSFeature.LayeredWindows) Then
        textBox1.Text &= "Again, layered windows feature is installed."
    Else
        textBox1.Text &= "Again, layered windows feature is not installed."
    End If
End Sub

상속자 참고

상속 하는 경우 FeatureSupport를 재정의 해야 합니다는 GetVersionPresent(String, String) 메서드. 이 메서드를 재정의하는 경우 매개 변수에 사용하는 클래스가 메서드에서 이 매개 변수 IsPresent(String, String)feature 사용되는 클래스와 동일한지 검사. 두 feature 매개 변수가 다른 경우 도 재정 IsPresent(String, String)의해야 합니다.

적용 대상

IsPresent(Object, Version)

지정된 기능의 새 버전 또는 지정된 버전이 시스템에 설치되어 있는지 여부를 확인합니다.

public:
 virtual bool IsPresent(System::Object ^ feature, Version ^ minimumVersion);
public virtual bool IsPresent (object feature, Version minimumVersion);
abstract member IsPresent : obj * Version -> bool
override this.IsPresent : obj * Version -> bool
Public Overridable Function IsPresent (feature As Object, minimumVersion As Version) As Boolean

매개 변수

feature
Object

찾을 기능입니다.

minimumVersion
Version

찾을 기능의 최소 버전 번호를 나타내는 Version입니다.

반환

기능이 설치되어 있으며 해당 버전 번호가 지정된 최소 버전 번호 이상이면 true이고 기능이 설치되어 있지 않거나 해당 버전 번호가 지정된 최소 번호 미만이면 false입니다.

구현

상속자 참고

상속 하는 경우 FeatureSupport를 재정의 해야 합니다는 GetVersionPresent(String, String) 메서드. 이 메서드를 재정의하는 경우 매개 변수에 사용하는 클래스가 메서드에서 이 매개 변수 IsPresent(String, String)feature 사용되는 클래스와 동일한지 검사. 두 feature 매개 변수가 다른 경우 도 재정 IsPresent(String, String)의해야 합니다.

적용 대상

IsPresent(String, String)

지정된 기능에 대한 임의의 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 static입니다.

public:
 static bool IsPresent(System::String ^ featureClassName, System::String ^ featureConstName);
public static bool IsPresent (string featureClassName, string featureConstName);
static member IsPresent : string * string -> bool
Public Shared Function IsPresent (featureClassName As String, featureConstName As String) As Boolean

매개 변수

featureClassName
String

지정된 기능에 대한 정보를 쿼리할 클래스의 정규화된 이름입니다. 이 클래스는 IFeatureSupport 인터페이스를 구현하거나 해당 인터페이스를 구현하는 클래스에서 상속해야 합니다.

featureConstName
String

찾으려는 기능의 정규화된 이름입니다.

반환

지정된 기능이 있으면 true이고 지정된 기능이 없거나 해당 기능을 포함하는 제품이 설치되어 있지 않으면 false입니다.

설명

전달할 이름을 결정 하는 기능을 포함 하는 제품 설명서를 참조 합니다 featureClassName 하며 featureConstName 매개 변수입니다.

추가 정보

적용 대상

IsPresent(String, String, Version)

지정된 기능의 새 버전 또는 지정된 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 static입니다.

public:
 static bool IsPresent(System::String ^ featureClassName, System::String ^ featureConstName, Version ^ minimumVersion);
public static bool IsPresent (string featureClassName, string featureConstName, Version minimumVersion);
static member IsPresent : string * string * Version -> bool
Public Shared Function IsPresent (featureClassName As String, featureConstName As String, minimumVersion As Version) As Boolean

매개 변수

featureClassName
String

지정된 기능에 대한 정보를 쿼리할 클래스의 정규화된 이름입니다. 이 클래스는 IFeatureSupport 인터페이스를 구현하거나 해당 인터페이스를 구현하는 클래스에서 상속해야 합니다.

featureConstName
String

찾으려는 기능의 정규화된 이름입니다.

minimumVersion
Version

기능의 최소 버전 번호를 나타내는 Version입니다.

반환

기능이 설치되어 있으며 해당 버전 번호가 지정된 최소 버전 번호 이상이면 true이고 기능이 설치되어 있지 않거나 해당 버전 번호가 지정된 최소 번호 미만이면 false입니다.

설명

전달할 이름을 결정 하는 기능을 포함 하는 제품 설명서를 참조 합니다 featureClassName 하며 featureConstName 매개 변수입니다.

추가 정보

적용 대상