Class Penalty
Represents a penalty, which is a combination of a penalty type and a penalty value (the malus).
Inherited Members
Namespace: SdlSdl.LanguagePlatformTranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
Syntax
[DataContract]
public class Penalty
Constructors
Penalty()
Initializes a new instance with default values.
Declaration
public Penalty()
Penalty(PenaltyType, int)
Declaration
public Penalty(PenaltyType t, int malus)
Parameters
Type | Name | Description |
---|---|---|
PenaltyType | t | The penalty type. |
int | 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
[DataMember]
public int Malus { get; set; }
Property Value
Type | Description |
---|---|
int |
PenaltyType
Gets or sets the penalty type.
Declaration
[DataMember]
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 |
---|---|
bool |
|