From ca36414f03324c4f0daa2b32124e6f00dac5796e Mon Sep 17 00:00:00 2001 From: Yoganand Rajasekaran Date: Sun, 10 Nov 2024 20:51:40 -0800 Subject: [PATCH] Renamed to CustomProcedureFactory --- libs/server/Custom/CustomCommandManagerSession.cs | 2 +- libs/server/Custom/CustomProcedureWrapper.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/server/Custom/CustomCommandManagerSession.cs b/libs/server/Custom/CustomCommandManagerSession.cs index 342111e66a..f2adf2f06e 100644 --- a/libs/server/Custom/CustomCommandManagerSession.cs +++ b/libs/server/Custom/CustomCommandManagerSession.cs @@ -27,7 +27,7 @@ public CustomProcedure GetCustomProcedure(int id, RespServerSession respServerSe if (sessionCustomProcMap[id] == null) { var entry = customCommandManager.customProcedureMap[id] ?? throw new GarnetException($"Custom procedure {id} not found"); - sessionCustomProcMap[id] = entry.CustomProcedure(); + sessionCustomProcMap[id] = entry.CustomProcedureFactory(); sessionCustomProcMap[id].respServerSession = respServerSession; } diff --git a/libs/server/Custom/CustomProcedureWrapper.cs b/libs/server/Custom/CustomProcedureWrapper.cs index 899349b135..fa7b1e2349 100644 --- a/libs/server/Custom/CustomProcedureWrapper.cs +++ b/libs/server/Custom/CustomProcedureWrapper.cs @@ -27,22 +27,22 @@ class CustomProcedureWrapper public readonly string NameStr; public readonly byte[] Name; public readonly byte Id; - public readonly Func CustomProcedure; + public readonly Func CustomProcedureFactory; - internal CustomProcedureWrapper(string name, byte id, Func customProcedure, CustomCommandManager customCommandManager) + internal CustomProcedureWrapper(string name, byte id, Func customProcedureFactory, CustomCommandManager customCommandManager) { if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name)); - if (customProcedure == null) - throw new ArgumentNullException(nameof(customProcedure)); + if (customProcedureFactory == null) + throw new ArgumentNullException(nameof(customProcedureFactory)); Debug.Assert(customCommandManager != null); NameStr = name.ToUpperInvariant(); Name = System.Text.Encoding.ASCII.GetBytes(NameStr); Id = id; - CustomProcedure = customProcedure; + CustomProcedureFactory = customProcedureFactory; } } } \ No newline at end of file