diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs index e18bae72a5..0b6c90ab2a 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/ConfigurationExtensions.cs @@ -5,7 +5,7 @@ namespace Microsoft.Agents.AI.Workflows; /// /// Provides extensions methods for creating objects /// -public static class ConfigurationExtensions +internal static class ConfigurationExtensions { /// /// Creates a new configuration that treats the subject as its base type, allowing configuration to be applied at diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/Configured.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/Configured.cs index 3f876926be..6ca580ba05 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/Configured.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/Configured.cs @@ -8,7 +8,7 @@ namespace Microsoft.Agents.AI.Workflows; /// /// Provides methods for creating instances. /// -public static class Configured +internal static class Configured { /// /// Creates a instance from an existing subject instance. @@ -53,7 +53,7 @@ public static class Configured /// A factory to intantiate the subject when desired. /// The unique identifier for the configured subject. /// -public class Configured(Func> factoryAsync, string id, object? raw = null) +internal class Configured(Func> factoryAsync, string id, object? raw = null) { /// /// Gets the raw representation of the configured object, if any. @@ -66,14 +66,14 @@ public class Configured(Func> fact public string Id => id; /// - /// Gets the factory function to create an instance of given a . + /// Gets the factory function to create an instance of given a . /// - public Func> FactoryAsync => factoryAsync; + public Func> FactoryAsync => factoryAsync; /// /// The configuration for this configured instance. /// - public Config Configuration => new(this.Id); + public ExecutorConfig Configuration => new(this.Id); /// /// Gets a "partially" applied factory function that only requires no parameters to create an instance of @@ -91,7 +91,7 @@ public class Configured(Func> fact /// The unique identifier for the configured subject. /// Additional configuration options for the subject. /// -public class Configured(Func, string, ValueTask> factoryAsync, string id, TOptions? options = default, object? raw = null) +internal class Configured(Func, string, ValueTask> factoryAsync, string id, TOptions? options = default, object? raw = null) { /// /// The raw representation of the configured object, if any. @@ -109,14 +109,14 @@ public class Configured(Func, string, Value public TOptions? Options => options; /// - /// Gets the factory function to create an instance of given a . + /// Gets the factory function to create an instance of given a . /// - public Func, string, ValueTask> FactoryAsync => factoryAsync; + public Func, string, ValueTask> FactoryAsync => factoryAsync; /// /// The configuration for this configured instance. /// - public Config Configuration => new(this.Id, this.Options); + public ExecutorConfig Configuration => new(this.Id, this.Options); /// /// Gets a "partially" applied factory function that only requires no parameters to create an instance of @@ -124,11 +124,11 @@ public class Configured(Func, string, Value /// internal Func> BoundFactoryAsync => (sessionId) => this.CreateValidatingMemoizedFactory()(this.Configuration, sessionId); - private Func> CreateValidatingMemoizedFactory() + private Func> CreateValidatingMemoizedFactory() { return FactoryAsync; - async ValueTask FactoryAsync(Config configuration, string sessionId) + async ValueTask FactoryAsync(ExecutorConfig configuration, string sessionId) { if (this.Id != configuration.Id) { diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.cs index a0170e7757..afca74af5b 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorBindingExtensions.cs @@ -113,7 +113,7 @@ public static class ExecutorBindingExtensions /// An id for the executor to be instantiated. /// An optional parameter specifying the options. /// An instance that resolves to the result of the factory call when messages get sent to it. - public static ExecutorBinding BindExecutor(this Func, string, ValueTask> factoryAsync, string id, TOptions? options = null) + public static ExecutorBinding BindExecutor(this Func, string, ValueTask> factoryAsync, string id, TOptions? options = null) where TExecutor : Executor where TOptions : ExecutorOptions { @@ -139,7 +139,7 @@ public static class ExecutorBindingExtensions /// An instance that resolves to the result of the factory call when messages get sent to it. [Obsolete("Use BindExecutor() instead")] [EditorBrowsable(EditorBrowsableState.Never)] - public static ExecutorBinding ConfigureFactory(this Func, string, ValueTask> factoryAsync, string id, TOptions? options = null) + public static ExecutorBinding ConfigureFactory(this Func, string, ValueTask> factoryAsync, string id, TOptions? options = null) where TExecutor : Executor where TOptions : ExecutorOptions => factoryAsync.BindExecutor(id, options); diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/Config.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorConfig.cs similarity index 88% rename from dotnet/src/Microsoft.Agents.AI.Workflows/Config.cs rename to dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorConfig.cs index 09792d2a64..48bfd12bb9 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/Config.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/ExecutorConfig.cs @@ -6,7 +6,7 @@ namespace Microsoft.Agents.AI.Workflows; /// Represents a configuration for an object with a string identifier. For example, object. /// /// A unique identifier for the configurable object. -public class Config(string id) +public class ExecutorConfig(string id) { /// /// Gets a unique identifier for the configurable object. @@ -23,7 +23,7 @@ public class Config(string id) /// The type of options for the configurable object. /// A unique identifier for the configurable object. /// The options for the configurable object. -public class Config(string id, TOptions? options = default) : Config(id) +public class ExecutorConfig(string id, TOptions? options = default) : ExecutorConfig(id) { /// /// Gets the options for the configured object.