|Dotfuscator > References > Custom Attribute Reference > PreEmptive.Attributes > RuntimeCheckAttribute|
The RuntimeCheckAttribute is the abstract base class of attributes which indicate to Dotfuscator where a Check should be injected. It defines properties common to Checks, such as Actions and Application Notification. Each particular derived class determines the kind of check that will be injected.
public abstract class RuntimeCheckAttribute : Attribute
|Action : CheckAction||
Indicates what predefined Action the application should take in the event of a runtime check resulting in a true value (e.g., when a debugging check detects the application is being debugged).
If an ApplicationNotificationSinkElement is also specified, the Sink will be called before this predefined Action is taken.
By default, this is set to CheckAction.None, which performs no action.
|ActionProbability : double||
Indicates the probability of the specified Action occurring if the Check results in a true value. It should be a decimal number between 0.00 (never take action) and 1.00 (always take action).
For example, a value of 0.50 indicates a 50% chance of the Action executing, while a value of 0.83 would indicate a 83% chance of it executing.
By default, this is set to 1.00 (i.e., the Action always occurs if the Check detects its condition).
|ApplicationNotificationSinkElement : SinkElements||
Indicates how to notify the application of the result of the Check, at the time that the attributed method is called.
If this property is set, ApplicationNotificationSinkName must be set to indicate the name of the method, field, property, or argument to the attributed method that will be used to notify the application.
If this property is set to SinkElements.Method, SinkElements.Field, SinkElements.Property, or SinkElements.Delegate, then ApplicationNotificationSinkOwner may be set as well. If it is not set, Dotfuscator will search the for the Sink on the type defining the attributed method.
If this property is set to DefaultAction, Dotfuscator will error during processing, as that value is not defined
If this property is not set, or is set to None, Dotfuscator will not generate code that notifies the application of the check's result.
|ApplicationNotificationSinkName : String||
The name of the method, field, property, or argument to the attributed method that will be used to notify the application of the result of the runtime check, at the time that the attributed method is called.
If this property is set, ApplicationNotificationSinkElement is required to be set as well.
If this property is not set, Dotfuscator will not generate code that notifies the application of the check's result.
|ApplicationNotificationSinkOwner : Type||
Indicates the type that defines the method, field, property, or delegate specified by ApplicationNotificationSinkName.
If it is not set, Dotfuscator will search for the Sink on the type defining the attributed method.