Skip to content

Commit 2739495

Browse files
committed
improve performance
1 parent 64d4add commit 2739495

5 files changed

Lines changed: 19 additions & 44 deletions

File tree

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<RepositoryUrl>https://github.com/managedcode/Communication</RepositoryUrl>
1818
<PackageProjectUrl>https://github.com/managedcode/Communication</PackageProjectUrl>
1919
<Product>Managed Code - Communication</Product>
20-
<Version>2.0.21</Version>
21-
<PackageVersion>2.0.21</PackageVersion>
20+
<Version>2.0.22</Version>
21+
<PackageVersion>2.0.22</PackageVersion>
2222

2323
</PropertyGroup>
2424
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">

ManagedCode.Communication.Orleans/CollectionResultTSurrogate.cs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,13 @@ public CollectionResultTSurrogate(bool isSuccess, T[]? collection, int pageNumbe
2121
InvalidObject = invalidObject;
2222
}
2323

24-
[Id(0)]
25-
public bool IsSuccess { get; set; }
26-
27-
[Id(1)]
28-
public T[]? Collection { get; set; }
29-
30-
[Id(2)]
31-
public int PageNumber { get; set; }
32-
33-
[Id(3)]
34-
public int PageSize { get; set; }
35-
36-
[Id(4)]
37-
public int TotalItems { get; set; }
38-
39-
[Id(5)]
40-
public Error[]? Errors { get; set; }
41-
42-
[Id(6)]
43-
public Dictionary<string, string>? InvalidObject { get; set; }
24+
[Id(0)] public bool IsSuccess;
25+
[Id(1)] public T[]? Collection;
26+
[Id(2)] public int PageNumber;
27+
[Id(3)] public int PageSize;
28+
[Id(4)] public int TotalItems;
29+
[Id(5)] public Error[]? Errors;
30+
[Id(6)] public Dictionary<string, string>? InvalidObject;
4431
}
4532

4633
// This is a converter which converts between the surrogate and the foreign type.

ManagedCode.Communication.Orleans/ErrorSurrogate.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,9 @@ public ErrorSurrogate(Exception? exception, string message, string? errorCode =
1515
Message = message;
1616
}
1717

18-
[Id(0)]
19-
public string? ErrorCode { get; set; }
20-
21-
[Id(1)]
22-
public string Message { get; set; }
23-
24-
[Id(2)]
25-
public Exception? Exception { get; set; }
18+
[Id(0)] public string? ErrorCode;
19+
[Id(1)] public string Message;
20+
[Id(2)] public Exception? Exception;
2621
}
2722

2823
// This is a converter which converts between the surrogate and the foreign type.

ManagedCode.Communication.Orleans/ResultSurrogate.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@ public ResultSurrogate(bool isSuccess, Error[]? errors, Dictionary<string, strin
1515
InvalidObject = invalidObject;
1616
}
1717

18-
[Id(0)]
19-
public bool IsSuccess { get; set; }
18+
[Id(0)] public bool IsSuccess;
2019

21-
[Id(1)]
22-
public Error[]? Errors { get; set; }
20+
[Id(1)] public Error[]? Errors;
2321

24-
[Id(2)]
25-
public Dictionary<string, string>? InvalidObject { get; set; }
22+
[Id(2)] public Dictionary<string, string>? InvalidObject;
2623
}
2724

2825
// This is a converter which converts between the surrogate and the foreign type.

ManagedCode.Communication.Orleans/ResultTSurrogate.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,13 @@ public ResultTSurrogate(bool isSuccess, T? value, Error[]? errors, Dictionary<st
1616
InvalidObject = invalidObject;
1717
}
1818

19-
[Id(0)]
20-
public bool IsSuccess { get; set; }
19+
[Id(0)] public bool IsSuccess;
2120

22-
[Id(1)]
23-
public Error[]? Errors { get; set; }
21+
[Id(1)] public Error[]? Errors;
2422

25-
[Id(2)]
26-
public Dictionary<string, string>? InvalidObject { get; set; }
23+
[Id(2)] public Dictionary<string, string>? InvalidObject;
2724

28-
[Id(3)]
29-
public T? Value { get; set; }
25+
[Id(3)] public T? Value;
3026
}
3127

3228
// This is a converter which converts between the surrogate and the foreign type.

0 commit comments

Comments
 (0)