FeatureSupport

FeatureSupport

System. Windows .Forms (system. windows .forms.dll) abstract class

This abstract base class provides a mechanism to determine whether particular features are supported by a particular class or object.

There methods to find out whether a particular feature or version of a feature IsPresent() , and another method to determine exactly which version of particular feature is available: GetVersionPresent() .

The OSFeature class, derived from FeatureSupport , allows you to determine whether particular operating system features are present.

You can also derive your own classes from FeatureSupport (or the IFeatureSupport interface it implements) to give an indication of the features in your own frameworks. You have two design choices: you can either implement the IFeatureSupport interface on each of your objects that support feature presentation, in which case you can use the static versions of IsPresent() and GetVersionPresent() , or you can inherit from FeatureSupport and override the GetVersionPresent() and/or IsPresent() members that handle the feature information for arbitrary named classes.

 public abstract class  FeatureSupport  : IFeatureSupport {  // Protected Constructors  protected  FeatureSupport  ();  // Public Static Methods  public static Version  GetVersionPresent  (string  featureClassName  , string  featureConstName  );    public static bool  IsPresent  (string  featureClassName  , string  featureConstName  );    public static bool  IsPresent  (string  featureClassName  , string  featureConstName  , Version  minimumVersion  );  // Public Instance Methods  public abstract Version  GetVersionPresent  (object  feature  );  // implements IFeatureSupport  public virtual bool  IsPresent  (object  feature  );  // implements IFeatureSupport  public virtual bool  IsPresent  (object  feature  , Version  minimumVersion  );  // implements IFeatureSupport  } 

Subclasses

OSFeature



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net