Chronos Plugins  5.2.0
This documentation covers the plugin interfaces definitions and an example implementation.
AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute Class Reference

Add this attribute to your ITaskForDevice.SetDevice method or your IDevice property if you are using more than one device to limit the range of autosamplers that is offered in the method editor. More...

+ Inheritance diagram for AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute:
+ Collaboration diagram for AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute:

Public Member Functions

 DevicesLimitedAttribute (params Type[] types)
 Takes a whitelist of sampler types that are OK for your task. More...
 
virtual bool IsOK (Type someDeviceType)
 Override this if you need a more complex logic than simple type whitelisting. More...
 

Private Attributes

readonly Type[] mLimitedTo
 For the default implementation More...
 

Detailed Description

Add this attribute to your ITaskForDevice.SetDevice method or your IDevice property if you are using more than one device to limit the range of autosamplers that is offered in the method editor.

Definition at line 224 of file TaskInterfaces.cs.

Constructor & Destructor Documentation

◆ DevicesLimitedAttribute()

AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute.DevicesLimitedAttribute ( params Type[]  types)

Takes a whitelist of sampler types that are OK for your task.

Parameters
types

Definition at line 235 of file TaskInterfaces.cs.

236  {
237  mLimitedTo = types;
238  }
readonly Type[] mLimitedTo
For the default implementation

References AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute.mLimitedTo.

Member Function Documentation

◆ IsOK()

virtual bool AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute.IsOK ( Type  someDeviceType)
virtual

Override this if you need a more complex logic than simple type whitelisting.

Parameters
someDeviceType
Returns

Definition at line 246 of file TaskInterfaces.cs.

247  {
248  return mLimitedTo?.Any(someType => someType.IsAssignableFrom(someDeviceType)) ?? false;
249  }

References AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute.mLimitedTo.

Member Data Documentation

◆ mLimitedTo

readonly Type [] AxelSemrau.Chronos.Plugin.DevicesLimitedAttribute.mLimitedTo
private

The documentation for this class was generated from the following file: