Class Penalty
Represents a penalty, which is a combination of a penalty type and a penalty value (the malus).
Inheritance
System.Object
Penalty
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.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)
Declaration
public Penalty(PenaltyType t, int malus)
Parameters
Type | Name | Description |
---|---|---|
PenaltyType | t | The penalty type. |
System.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 |
---|---|
System.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 |
---|---|
System.Boolean |
|