Skip to content

Class BusinessRule

Represents any business rule for validating a Factur-X document.

Assembly: FacturXDotNet.dll
csharp
public abstract record BusinessRule : IEquatable<BusinessRule>

Derived:
FacturXDotNet.Validation.BusinessRules.CII.CrossIndustryInvoiceBusinessRule, FacturXDotNet.Validation.BusinessRules.Hybrid.HybridBusinessRule

Implements:
System.IEquatable<FacturXDotNet.Validation.BusinessRules.BusinessRule>

Properties

EqualityContract

csharp
protected virtual Type EqualityContract { get; }

Name

The name of the rule.

csharp
public string Name { get; init; }

Description

A description of the rule.

csharp
public string Description { get; init; }

Profiles

The profiles in which this rule should be enforced.

csharp
public FacturXProfileFlags Profiles { get; init; }

Severity

The severity of the rule.

csharp
public BusinessRuleSeverity Severity { get; init; }

Methods

Format()

Formats the rule as a string.

csharp
public abstract string Format()
Returns

System.String

ToString()

csharp
public override string ToString()
Returns

System.String

PrintMembers(StringBuilder)

csharp
protected virtual bool PrintMembers(StringBuilder builder)
Returns

System.Boolean

Parameters
TypeName
System.Text.StringBuilderbuilder

GetHashCode()

csharp
public override int GetHashCode()
Returns

System.Int32

Equals(object?)

csharp
public override bool Equals(object? obj)
Returns

System.Boolean

Parameters
TypeName
System.Objectobj

Equals(BusinessRule?)

csharp
public virtual bool Equals(BusinessRule? other)
Returns

System.Boolean

Parameters
TypeName
FacturXDotNet.Validation.BusinessRules.BusinessRuleother

Deconstruct(out string, out string, out FacturXProfileFlags, out BusinessRuleSeverity)

csharp
public void Deconstruct(out string Name, out string Description, out FacturXProfileFlags Profiles, out BusinessRuleSeverity Severity)
Parameters
TypeName
System.StringName
System.StringDescription
FacturXDotNet.Models.FacturXProfileFlagsProfiles
FacturXDotNet.Validation.BusinessRules.BusinessRuleSeveritySeverity

Implements

  • System.IEquatable<FacturXDotNet.Validation.BusinessRules.BusinessRule>

The tools are open source and released under the MIT License, feel free to use, modify, and share.