diff --git a/src/rgen/Microsoft.Macios.Generator/DataModel/Parameter.Generator.cs b/src/rgen/Microsoft.Macios.Generator/DataModel/Parameter.Generator.cs
new file mode 100644
index 00000000000..839bba52667
--- /dev/null
+++ b/src/rgen/Microsoft.Macios.Generator/DataModel/Parameter.Generator.cs
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+namespace Microsoft.Macios.Generator.DataModel;
+
+readonly partial struct Parameter {
+
+ public enum VariableType {
+ Handle,
+ NSArray,
+ BlockLiteral,
+ PrimitivePointer,
+ }
+
+ ///
+ /// Returns the name of the aux variable that would have needed for the given parameter. Use the
+ /// variable type to name it.
+ ///
+ /// The type of aux variable.
+ /// The name of the aux variable to use.
+ public string? GetNameForVariableType (VariableType variableType)
+ => variableType switch {
+ VariableType.Handle => $"{Name}__handle__",
+ VariableType.NSArray => $"nsa_{Name}",
+ VariableType.BlockLiteral => $"block_ptr_{Name}",
+ VariableType.PrimitivePointer => $"converted_{Name}",
+ _ => null
+ };
+}
diff --git a/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ParameterTests.cs b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ParameterTests.cs
new file mode 100644
index 00000000000..fbc2af9f32e
--- /dev/null
+++ b/tests/rgen/Microsoft.Macios.Generator.Tests/DataModel/ParameterTests.cs
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+using System.Collections;
+using System.Collections.Generic;
+using Microsoft.Macios.Generator.DataModel;
+using Xunit;
+using static Microsoft.Macios.Generator.Tests.TestDataFactory;
+
+namespace Microsoft.Macios.Generator.Tests.DataModel;
+
+public class ParameterTests {
+
+ class TestDataGetVariableName : IEnumerable