Search Results for

    Show / Hide Table of Contents

    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
    [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

    true if the penalty type can be applied multiple times in a scoring result, and false otherwise.

    In this article
    • Constructors
      • Penalty()
      • Penalty(PenaltyType, int)
    • Properties
      • Malus
      • PenaltyType
    • Methods
      • CanApplyMultipleTimes(PenaltyType)
    Back to top Generated by DocFX