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
Type | Name |
---|---|
System.Text.StringBuilder | builder |
GetHashCode()
csharp
public override int GetHashCode()
Returns
System.Int32
Equals(object?)
csharp
public override bool Equals(object? obj)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Object | obj |
Equals(BusinessRule?)
csharp
public virtual bool Equals(BusinessRule? other)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
FacturXDotNet.Validation.BusinessRules.BusinessRule | other |
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
Type | Name |
---|---|
System.String | Name |
System.String | Description |
FacturXDotNet.Models.FacturXProfileFlags | Profiles |
FacturXDotNet.Validation.BusinessRules.BusinessRuleSeverity | Severity |
Implements
System.IEquatable<FacturXDotNet.Validation.BusinessRules.BusinessRule>