Search Results for

    Show / Hide Table of Contents

    Class MatchOptions

    Optional filter for matching emails based on fields. For instance filter results to only include emails whose SUBJECT value does CONTAIN given match value. An example payload would be { matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }. You can also pass conditions such as HAS_ATTACHMENT. If you wish to extract regex matches inside the email content see the getEmailContentMatch method in the EmailController.

    Inheritance
    object
    MatchOptions
    Implements
    IEquatable<MatchOptions>
    System.ComponentModel.DataAnnotations.IValidatableObject
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: mailslurp.Model
    Assembly: mailslurp.dll
    Syntax
    [DataContract(Name = "MatchOptions")]
    public class MatchOptions : IEquatable<MatchOptions>, IValidatableObject

    Constructors

    View Source

    MatchOptions(List<MatchOption>, List<ConditionOption>)

    Initializes a new instance of the MatchOptions class.

    Declaration
    public MatchOptions(List<MatchOption> matches = null, List<ConditionOption> conditions = null)
    Parameters
    Type Name Description
    System.Collections.Generic.List<T><MatchOption> matches

    Zero or more match options such as { field: &apos;SUBJECT&apos;, should: &apos;CONTAIN&apos;, value: &apos;Welcome&apos; }. Options are additive so if one does not match the email is excluded from results.

    System.Collections.Generic.List<T><ConditionOption> conditions

    Zero or more conditions such as { condition: &apos;HAS_ATTACHMENTS&apos;, value: &apos;TRUE&apos; }. Note the values are the strings TRUE|FALSE not booleans..

    Properties

    View Source

    Conditions

    Zero or more conditions such as { condition: &apos;HAS_ATTACHMENTS&apos;, value: &apos;TRUE&apos; }. Note the values are the strings TRUE|FALSE not booleans.

    Declaration
    [DataMember(Name = "conditions", EmitDefaultValue = true)]
    public List<ConditionOption> Conditions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<T><ConditionOption>

    Zero or more conditions such as { condition: &apos;HAS_ATTACHMENTS&apos;, value: &apos;TRUE&apos; }. Note the values are the strings TRUE|FALSE not booleans.

    View Source

    Matches

    Zero or more match options such as { field: &apos;SUBJECT&apos;, should: &apos;CONTAIN&apos;, value: &apos;Welcome&apos; }. Options are additive so if one does not match the email is excluded from results

    Declaration
    [DataMember(Name = "matches", EmitDefaultValue = true)]
    public List<MatchOption> Matches { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.List<T><MatchOption>

    Zero or more match options such as { field: &apos;SUBJECT&apos;, should: &apos;CONTAIN&apos;, value: &apos;Welcome&apos; }. Options are additive so if one does not match the email is excluded from results

    Methods

    View Source

    Equals(MatchOptions)

    Returns true if MatchOptions instances are equal

    Declaration
    public bool Equals(MatchOptions input)
    Parameters
    Type Name Description
    MatchOptions input

    Instance of MatchOptions to be compared

    Returns
    Type Description
    bool

    Boolean

    View Source

    Equals(object)

    Returns true if objects are equal

    Declaration
    public override bool Equals(object input)
    Parameters
    Type Name Description
    object input

    Object to be compared

    Returns
    Type Description
    bool

    Boolean

    Overrides
    Object.Equals(Object)
    View Source

    GetHashCode()

    Gets the hash code

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Hash code

    Overrides
    Object.GetHashCode()
    View Source

    ToJson()

    Returns the JSON string presentation of the object

    Declaration
    public virtual string ToJson()
    Returns
    Type Description
    string

    JSON string presentation of the object

    View Source

    ToString()

    Returns the string presentation of the object

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    String presentation of the object

    Overrides
    object.ToString()
    View Source

    Validate(ValidationContext)

    To validate all properties of the instance

    Declaration
    public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
    Parameters
    Type Name Description
    ValidationContext validationContext

    Validation context

    Returns
    Type Description
    IEnumerable<ValidationResult>

    Validation Result

    Implements

    System.IEquatable<T>
    System.ComponentModel.DataAnnotations.IValidatableObject
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.