IApiCop

Name Value
Assembly Catel.Core
Namespace Catel.ApiCop
Available on .NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public interface IApiCop

Interface to specify writers for the ApiCop functionality.

Properties

TargetType

Gets the target type of the ApiCop. This is the type where the ApiCop is created for.

Methods

GetResults()

Gets the results of this specific ApiCop.

Returns

The results of this ApiCop.

RegisterRule<TRule>(TRule rule)

Registers the rule with this ApiCop.

Type Parameters

TRule The type of the rule.

Parameters

Name Description
rule The rule.

Returns

The rule.

Exceptions

Name Description
ArgumentNullException The rule isnull.

UpdateRule<TRule>(string name, Action<TRule> action)

Updates the rule with the specified name. If the rule is found and the ApiCop functionality is enabled, the specified action will be invoked on the registered rule.

Type Parameters

TRule The type of the rule.

Parameters

Name Description
name The name.
action The action.

Returns

The rule ornull if the rule is not registered first.

Exceptions

Name Description
ArgumentException The name isnull or whitespace.
ArgumentNullException The action isnull.

Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion