Skip to content

Commit

Permalink
Use expression body for accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane32 committed Jun 5, 2024
1 parent dee4aaa commit 18d2814
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions QRCoder/PayloadGenerator/OneTimePassword.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class OneTimePassword : Payload
[Obsolete("This property is obsolete, use " + nameof(AuthAlgorithm) + " instead", false)]
public OoneTimePasswordAuthAlgorithm Algorithm
{
get { return (OoneTimePasswordAuthAlgorithm)Enum.Parse(typeof(OoneTimePasswordAuthAlgorithm), AuthAlgorithm.ToString()); }
set { AuthAlgorithm = (OneTimePasswordAuthAlgorithm)Enum.Parse(typeof(OneTimePasswordAuthAlgorithm), value.ToString()); }
get => (OoneTimePasswordAuthAlgorithm)Enum.Parse(typeof(OoneTimePasswordAuthAlgorithm), AuthAlgorithm.ToString());
set => AuthAlgorithm = (OneTimePasswordAuthAlgorithm)Enum.Parse(typeof(OneTimePasswordAuthAlgorithm), value.ToString());
}

/// <summary>
Expand Down
48 changes: 24 additions & 24 deletions QRCoder/PayloadGenerator/RussiaPaymentOrder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ public class OptionalFields
/// </summary>
public string? Sum
{
get { return _sum; }
set { _sum = value == null ? null : ValidateInput(value, "Sum", @"^\d{1,18}$"); }
get => _sum;
set => _sum = value == null ? null : ValidateInput(value, "Sum", @"^\d{1,18}$");
}

private string? _purpose;
Expand All @@ -263,8 +263,8 @@ public string? Sum
/// </summary>
public string? Purpose
{
get { return _purpose; }
set { _purpose = value == null ? null : ValidateInput(value, "Purpose", @"^.{1,160}$"); }
get => _purpose;
set => _purpose = value == null ? null : ValidateInput(value, "Purpose", @"^.{1,160}$");
}

private string? _payeeInn;
Expand All @@ -274,8 +274,8 @@ public string? Purpose
/// </summary>
public string? PayeeINN
{
get { return _payeeInn; }
set { _payeeInn = value == null ? null : ValidateInput(value, "PayeeINN", @"^.{1,12}$"); }
get => _payeeInn;
set => _payeeInn = value == null ? null : ValidateInput(value, "PayeeINN", @"^.{1,12}$");
}

private string? _payerInn;
Expand All @@ -285,8 +285,8 @@ public string? PayeeINN
/// </summary>
public string? PayerINN
{
get { return _payerInn; }
set { _payerInn = value == null ? null : ValidateInput(value, "PayerINN", @"^.{1,12}$"); }
get => _payerInn;
set => _payerInn = value == null ? null : ValidateInput(value, "PayerINN", @"^.{1,12}$");
}

private string? _drawerStatus;
Expand All @@ -296,8 +296,8 @@ public string? PayerINN
/// </summary>
public string? DrawerStatus
{
get { return _drawerStatus; }
set { _drawerStatus = value == null ? null : ValidateInput(value, "DrawerStatus", @"^.{1,2}$"); }
get => _drawerStatus;
set => _drawerStatus = value == null ? null : ValidateInput(value, "DrawerStatus", @"^.{1,2}$");
}

private string? _kpp;
Expand All @@ -307,8 +307,8 @@ public string? DrawerStatus
/// </summary>
public string? KPP
{
get { return _kpp; }
set { _kpp = value == null ? null : ValidateInput(value, "KPP", @"^.{1,9}$"); }
get => _kpp;
set => _kpp = value == null ? null : ValidateInput(value, "KPP", @"^.{1,9}$");
}

private string? _cbc;
Expand All @@ -318,8 +318,8 @@ public string? KPP
/// </summary>
public string? CBC
{
get { return _cbc; }
set { _cbc = value == null ? null : ValidateInput(value, "CBC", @"^.{1,20}$"); }
get => _cbc;
set => _cbc = value == null ? null : ValidateInput(value, "CBC", @"^.{1,20}$");
}

private string? _oktmo;
Expand All @@ -329,8 +329,8 @@ public string? CBC
/// </summary>
public string? OKTMO
{
get { return _oktmo; }
set { _oktmo = value == null ? null : ValidateInput(value, "OKTMO", @"^.{1,11}$"); }
get => _oktmo;
set => _oktmo = value == null ? null : ValidateInput(value, "OKTMO", @"^.{1,11}$");
}

private string? _paytReason;
Expand All @@ -340,8 +340,8 @@ public string? OKTMO
/// </summary>
public string? PaytReason
{
get { return _paytReason; }
set { _paytReason = value == null ? null : ValidateInput(value, "PaytReason", @"^.{1,2}$"); }
get => _paytReason;
set => _paytReason = value == null ? null : ValidateInput(value, "PaytReason", @"^.{1,2}$");
}

private string? _taxPeriod;
Expand All @@ -351,8 +351,8 @@ public string? PaytReason
/// </summary>
public string? TaxPeriod
{
get { return _taxPeriod; }
set { _taxPeriod = value == null ? null : ValidateInput(value, "ТaxPeriod", @"^.{1,10}$"); }
get => _taxPeriod;
set => _taxPeriod = value == null ? null : ValidateInput(value, "ТaxPeriod", @"^.{1,10}$");
}

private string? _docNo;
Expand All @@ -362,8 +362,8 @@ public string? TaxPeriod
/// </summary>
public string? DocNo
{
get { return _docNo; }
set { _docNo = value == null ? null : ValidateInput(value, "DocNo", @"^.{1,15}$"); }
get => _docNo;
set => _docNo = value == null ? null : ValidateInput(value, "DocNo", @"^.{1,15}$");
}

/// <summary>
Expand All @@ -379,8 +379,8 @@ public string? DocNo
/// </summary>
public string? TaxPaytKind
{
get { return _taxPaytKind; }
set { _taxPaytKind = value == null ? null : ValidateInput(value, "TaxPaytKind", @"^.{1,2}$"); }
get => _taxPaytKind;
set => _taxPaytKind = value == null ? null : ValidateInput(value, "TaxPaytKind", @"^.{1,2}$");
}

/**************************************************************************
Expand Down

0 comments on commit 18d2814

Please sign in to comment.