FeatureSupport.IsPresent 메서드

정의

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

오버로드

Name Description
IsPresent(Object)

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

IsPresent(Object, Version)

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

IsPresent(String, String)

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

IsPresent(String, String, Version)

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

IsPresent(Object)

Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs

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

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

찾을 기능입니다.

반품

기능이 있으면

구현

예제

다음 코드 예제에서는 기능에 대한 구현 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) 해야 합니다. 이 메서드를 재정의할 때 매개 변수에 feature 사용하는 클래스가 메서드에서 이 매개 변수 IsPresent(String, String) 에 사용되는 클래스와 같은지 확인합니다. 두 feature 매개 변수가 다른 경우 재정의해야 합니다 IsPresent(String, String).

적용 대상

IsPresent(Object, Version)

Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs

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

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 찾을 기능의 최소 버전 번호를 나타내는 값입니다.

반품

기능이 있고 해당 버전 번호가 지정된 최소 버전 번호보다 크거나 같으면 입니다. 기능이 설치되지 않았거나 해당 버전 번호가 지정된 최소 번호보다 낮으면 입니다.

구현

상속자 참고

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

적용 대상

IsPresent(String, String)

Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs

지정된 기능의 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 .입니다 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

찾을 기능의 정규화된 이름입니다.

반품

지정된 기능이 있으면 지정된 기능이 없거나 기능이 포함된 제품이 설치되지 않은 경우

설명

전달할 featureClassName 이름 및 featureConstName 매개 변수를 확인하려면 기능이 포함된 제품에 대한 설명서를 참조하세요.

추가 정보

적용 대상

IsPresent(String, String, Version)

Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs
Source:
FeatureSupport.cs

지정된 기능의 지정된 버전 또는 최신 버전이 시스템에 설치되어 있는지 여부를 확인합니다. 이 메서드는 .입니다 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 기능의 최소 버전 번호를 나타내는 값입니다.

반품

기능이 있고 해당 버전 번호가 지정된 최소 버전 번호보다 크거나 같으면 입니다. 기능이 설치되지 않았거나 해당 버전 번호가 지정된 최소 번호보다 낮으면 입니다.

설명

전달할 featureClassName 이름 및 featureConstName 매개 변수를 확인하려면 기능이 포함된 제품에 대한 설명서를 참조하세요.

추가 정보

적용 대상