Class Penalty
Represents a penalty, which is a combination of a penalty type and a penalty value (the malus).
Inheritance
Object
Penalty
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Sdl.LanguagePlatform.TranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
public class Penalty
Constructors
Penalty()
Initializes a new instance with default values.
Declaration
public Penalty()
Penalty(PenaltyType, Int32)
Represents a penalty, which is a combination of a penalty type and a penalty value (the malus).
Declaration
public Penalty(PenaltyType t, int malus)
Parameters
Type | Name | Description |
---|---|---|
PenaltyType | t | The penalty type. |
Int32 | malus | The penalty cost, which will be substracted from the base score. |
Properties
Malus
Gets or sets the penalty cost, which will be substracted from the base score.
Declaration
public int Malus { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
PenaltyType
Gets or sets the penalty type.
Declaration
public PenaltyType PenaltyType { get; set; }
Property Value
Type | Description |
---|---|
PenaltyType |
Methods
CanApplyMultipleTimes(PenaltyType)
Gets a flag which indicates whether the specified penalty type can be applied multiple times in a result, or at most once.
Declaration
public static bool CanApplyMultipleTimes(PenaltyType pt)
Parameters
Type | Name | Description |
---|---|---|
PenaltyType | pt | The penalty type |
Returns
Type | Description |
---|---|
Boolean |
|