Skip to content

Commit e912c84

Browse files
authored
⚜️ small code improvements
1 parent f97fe4e commit e912c84

File tree

2 files changed

+216
-211
lines changed

2 files changed

+216
-211
lines changed
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
namespace ServiceControl.Recoverability
1+
namespace ServiceControl.Recoverability;
2+
3+
using System;
4+
5+
class ErrorQueueNameCache
26
{
3-
using System;
7+
string resolvedErrorAddress;
48

5-
class ErrorQueueNameCache
9+
public string ResolvedErrorAddress
610
{
7-
string resolvedErrorAddress;
8-
9-
public string ResolvedErrorAddress
11+
get
1012
{
11-
get
13+
if (string.IsNullOrEmpty(resolvedErrorAddress))
1214
{
13-
if (string.IsNullOrEmpty(resolvedErrorAddress))
14-
{
15-
throw new InvalidOperationException($"{nameof(ResolvedErrorAddress)} is not set. Please set it before accessing.");
16-
}
17-
18-
return resolvedErrorAddress;
15+
throw new InvalidOperationException($"{nameof(ResolvedErrorAddress)} is not set. Please set it before accessing.");
1916
}
20-
set => resolvedErrorAddress = value;
17+
18+
return resolvedErrorAddress;
2119
}
20+
set => resolvedErrorAddress = value;
2221
}
2322
}

0 commit comments

Comments
 (0)