Table of Contents

Class ProjectRequest

Namespace
Mailtrap.Projects.Requests
Assembly
Mailtrap.Abstractions.dll

Generic request object for project CRUD operations.

public record ProjectRequest : IValidatable, IEquatable<ProjectRequest>
Inheritance
ProjectRequest
Implements
Derived

Constructors

ProjectRequest(string)

Primary instance constructor.

public ProjectRequest(string name)

Parameters

name string

Name of the project.

Remarks

Project's name must be min 2 characters and max 100 characters long.

Exceptions

ArgumentNullException

When name is null or Empty.

Properties

Name

Gets project name.

[JsonPropertyName("name")]
[JsonPropertyOrder(1)]
public string Name { get; }

Property Value

string

Project name.

Methods

Validate()

Validates the current instance.

public ValidationResult Validate()

Returns

ValidationResult

Object containing validation errors, if any.