[skip ci] Use object initializer
MODIFY
WalletWasabi/Crypto/StringCipher.cs
WalletWasabi/Crypto/StringCipher.cs
@@ -124,10 +124,12 @@ namespace WalletWasabi.Crypto
private static AesManaged CreateAES()
{
- var aes = new AesManaged();
- aes.BlockSize = 128;
- aes.Mode = CipherMode.CBC;
- aes.Padding = PaddingMode.PKCS7;
+ var aes = new AesManaged
+ {
+ BlockSize = 128,
+ Mode = CipherMode.CBC,
+ Padding = PaddingMode.PKCS7
+ };
return aes;
}

MODIFY
WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/DataEncode.cs
WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/DataEncode.cs
@@ -44,9 +44,11 @@ namespace Gma.QrCodeNet.Encoding.DataEncodation
throw new ArgumentException("datacodewords num of bytes not equal to NumDataBytes for current version");
}
- EncodationStruct encStruct = new EncodationStruct(vcStruct);
- encStruct.Mode = recognitionResult.Mode;
- encStruct.DataCodewords = dataCodewords;
+ var encStruct = new EncodationStruct(vcStruct)
+ {
+ Mode = recognitionResult.Mode,
+ DataCodewords = dataCodewords
+ };
return encStruct;
}
@@ -82,9 +84,11 @@ namespace Gma.QrCodeNet.Encoding.DataEncodation
throw new ArgumentException("datacodewords num of bytes not equal to NumDataBytes for current version");
}
- EncodationStruct encStruct = new EncodationStruct(vcStruct);
- encStruct.Mode = Mode.EightBitByte;
- encStruct.DataCodewords = dataCodewords;
+ var encStruct = new EncodationStruct(vcStruct)
+ {
+ Mode = Mode.EightBitByte,
+ DataCodewords = dataCodewords
+ };
return encStruct;
}

[skip ci] Use object initializer