You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ptupitsyn (via GitHub)" <gi...@apache.org> on 2025/05/27 09:33:57 UTC

[PR] IGNITE-25358 .NET: Fix ReceiverDescriptor generic parameters [ignite-3]

ptupitsyn opened a new pull request, #5903:
URL: https://github.com/apache/ignite-3/pull/5903

   (no comment)


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25358 .NET: Fix ReceiverDescriptor generic parameters [ignite-3]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #5903:
URL: https://github.com/apache/ignite-3/pull/5903#discussion_r2108715382


##########
modules/platforms/dotnet/Apache.Ignite/Table/ReceiverDescriptor.cs:
##########
@@ -73,6 +74,45 @@ private static ReceiverExecutionOptions EnsureDotNetExecutor(ReceiverExecutionOp
             options with { ExecutorType = JobExecutorType.DotNetSidecar };
 }
 
+/// <summary>
+/// Stream receiver descriptor with a result type.
+/// </summary>
+/// <param name="ReceiverClassName">Java class name of the streamer receiver to execute.</param>
+/// <param name="DeploymentUnits">Deployment units.</param>
+/// <param name="Options">Execution options.</param>
+/// <typeparam name="TItem">Streamer item type.</typeparam>
+/// <typeparam name="TArg">Argument type.</typeparam>
+/// <typeparam name="TResult">Result type.</typeparam>
+[SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:File may only contain a single type", Justification = "Reviewed.")]
+public sealed record ReceiverDescriptor<TItem, TArg, TResult>(
+    string ReceiverClassName,
+    IEnumerable<DeploymentUnit>? DeploymentUnits = null,
+    ReceiverExecutionOptions? Options = null)
+{
+    /// <summary>
+    /// Initializes a new instance of the <see cref="ReceiverDescriptor{TItem,TArg,TResult}"/> class.
+    /// </summary>
+    /// <param name="type">Receiver type.</param>
+    /// <param name="deploymentUnits">Deployment units.</param>
+    /// <param name="options">Options.</param>
+    public ReceiverDescriptor(
+        Type type,
+        IEnumerable<DeploymentUnit>? deploymentUnits = null,
+        ReceiverExecutionOptions? options = null)
+        : this(
+            type.AssemblyQualifiedName ?? throw new ArgumentException("Type has null AssemblyQualifiedName: " + type),

Review Comment:
   Consider using string interpolation instead of string concatenation in the exception message for improved readability, e.g. $"Type has null AssemblyQualifiedName: {type}".
   ```suggestion
               type.AssemblyQualifiedName ?? throw new ArgumentException($"Type has null AssemblyQualifiedName: {type}"),
   ```



-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-25358 .NET: Fix ReceiverDescriptor generic parameters [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn merged PR #5903:
URL: https://github.com/apache/ignite-3/pull/5903


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org