fix(core): pass name of null param
This commit is contained in:
@@ -10,10 +10,10 @@ public sealed class Institution : Entity
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Institution From(string name, InstitutionMetadata metadata)
|
public static Institution From(string? name, InstitutionMetadata metadata)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(name);
|
ArgumentNullException.ThrowIfNull(name, nameof(name));
|
||||||
ArgumentNullException.ThrowIfNull(metadata);
|
ArgumentNullException.ThrowIfNull(metadata, nameof(metadata));
|
||||||
|
|
||||||
return new Institution()
|
return new Institution()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public sealed class RefreshToken : Entity
|
|||||||
|
|
||||||
public static RefreshToken From(User user, string token, DateTimeOffset expiresAt)
|
public static RefreshToken From(User user, string token, DateTimeOffset expiresAt)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(user);
|
ArgumentNullException.ThrowIfNull(user, nameof(user));
|
||||||
|
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ public sealed class User : Entity
|
|||||||
|
|
||||||
public static User From(string username, string hashedPassword, EncryptedDataKey encryptedDataKey)
|
public static User From(string username, string hashedPassword, EncryptedDataKey encryptedDataKey)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(username);
|
ArgumentNullException.ThrowIfNull(username, nameof(username));
|
||||||
ArgumentNullException.ThrowIfNull(hashedPassword);
|
ArgumentNullException.ThrowIfNull(hashedPassword, nameof(hashedPassword));
|
||||||
ArgumentNullException.ThrowIfNull(encryptedDataKey);
|
ArgumentNullException.ThrowIfNull(encryptedDataKey, nameof(encryptedDataKey));
|
||||||
|
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
@@ -39,14 +39,14 @@ public sealed class User : Entity
|
|||||||
|
|
||||||
public void AddRefreshToken(RefreshToken refreshToken)
|
public void AddRefreshToken(RefreshToken refreshToken)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(refreshToken);
|
ArgumentNullException.ThrowIfNull(refreshToken, nameof(refreshToken));
|
||||||
|
|
||||||
_refreshTokens.Add(refreshToken);
|
_refreshTokens.Add(refreshToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddInstitution(Institution institution)
|
public void AddInstitution(Institution institution)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(institution);
|
ArgumentNullException.ThrowIfNull(institution, nameof(institution));
|
||||||
|
|
||||||
_institutions.Add(institution);
|
_institutions.Add(institution);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ public sealed record EncryptedDataKey
|
|||||||
|
|
||||||
public static EncryptedDataKey From(string keyIdUsed, string encryptedKey)
|
public static EncryptedDataKey From(string keyIdUsed, string encryptedKey)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(keyIdUsed);
|
ArgumentNullException.ThrowIfNull(keyIdUsed, nameof(keyIdUsed));
|
||||||
ArgumentNullException.ThrowIfNull(encryptedKey);
|
ArgumentNullException.ThrowIfNull(encryptedKey, nameof(encryptedKey));
|
||||||
|
|
||||||
return new(keyIdUsed, encryptedKey);
|
return new(keyIdUsed, encryptedKey);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ public sealed record KeyRingEntry
|
|||||||
|
|
||||||
public static KeyRingEntry From(string keyId, string key)
|
public static KeyRingEntry From(string keyId, string key)
|
||||||
{
|
{
|
||||||
ArgumentNullException.ThrowIfNull(keyId);
|
ArgumentNullException.ThrowIfNull(keyId, nameof(keyId));
|
||||||
ArgumentNullException.ThrowIfNull(key);
|
ArgumentNullException.ThrowIfNull(key, nameof(key));
|
||||||
|
|
||||||
return new(keyId, key);
|
return new(keyId, key);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user