ptupitsyn commented on code in PR #10157:
URL: https://github.com/apache/ignite/pull/10157#discussion_r941375953
##########
modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs:
##########
@@ -231,5 +232,43 @@ public static int EncodePeekModes(CachePeekMode[] modes,
out bool hasPlatformCac
return res & ~platformCache;
}
+
+ /// <summary>
+ /// Converts integer code representation to CacheMode.
+ /// </summary>
+ /// <param name="code">Integer representation.</param>
+ /// <returns>Cache mode.</returns>
+ /// <exception cref="NotSupportedException">If fails.</exception>
+ public static CacheMode CacheModeFromInt(int code)
Review Comment:
Please remove those methods. We should preserve ordinal values for the
`CacheMode` enum instead like this:
```
public enum CacheMode
{
Replicated = 1,
Partitioned = 2
}
```
##########
modules/platforms/dotnet/Apache.Ignite.Core/Impl/IgniteUtils.cs:
##########
@@ -231,5 +232,43 @@ public static int EncodePeekModes(CachePeekMode[] modes,
out bool hasPlatformCac
return res & ~platformCache;
}
+
+ /// <summary>
+ /// Converts integer code representation to CacheMode.
+ /// </summary>
+ /// <param name="code">Integer representation.</param>
+ /// <returns>Cache mode.</returns>
+ /// <exception cref="NotSupportedException">If fails.</exception>
+ public static CacheMode CacheModeFromInt(int code)
Review Comment:
In particular, this is important to avoid breaking changes in thin client
protocol.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]