### Examples property Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Legacy/McpTool Gets or sets examples of how to use the tool. ```csharp public System.Collections.Generic.List Examples { get; set; } ``` -------------------------------- ### Start Source: https://easyaf.dev/simplemessagebus/api-reference/CloudNimble/SimpleMessageBus/Dispatch/IndexedDb/IndexedDbQueueProcessor Syntax for the Start method. ```csharp public System.Threading.Tasks.Task Start(System.Threading.CancellationToken cancellationToken = null) ``` -------------------------------- ### Preview Docs Locally with Mintlify Source: https://easyaf.dev/quickstart Install the Mintlify CLI globally, navigate to your docs project, and start the local dev server. Open http://localhost:3000 to preview docs with hot-reload. ```bash npm i mint -g cd {SolutionName}.Docs mint dev ``` -------------------------------- ### Start Method Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/Merlin/Operation Starts the Operation, looping through each step until it is finished or until a step fails. ```csharp public void Start() ``` -------------------------------- ### FilePath Example Source: https://easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/ReadToolFileInfo Example of an absolute file path. ```csharp "C:\\Users\\Developer\\Projects\\MyApp\\src\\Program.cs" ``` -------------------------------- ### Example: Using TursoPreparedStatement Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/TursoDb/TursoPreparedStatement An example demonstrating how to prepare and execute a query using TursoPreparedStatement. ```APIDOC ## Example: Using TursoPreparedStatement ### Description This example shows how to prepare a SQL statement and execute it multiple times with different parameters. ### Syntax ```csharp var statement = Database.Prepare("SELECT * FROM users WHERE age > ?"); var youngUsers = await statement.QueryAsync(18); var olderUsers = await statement.QueryAsync(65); ``` ### Parameters - `TResult` - The type of result returned by queries. ### Remarks The `QueryAsync` method is the intended way to execute the prepared statement. However, this documentation does not provide details on the `QueryAsync` method itself. ``` -------------------------------- ### EdmxSwapCommand Usage Example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Commands/EdmxSwapCommand Example command to execute the EDMX provider swap for a specified path. ```csharp dotnet easyaf edmx swap --path "C:\MySolution" ``` -------------------------------- ### Mocking example with Mock Source: https://easyaf.dev/breakdance Shows a typical mocking setup using Moq to mock IUserService. Highlights the limitations of mocking: tests may pass but not reflect real behavior or edge cases. ```csharp var mockService = new Mock(); mockService.Setup(x => x.GetUser(It.IsAny())) .Returns(new User { Id = 1, Name = "Test" }); // Does this match reality? // What about edge cases? // API changed last week? var result = await controller.GetUser(1); Assert.IsNotNull(result); // Passes... but means nothing ``` -------------------------------- ### Content Example Source: https://easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/ReadToolFileInfo Example content string showing formatted output with line numbers. ```csharp " 1→using System;\n 2→using System.Text.Json;\n 3→\n 4→namespace MyApp" ``` -------------------------------- ### Install EasyAF CLI (Previews) Source: https://easyaf.dev/quickstart Installs the latest prerelease EasyAF CLI globally using the --prerelease flag. ```bash dotnet tool install EasyAF --global --prerelease ``` -------------------------------- ### IncludeExamples Property Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Legacy/Generators/CrudToolGenerationOptions Gets or sets a value indicating whether to include examples in tool descriptions. ```csharp public bool IncludeExamples { get; set; } ``` -------------------------------- ### Example .http file with variables and requests Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpFile Example of a complete .http file with file-level variables and multiple requests separated by ###. ```csharp @baseUrl = https://api.example.com ### Get all users GET {{baseUrl}}/users ### Create user POST {{baseUrl}}/users Content-Type: application/json {"name": "John"} ``` -------------------------------- ### EnvironmentValue Configuration Examples Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/EnvironmentValue Examples showing a simple string value versus a provider-based secret configuration. ```csharp // Simple string value { "ApiKey": "dev-key-123" } // Provider-based secret { "ApiKey": { "provider": "AzureKeyVault", "secretName": "ProdApiKey", "resourceId": "/subscriptions/.../vaults/my-vault" } } ``` -------------------------------- ### Example http-client.env.json configuration Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpEnvironment Example JSON configuration for http-client.env.json, showing shared variables and environment-specific values for dev and prod. ```json { "$shared": { "ApiVersion": "v2" }, "dev": { "HostAddress": "https://localhost:5001" }, "prod": { "HostAddress": "https://api.example.com" } } ``` -------------------------------- ### RatioPerDay method syntax and example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/RatioInterval Declares the RatioPerDay method and shows its usage. The example creates a RatioInterval with a ratio of 0.75 and a frequency of 6 hours, then calls RatioPerDay() to get the total ratio value per day. The comment explains the calculation: 0.75 * 4 = 3.0 ratio per day. ```csharp public System.Decimal RatioPerDay() ``` ```csharp // 0.75 ratio every 6 hours = 0.75 * 4 = 3.0 ratio per day var interval = new RatioInterval(0.75, 6, IntervalType.Hours); decimal ratioPerDay = interval.RatioPerDay(); ``` -------------------------------- ### PerHour Example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/MoneyInterval Example usage of the PerHour method to calculate widget production rate. ```csharp // Widget production: 1 widget every 1.5 hours, total from 100 units of material per hour var production = new Interval(1.5, IntervalType.Hours); decimal totalPerHour = production.PerHour(100); // 66.67 widgets per hour (1/1.5 * 100) ``` -------------------------------- ### Request snapshot example: users.http Source: https://easyaf.dev/breakdance/guides/web/snapshots/index Shows a .http file with request snapshots for getting all users and a specific user. Uses the @baseUrl variable and demonstrates chaining requests and environment-specific variables. ```http @baseUrl = https://api.example.com ### Get all users GET {{baseUrl}}/users Accept: application/json ### Get specific user GET {{baseUrl}}/users/123 Accept: application/json ``` -------------------------------- ### LoadFromFile example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/EnvironmentLoader Example usage of LoadFromFile. It loads the environment from http-client.env.json and iterates over the environment names, printing each one. ```csharp var loader = new EnvironmentLoader(); var environment = loader.LoadFromFile("http-client.env.json"); foreach (var envName in environment.Environments.Keys) { Console.WriteLine($"Environment: {envName}"); } ``` -------------------------------- ### RatioPerHour method syntax and example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/RatioInterval Declares the RatioPerHour method and shows its usage. The example creates a RatioInterval with a ratio of 0.7 and a frequency of 1.5 hours, then calls RatioPerHour() to get the total ratio value per hour. The comment explains the calculation: 0.7 * (60/90) = 0.467 ratio per hour. ```csharp public System.Decimal RatioPerHour() ``` ```csharp // 0.7 ratio every 1.5 hours = 0.7 * (60/90) = 0.467 ratio per hour var interval = new RatioInterval(0.7, 1.5, IntervalType.Hours); decimal ratioPerHour = interval.RatioPerHour(); ``` -------------------------------- ### Install SimpleMessageBus for Development and Testing Source: https://easyaf.dev/simplemessagebus/installation Use these commands to install the required packages for development and testing scenarios. ```bash dotnet add package SimpleMessageBus.Publish dotnet add package SimpleMessageBus.Dispatch.FileSystem dotnet add package SimpleMessageBus.Breakdance ``` -------------------------------- ### Manual HttpClient Setup Source: https://easyaf.dev/breakdance/guides/web/aspnet-classic-rest Demonstrates the manual creation of HttpConfiguration, HttpServer, and HttpClient, which is equivalent to the internal logic of GetTestableHttpClient(). ```csharp // These three lines are equivalent to calling WebApiTestHelpers.GetTestableHttpClient() var config = new HttpConfiguration(); config.MapHttpAttributeRoutes(); config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; var server = new HttpServer(config); var client = new HttpClient(server); ``` -------------------------------- ### ResolveDynamicVariables method syntax and example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/VariableResolver Resolves dynamic variables like $datetime, $randomInt, $timestamp, etc. The example resolves a GUID placeholder and shows a sample GUID result. ```csharp public string ResolveDynamicVariables(string input) ``` ```csharp var resolver = new VariableResolver(); var result = resolver.ResolveDynamicVariables("ID: {{$guid}}"); // result = "ID: 550e8400-e29b-41d4-a716-446655440000" (example GUID) ``` -------------------------------- ### WithODataTools Usage Example Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/Extensions/DependencyInjection/IMcpServerBuilder Example showing how to chain the WithODataTools method when configuring an MCP server. ```csharp services.AddMcpServer() .WithODataTools() .WithStdioTransport(); ``` -------------------------------- ### IIdentifiable Implementation Examples Source: https://easyaf.dev/guides/table-design Examples showing Guid-based and integer-based identity implementations. Guid is recommended for distributed systems. ```csharp // Guid-based identity (recommended) public class Product : IIdentifiable { public Guid Id { get; set; } public string Name { get; set; } } // Integer-based identity public class Category : IIdentifiable { public int Id { get; set; } public string Name { get; set; } } ``` -------------------------------- ### TestSetup() Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Blazor/BlazorBreakdanceTestBase Sets up the test context and registers the test host services as a fallback service provider. ```APIDOC ## TestSetup() ### Description Properly instantiates the BlazorBreakdanceTestBase.BUnitTestContext and registers the BreakdanceTestBase.TestHost's Services as a "fallback" IServiceProvider. ### Syntax ```csharp public override void TestSetup() ``` ``` -------------------------------- ### GetResolvedVariables usage example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/EnvironmentLoader Example demonstrating how to load an environment and resolve variables for the 'dev' environment. ```csharp var loader = new EnvironmentLoader(); var env = loader.LoadFromFile("http-client.env.json"); var devVars = loader.GetResolvedVariables(env, "dev"); // devVars contains merged $shared and dev-specific variables ``` -------------------------------- ### PerMonth Usage Example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/Interval Example of calculating total widget production per month based on a 3-day interval and a quantity of 200 units. ```csharp // Widget production: 1 widget every 3 days, total from 200 units of material per month var production = new Interval(3, IntervalType.Days); decimal totalPerMonth = production.PerMonth(200); // 2000 widgets per month (10 * 200) ``` -------------------------------- ### Example: dotnet easyaf edmx --help Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Commands/EdmxRootCommand Displays help for the edmx root command. ```csharp dotnet easyaf edmx --help ``` -------------------------------- ### Title property syntax and example Source: https://easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/WebSearchResultItem Gets or sets the title of the search result. The example shows a typical title value. The property is of type string. ```csharp public string Title { get; set; } ``` ```csharp "Claude Code Documentation - Anthropic" ``` -------------------------------- ### Services Property Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Azurite/AzuriteConfiguration Gets or sets which services to start. Defaults to AzuriteServiceType.All. ```csharp public CloudNimble.Breakdance.Azurite.AzuriteServiceType Services { get; set; } ``` -------------------------------- ### PerWeek Usage Example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/Interval Example of calculating total widget production per week based on a 2-day interval and a quantity of 50 units. ```csharp // Widget production: 1 widget every 2 days, total from 50 units of material per week var production = new Interval(2, IntervalType.Days); decimal totalPerWeek = production.PerWeek(50); // 175 widgets per week (3.5 * 50) ``` -------------------------------- ### TimerStarted Property Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/Threading/DelayDispatcher Gets the UTC DateTime when the internal timer was started. ```csharp public System.DateTime TimerStarted { get; internal set; } ``` -------------------------------- ### Add EasyAF Documentation Project with Options Source: https://easyaf.dev/quickstart Shows how to specify a different documentation type (DocFX) or use the latest prerelease SDK version. ```bash # Use a different documentation type dotnet docs add --type DocFX # Use the latest prerelease SDK version dotnet docs add --prerelease ``` -------------------------------- ### Example Implementation of IMessage Source: https://easyaf.dev/simplemessagebus/api-reference/CloudNimble/SimpleMessageBus/Core/IMessage Provides an example class implementing the IMessage interface with an Id property initialized to a new Guid, along with OrderNumber, TotalAmount, and CreatedAt properties. ```csharp public class OrderCreatedMessage : IMessage { public Guid Id { get; set; } = Guid.NewGuid(); public string OrderNumber { get; set; } public decimal TotalAmount { get; set; } public DateTime CreatedAt { get; set; } } ``` -------------------------------- ### Basic Entity Foundation Source: https://easyaf.dev/guides/table-design Always start entity definitions by implementing IIdentifiable. ```csharp public class MyEntity : IIdentifiable { public Guid Id { get; set; } // Add more interfaces as needed } ``` -------------------------------- ### StartLine Property Source: https://easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/ReadToolFileInfo Gets or sets the starting line number (1-based) of the content in this response. ```csharp public int StartLine { get; set; } ``` -------------------------------- ### Variables Property and Example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpRequest Gets or sets request-level variables that override file-level variables. ```csharp public System.Collections.Generic.Dictionary Variables { get; set; } ``` ```csharp @baseUrl = https://override.example.com GET {{baseUrl}}/users ``` -------------------------------- ### Add EasyAF Documentation Project Source: https://easyaf.dev/quickstart Creates a new documentation project in the current solution folder. By default, it uses Mintlify with the latest stable SDK. ```bash dotnet docs add ``` -------------------------------- ### Url property syntax and example Source: https://easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Responses/WebSearchResultItem Gets or sets the URL of the search result. The example shows a typical URL value. The URL can be used with WebFetchToolInput to retrieve and process the page content. ```csharp public string Url { get; set; } ``` ```csharp "https://docs.anthropic.com/claude-code/overview" ``` -------------------------------- ### IncludeExamples Property Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Legacy/Generators/QueryToolGenerationOptions Gets or sets a value indicating whether to include examples in tool descriptions. ```APIDOC ## IncludeExamples Property ### Description Gets or sets a value indicating whether to include examples in tool descriptions. ### Syntax ```csharp public bool IncludeExamples { get; set; } ``` ### Property Value Type: `bool` `true` to include examples; otherwise, `false`. ``` -------------------------------- ### Parse example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/EnvironmentLoader Example usage of Parse. It creates an EnvironmentLoader, defines a JSON string with shared and dev environments, and parses it into a DotHttpEnvironment. ```csharp var loader = new EnvironmentLoader(); var json = @"{ ""$shared"": { ""ApiVersion"": ""v2"" }, ""dev"": { ""HostAddress"": ""https://localhost:5001"" } }"; var environment = loader.Parse(json); ``` -------------------------------- ### TestSetupAsync Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/DotHttpTestBase Sets up the test environment. ```APIDOC ## TestSetupAsync ### Description Sets up the test environment. ### Method TestSetupAsync ### Parameters None. ### Request Example ```csharp await TestSetupAsync(); ``` ### Response Returns a `System.Threading.Tasks.Task`. ``` -------------------------------- ### Install EasyAF CLI (Major Releases) Source: https://easyaf.dev/quickstart Installs the latest stable EasyAF CLI globally using the dotnet tool command. ```bash dotnet tool install EasyAF --global ``` -------------------------------- ### CorrelationId Usage Example Source: https://easyaf.dev/simplemessagebus/api-reference/CloudNimble/SimpleMessageBus/Core/ITrackable Example showing how to start a new workflow with a new correlation ID and propagate it to subsequent messages. All related messages share the same correlation ID for correlation in logs and monitoring. ```csharp // Starting a new workflow var rootMessage = new OrderCreatedMessage { CorrelationId = Guid.NewGuid() // New workflow starts here }; // All subsequent messages inherit the same correlation ID var paymentMessage = new ProcessPaymentMessage { CorrelationId = rootMessage.CorrelationId // Same workflow }; var shippingMessage = new ArrangeShippingMessage { CorrelationId = rootMessage.CorrelationId // Same workflow }; // Now all three messages can be correlated together in logs and monitoring ``` -------------------------------- ### StartupTimeoutSeconds Property Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Azurite/AzuriteConfiguration Gets or sets the timeout in seconds to wait for Azurite to start. Defaults to 30 seconds. ```csharp public int StartupTimeoutSeconds { get; set; } ``` -------------------------------- ### SetupCommand class syntax Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Commands/SetupCommand Shows the fully qualified name of the SetupCommand class as it appears in the documentation. ```csharp CloudNimble.EasyAF.Tools.Commands.SetupCommand ``` -------------------------------- ### Resolve method syntax and example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/VariableResolver Resolves all variable references in the input string. The example sets a variable and resolves a URL, producing the expected result. ```csharp public string Resolve(string input) ``` ```csharp var resolver = new VariableResolver(); resolver.SetVariable("baseUrl", "https://api.example.com"); var result = resolver.Resolve("GET {{baseUrl}}/users"); // result = "GET https://api.example.com/users" ``` -------------------------------- ### NotStarted property Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/Merlin/OperationStatusDisplay Property of type string. Use to set or get the text displayed when the operation has not started. ```csharp public string NotStarted { get; set; } ``` -------------------------------- ### AddODataMcpCore usage example Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/Extensions/DependencyInjection/IServiceCollection Example of configuring OData MCP core with a base URL from an environment variable, a request timeout, and caching enabled. ```csharp services.AddODataMcpCore(config => { config.ODataService.BaseUrl = Environment.GetEnvironmentVariable("ODATA_URL"); config.ODataService.RequestTimeout = TimeSpan.FromMinutes(5); config.Caching.Enabled = true; }); ``` -------------------------------- ### Target property syntax Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Http/OData/ODataV4Error Gets or sets the target of the particular error, for example the name of the property in error. ```csharp public string Target { get; set; } ``` -------------------------------- ### TablePort property syntax Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Azurite/AzuriteBreakdanceTestBase Property syntax for TablePort, which gets the Table service port number, or null if not started. ```csharp public System.Nullable TablePort { get; } ``` -------------------------------- ### AddConfigurationBase Usage Example Source: https://easyaf.dev/api-reference/Microsoft/Extensions/DependencyInjection/IServiceCollection Example of calling AddConfigurationBase in Program.cs or Startup.cs, showing how to bind a configuration section and inject the configuration as either the specific type or ConfigurationBase. ```csharp // In Program.cs or Startup.cs var myConfig = builder.Services.AddConfigurationBase<MyAppConfiguration>( builder.Configuration, "AppSettings" ); // The configuration can now be injected as either type: // [Inject] public MyAppConfiguration Config { get; set; } // [Inject] public ConfigurationBase BaseConfig { get; set; } ``` -------------------------------- ### QueuePort property syntax Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Azurite/AzuriteBreakdanceTestBase Property syntax for QueuePort, which gets the Queue service port number, or null if not started. ```csharp public System.Nullable QueuePort { get; } ``` -------------------------------- ### AddExample method Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Tools/McpToolDefinition Adds an example to the tool definition. Throws ArgumentException when title is null or whitespace, and ArgumentNullException when input is null. ```csharp public void AddExample(string title, string description, System.Text.Json.JsonDocument input, System.Text.Json.JsonDocument expectedOutput = null) ``` -------------------------------- ### BlobPort property syntax Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Azurite/AzuriteBreakdanceTestBase Property syntax for BlobPort, which gets the Blob service port number, or null if not started. ```csharp public System.Nullable BlobPort { get; } ``` -------------------------------- ### Install SimpleMessageBus for Azure Storage Source: https://easyaf.dev/simplemessagebus/installation Use these commands to install the required packages for ASP.NET Core applications utilizing Azure Storage Queues. ```bash dotnet add package SimpleMessageBus.Publish.Azure dotnet add package SimpleMessageBus.Dispatch.Azure dotnet add package SimpleMessageBus.Hosting ``` -------------------------------- ### TestSetup Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Assemblies/BreakdanceTestBase Method used by test classes to setup the environment. ```APIDOC ## TestSetup ### Description Method used by test classes to setup the environment. ### Syntax ```csharp public virtual void TestSetup() ``` ### Remarks With MSTest, use [TestInitialize]. With NUnit, use [Setup]. With xUnit, good luck: https://xunit.net/docs/shared-context. This method calls BreakdanceTestBase.TestSetupAsync synchronously. ``` -------------------------------- ### Example test class using AzuriteTestBase Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Azurite/AzuriteBreakdanceTestBase Example test class deriving from AzuriteTestBase. It declares its own static AzuriteInstance, overrides the Azurite property, and uses [ClassInitialize] and [ClassCleanup] to start and dispose the instance. The test asserts that BlobEndpoint is not null. ```csharp [TestClass] public class MyTests : AzuriteTestBase { private static AzuriteInstance _azurite; protected override AzuriteInstance Azurite => _azurite; [ClassInitialize] public static async Task ClassInit(TestContext ctx) { _azurite = await CreateAndStartInstanceAsync(new AzuriteConfiguration { Services = AzuriteServiceType.All, InMemoryPersistence = true, Silent = true }); } [ClassCleanup] public static async Task ClassCleanup() { if (_azurite != null) { await _azurite.DisposeAsync(); _azurite = null; } } [TestMethod] public void MyTest() { Assert.IsNotNull(BlobEndpoint); } } ``` -------------------------------- ### RatioPerMinute with quantity usage example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/RatioInterval Shows how to use RatioPerMinute with a quantity, calculating conversions per minute from 1000 leads with a 70% monthly conversion rate. ```csharp // 70% conversion every month, total conversions from 1000 leads per minute var conversion = new RatioInterval(0.70m, 1, IntervalType.Months); decimal conversionsPerMinute = conversion.RatioPerMinute(1000); // ~0.016 conversions per minute ``` -------------------------------- ### GetHttpClient() - Get Users Test Source: https://easyaf.dev/breakdance/guides/web/aspnet-core-rest Use GetHttpClient() to obtain a client connected to the in-memory test server. The default base address is http://localhost/api/test. This example performs a GET request to /users and asserts a successful response with non-empty content. ```csharp [TestMethod] public async Task GetUsers_ReturnsUserList() { // Default base address is http://localhost/api/test var client = GetHttpClient(); var response = await client.GetAsync("/users"); var content = await response.Content.ReadAsStringAsync(); Assert.IsTrue(response.IsSuccessStatusCode); Assert.IsFalse(string.IsNullOrWhiteSpace(content)); } ``` -------------------------------- ### SeparatorTitle Property and Example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpRequest Gets or sets the text appearing after the ### separator. This is used for generating test method names when @name is not specified. ```csharp public string SeparatorTitle { get; set; } ``` ```csharp ### Get All Users GET {{baseUrl}}/users ``` -------------------------------- ### TestSetup Override Method Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/Breakdance/BlazorEssentialsTestBase This method is not supported and will throw a NotSupportedException when called. Use the parameterized TestSetup method instead. ```csharp public override void TestSetup() ``` -------------------------------- ### Comments property syntax Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpRequest Property syntax for the Comments property. Gets or sets comments that appeared before the request, parsed from lines starting with # or //. ```csharp public System.Collections.Generic.List Comments { get; set; } ``` -------------------------------- ### Glob Property Source: https://easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Tools/Inputs/GrepToolInput Gets or sets the glob pattern to filter files. Examples include "*.js" or "*.{ts,tsx}". ```csharp public string Glob { get; set; } ``` -------------------------------- ### Generated Mintlify Project File (Preview 1.1.0-preview.1) Source: https://easyaf.dev/quickstart Example .docsproj file for a Mintlify documentation project using the prerelease SDK version 1.1.0-preview.1. ```xml Mintlify true Folder true false false Unified {solutionName} maple #419AC5 #419AC5 #3CD0E2 ``` -------------------------------- ### Using TursoTransaction Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/TursoDb/TursoTransaction Example demonstrating how to initiate a transaction, perform operations, and handle commit or rollback logic. ```csharp await using var transaction = await Database.BeginTransactionAsync(); try { await Database.Users.AddAsync(user); await Database.Posts.AddAsync(post); await transaction.CommitAsync(); } catch { await transaction.RollbackAsync(); throw; } ``` -------------------------------- ### WorkflowManager Example Using StateMachineEntityManager Source: https://easyaf.dev/guides/business-layer Example workflow class inheriting from StateMachineEntityManager. Demonstrates starting with SetCreatedAsync, moving through custom states via UpdateStateAsync (sort orders 10, 20, 30), completing with SetCompletedAsync, and handling failures with SetFailedAsync including the exception message and stack trace. ```csharp public class WorkflowManager : StateMachineEntityManager { public async Task ProcessWorkflow(WorkflowItem item) { // Start workflow await SetCreatedAsync(item); try { // Move through states await UpdateStateAsync(item, 10); // "In Review" await UpdateStateAsync(item, 20); // "Approved" await UpdateStateAsync(item, 30); // "Processing" // Complete await SetCompletedAsync(item); } catch (Exception ex) { // Handle failure await SetFailedAsync(item, ex.Message, ex.ToString()); } } } ``` -------------------------------- ### BaseUrl property syntax Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Authentication/Models/TargetServiceOptions Gets or sets the base URL of the target service. Requests to URLs starting with this base URL will use this service's delegation configuration. ```csharp public required string BaseUrl { get; set; } ``` -------------------------------- ### StartAsync Method Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Tools/Services/DynamicToolGeneratorService Starts the service and generates dynamic tools asynchronously. ```csharp public System.Threading.Tasks.Task StartAsync(System.Threading.CancellationToken cancellationToken) ``` -------------------------------- ### Validate Configuration at Startup Source: https://easyaf.dev/simplemessagebus/guides/configuration Use Data Annotations and ValidateOnStart to ensure configuration settings meet required constraints during application startup. ```csharp services.Configure( builder.Configuration.GetSection("SimpleMessageBus:Azure")); services.AddOptions() .Configure(builder.Configuration.GetSection("SimpleMessageBus:Azure")) .ValidateDataAnnotations() .ValidateOnStart(); public class AzureStorageOptions { [Required] public string ConnectionString { get; set; } [Required] [RegularExpression(@"^[a-z0-9-]+$")] public string DefaultQueueName { get; set; } [Range(1, 32)] public int MaxConcurrentMessages { get; set; } = 16; } ``` -------------------------------- ### RatioPerWeek with quantity usage example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/RatioInterval Shows how to use RatioPerWeek with a quantity, calculating conversions per week from 50 leads with an 80% conversion every 2 days. ```csharp // 80% conversion every 2 days, total conversions from 50 leads per week var conversion = new RatioInterval(0.80m, 2, IntervalType.Days); decimal conversionsPerWeek = conversion.RatioPerWeek(50); // 140 conversions per week ``` -------------------------------- ### Publish Native Executable for Production Source: https://easyaf.dev/claudeessentials/quickstart Publishes the app as a native executable for faster startup in production. ```bash dotnet publish -c Release ``` -------------------------------- ### api.http file to generated test class example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Generator/DotHttpSourceGenerator Illustrates the transformation from an api.http file containing a GET request to the generated partial test class ApiTests, which extends DotHttpTestBase and contains a test method for the request. ```csharp // Given an api.http file with: // @baseUrl = https://api.example.com // // ### Get all users // # @name GetAllUsers // GET {{baseUrl}}/users // Accept: application/json // // The generator produces ApiTests.g.cs with: // [TestClass] // public partial class ApiTests : DotHttpTestBase // { // [TestMethod] // public async Task GetAllUsers() { ... } // } ``` -------------------------------- ### StartupProject property syntax Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Commands/EdmxGenerateCommand Gets or sets the startup project folder. Property type is string. ```csharp public string StartupProject { get; set; } ``` -------------------------------- ### Reusable Test Fixture for Message Handlers Source: https://easyaf.dev/simplemessagebus/guides/testing Use this fixture to set up a service provider with mocked dependencies and a testable message publisher. It includes OneTimeSetUp, SetUp, and OneTimeTearDown methods, and an example test fixture that inherits from it to test an OrderCreatedHandler. ```csharp public class MessageHandlerTestFixture { public IServiceProvider ServiceProvider { get; private set; } public TestableMessagePublisher TestPublisher { get; private set; } [OneTimeSetUp] public void OneTimeSetUp() { var services = new ServiceCollection(); TestPublisher = new TestableMessagePublisher(); services.AddSingleton(TestPublisher); // Add common test services services.AddLogging(); services.AddSingleton(Mock.Of()); services.AddSingleton(Mock.Of()); services.AddSingleton(Mock.Of()); ServiceProvider = services.BuildServiceProvider(); } [SetUp] public void SetUp() { TestPublisher.Clear(); } [OneTimeTearDown] public void OneTimeTearDown() { ServiceProvider?.Dispose(); } } [TestFixture] public class OrderHandlerTests : MessageHandlerTestFixture { private OrderCreatedHandler _handler; [SetUp] public void SetUp() { base.SetUp(); _handler = new OrderCreatedHandler( ServiceProvider.GetRequiredService(), ServiceProvider.GetRequiredService>()); } [Test] public async Task ProcessOrder_CallsOrderService() { // Test implementation using inherited fixtures var message = new OrderCreatedMessage { OrderNumber = "ORD-001" }; await _handler.OnNextAsync(new MessageEnvelope(message)); // Assertions... } } ``` -------------------------------- ### Register and use ConfigurationBase in Blazor Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Configuration/ConfigurationBase Example from the Examples section showing how to register the configuration in Program.cs or Startup.cs, define appsettings.json, and use the configuration in a component. Includes the AddConfigurationBase method, the AppSettings configuration section, and HttpClientFactory usage. ```csharp // In Program.cs or Startup.cs builder.Services.AddConfigurationBase<MyAppConfiguration>(builder.Configuration, "AppSettings"); // Example configuration in appsettings.json { "AppSettings": { "ApiRoot": "https://api.mycompany.com", "AppRoot": "https://myapp.mycompany.com", "HttpHandlerMode": "Add" } } // Usage in components [Inject] public MyAppConfiguration Config { get; set; } private async Task CallApi() { var httpClient = HttpClientFactory.CreateClient(Config.ApiClientName); var response = await httpClient.GetAsync($"{Config.ApiRoot}/api/data"); } ``` -------------------------------- ### AzuriteTestBase test class with blob upload test Source: https://easyaf.dev/breakdance/guides/testing-azure-storage A test class inheriting from AzuriteTestBase that starts an Azurite instance with all services, in-memory persistence, and silent mode. Each test class owns its own static AzuriteInstance to avoid cross-class pollution and port conflicts. The example uploads a blob to a container and asserts its existence. ```csharp using CloudNimble.Breakdance.Azurite; using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Threading.Tasks; [TestClass] public class MyStorageTests : AzuriteTestBase { private static AzuriteInstance _azurite; protected override AzuriteInstance Azurite => _azurite; [ClassInitialize] public static async Task ClassInit(TestContext ctx) { _azurite = await CreateAndStartInstanceAsync(new AzuriteConfiguration { Services = AzuriteServiceType.All, InMemoryPersistence = true, Silent = true }); } [ClassCleanup] public static async Task ClassCleanup() { await StopAndDisposeAsync(_azurite); _azurite = null; } [TestMethod] public async Task CanUploadBlob() { // Use the ConnectionString property to connect to Azurite var blobServiceClient = new BlobServiceClient(ConnectionString); var container = blobServiceClient.GetBlobContainerClient("test-container"); await container.CreateIfNotExistsAsync(); var blob = container.GetBlobClient("test-blob.txt"); await blob.UploadAsync(BinaryData.FromString("Hello, Azurite!")); Assert.IsTrue(await blob.ExistsAsync()); } } ``` -------------------------------- ### RatioPerMonth with quantity usage example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Core/RatioInterval Shows how to use RatioPerMonth with a quantity, calculating conversions per month from 100 leads with a 60% weekly conversion rate. ```csharp // 60% conversion every week, total conversions from 100 leads per month var conversion = new RatioInterval(0.60m, 1, IntervalType.Weeks); decimal conversionsPerMonth = conversion.RatioPerMonth(100); // 260 conversions per month ``` -------------------------------- ### ExecuteTestRequest usage with MSTest and FluentAssertions Source: https://easyaf.dev/breakdance/api-reference/System/Net/Http/HttpClient Example of using ExecuteTestRequest with MSTest and FluentAssertions. It creates a testable HttpClient via WebApiTestHelpers.GetTestableHttpClient(), sends a GET request to "/Companies", and asserts the response is not null, has OK status, and content is not null or whitespace. Note: the snippet appears truncated in the source (missing parts of the class and method declarations). ```csharp [TestClass] ApiTests { hod] sync Task TestApi_Companies_ReturnsResults() { httpClient = WebApiTestHelpers.GetTestableHttpClient(); result = await httpClient.ExecuteTestRequest(HttpMethods.Get, resource = "/Companies"); lt.Should().NotBeNull(); lt.StatusCode.Should().Be(HttpStatusCode.OK); content = await result.Content.ReadAsStringAsync(); ent.Should().NotBeNullOrWhiteSpace(); } } ``` -------------------------------- ### Mock configuration for unit tests Source: https://easyaf.dev/simplemessagebus/guides/configuration Demonstrates how to bind configuration settings to options for unit testing. ```csharp [Test] public void Configure_WithValidOptions_RegistersServices() { var services = new ServiceCollection(); var configuration = new ConfigurationBuilder() .AddInMemoryCollection(new Dictionary { ["ConnectionString"] = "UseDevelopmentStorage=true", ["DefaultQueueName"] = "test-queue" }) .Build(); services.AddSimpleMessageBusAzureStoragePublisher(options => { configuration.Bind(options); }); var provider = services.BuildServiceProvider(); var publisher = provider.GetService(); Assert.That(publisher, Is.Not.Null); } ``` -------------------------------- ### TrippinApi.cs - Full example Source: https://easyaf.dev/restier/guides/server/filters A full implementation of the TrippinApi class demonstrating both People and Trips filtering. ```csharp using Microsoft.Restier.Core; using Microsoft.Restier.Provider.EntityFramework; using System.Data.Entity; using System.Linq; using System.Security.Claims; using System.Threading.Tasks; namespace Microsoft.OData.Service.Sample.Trippin.Api { /// /// Customizations to the EntityFrameworkApi for the TripPin service. /// /// /// Add the following line in WebApiConfig.cs to register this code: /// await config.MapRestierRoute("Trippin", "api", new RestierBatchHandler(GlobalConfiguration.DefaultServer)); /// public class TrippinApi : EntityFrameworkApi { /// /// Filters queries to the People EntitySet to only return Users that have Trips. /// protected internal IQueryable OnFilterPeople(IQueryable entitySet) { return entitySet.Where(c => c.Trips.Any()).AsQueryable(); } /// /// Filters queries to the Trips EntitySet to only return the current user's Trips. /// protected internal IQueryable OnFilterTrips(IQueryable entitySet) { return entitySet.Where(c => c.PersonId == ClaimsPrincipal.Current.FindFirst("currentUserId")).AsQueryable(); } } } ``` -------------------------------- ### TursoSyncDatabase example with PullAsync and PushAsync Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/TursoDb/TursoSyncDatabase Shows how to create a custom database class that inherits from TursoSyncDatabase, configure its name, sync URL, and auth token, and use the PullAsync and PushAsync methods to synchronize with Turso Cloud. ```csharp public class AppDatabase : TursoSyncDatabase { public TursoDbSet Users { get; } public AppDatabase(IJSRuntime jsRuntime) : base(jsRuntime) { Name = "app.db"; SyncUrl = "libsql://mydb-myorg.turso.io"; SyncAuthToken = "your-auth-token"; Users = new TursoDbSet(this); } } // Usage await Database.ConnectAsync(); await Database.PullAsync(); // Pull changes from cloud // ... make local changes ... await Database.PushAsync(); // Push local changes to cloud ``` -------------------------------- ### HasResponseReferences example comment Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpRequest Comment example showing when HasResponseReferences is true. ```csharp // True when the request contains syntax like {{login.response.body.$.token}} ``` -------------------------------- ### UseStartup Source: https://easyaf.dev/breakdance/api-reference/Microsoft/Extensions/Hosting/IHostBuilder Specifies the startup type to be used by the web host. This is a convenience wrapper around ConfigureWebHost for Breakdance test scenarios. ```APIDOC ## UseStartup ### Description Specifies the startup type to be used by the web host. This is a convenience wrapper around ConfigureWebHost for Breakdance test scenarios. ### Method Extension method ### Syntax ```csharp public static Microsoft.Extensions.Hosting.IHostBuilder UseStartup(Microsoft.Extensions.Hosting.IHostBuilder builder) where TStartup : class ``` ### Parameters - **builder** (Microsoft.Extensions.Hosting.IHostBuilder) - The IHostBuilder to configure. ### Type Parameters - **TStartup** - The startup type. ### Returns Type: Microsoft.Extensions.Hosting.IHostBuilder The IHostBuilder for chaining. ``` -------------------------------- ### UserRegistrationManager example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Business/ManagerBase Example of a manager class inheriting from ManagerBase, demonstrating constructor injection and a method that adds a user, saves changes, and publishes an event. ```csharp public class UserRegistrationManager : ManagerBase { public UserRegistrationManager(MyDbContext context, IMessagePublisher publisher) : base(context, publisher) { } public async Task RegisterUserAsync(string email, string password) { var user = new User { Email = email, Password = HashPassword(password) }; DataContext.Users.Add(user); await DataContext.SaveChangesAsync(); await MessagePublisher.PublishAsync(new UserRegisteredEvent { UserId = user.Id }); return user; } } ``` -------------------------------- ### BeginTransactionAsync Example Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/TursoDb/TursoSyncDatabase Example usage of BeginTransactionAsync with try-catch to commit or rollback a transaction. ```csharp await using var transaction = await Database.BeginTransactionAsync(); try { await Database.Users.AddAsync(user); await transaction.CommitAsync(); } catch { await transaction.RollbackAsync(); throw; } ``` -------------------------------- ### Set Up Test Container with Azurite Source: https://easyaf.dev/simplemessagebus/guides/testing Starts an Azurite container for Azure Storage emulation in a test fixture. Uses AzuriteBuilder to configure the container image and starts it in OneTimeSetUp, disposing in OneTimeTearDown. ```csharp [TestFixture] public class OrderProcessingIntegrationTests { private AzuriteContainer _azuriteContainer; private IServiceProvider _serviceProvider; [OneTimeSetUp] public async Task OneTimeSetUp() { // Start Azurite container for Azure Storage emulation _azuriteContainer = new AzuriteBuilder() .WithImage("mcr.microsoft.com/azure-storage/azurite:latest") .Build(); await _azuriteContainer.StartAsync(); } [OneTimeTearDown] public async Task OneTimeTearDown() { await _azuriteContainer.DisposeAsync(); } } ``` -------------------------------- ### Guid type syntax Source: https://easyaf.dev/api-reference/System/Guid Shows the syntax for the Guid type in the System namespace. ```csharp System.Guid ``` -------------------------------- ### Install Azurite and Breakdance Azurite package Source: https://easyaf.dev/breakdance/guides/testing-azure-storage Install Azurite globally via npm and add the CloudNimble.Breakdance.Azurite NuGet package to the test project. These are the two prerequisite installation commands before writing tests. ```bash npm install -g azurite ``` ```bash dotnet add package CloudNimble.Breakdance.Azurite ``` -------------------------------- ### Generated Mintlify Project File (Current 1.0.2) Source: https://easyaf.dev/quickstart Example .docsproj file for a Mintlify documentation project using the stable SDK version 1.0.2. ```xml Mintlify true Folder true false false Unified {solutionName} maple #419AC5 #419AC5 #3CD0E2 ``` -------------------------------- ### Minimal Method Syntax Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Configuration/MonitoringConfiguration Creates a minimal monitoring configuration with minimal overhead. ```csharp public static Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration Minimal() ``` -------------------------------- ### LastRunSucceeded Usage Example Source: https://easyaf.dev/simplemessagebus/api-reference/CloudNimble/SimpleMessageBus/Core/IMessage Example demonstrating idempotent message processing using LastRunSucceeded. ```csharp public async Task Handle(OrderCreated message, ILogger logger) { if (message.LastRunSucceeded(GetType().Name)) { logger.LogInformation("Order {OrderId} already processed successfully", message.Id); return; } // Process the message... message.UpdateResult(true, GetType().Name); } ``` -------------------------------- ### Configure and use Azure Storage Queue in Program.cs Source: https://easyaf.dev/simplemessagebus/providers/azure-storage-queue This example demonstrates how to register the Azure Storage publisher and dispatcher services, register a message handler, and publish a message within an API endpoint. ```csharp // Program.cs using SimpleMessageBus.Publish.Azure.Extensions; using SimpleMessageBus.Dispatch.Azure.Extensions; var builder = WebApplication.CreateBuilder(args); // Configure Azure Storage Queue builder.Services.AddSimpleMessageBusAzureStoragePublisher(options => { options.ConnectionString = builder.Configuration.GetConnectionString("AzureStorage"); options.DefaultQueueName = "orders"; }); builder.Services.AddSimpleMessageBusAzureStorageDispatcher(options => { options.ConnectionString = builder.Configuration.GetConnectionString("AzureStorage"); options.DefaultQueueName = "orders"; options.MaxConcurrentMessages = 16; options.PollingInterval = TimeSpan.FromSeconds(2); }); // Register handlers builder.Services.AddScoped, OrderCreatedHandler>(); var app = builder.Build(); // API endpoint app.MapPost("/orders", async (CreateOrderRequest request, IMessagePublisher publisher) => { var orderId = Guid.NewGuid().ToString(); // Publish message await publisher.PublishAsync(new OrderCreatedMessage { OrderId = orderId, CustomerId = request.CustomerId, TotalAmount = request.TotalAmount, CreatedAt = DateTime.UtcNow }); return Results.Ok(new { OrderId = orderId }); }); app.Run(); ``` -------------------------------- ### File-level variables example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/Models/DotHttpFile Example of defining file-level variables using @name=value syntax. ```csharp @baseUrl = https://api.example.com @apiVersion = v2 ``` -------------------------------- ### StartAsync Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Azurite/AzuriteInstance Starts the Azurite instance asynchronously. Includes automatic retry logic for port conflicts when AzuriteConfiguration.AutoAssignPorts is true. ```APIDOC ## StartAsync ### Description Starts the Azurite instance asynchronously. Includes automatic retry logic for port conflicts when AzuriteConfiguration.AutoAssignPorts is true. ### Method N/A (C# method) ### Syntax ```csharp public System.Threading.Tasks.Task StartAsync() ``` ### Returns Type: `System.Threading.Tasks.Task` A task that completes when Azurite is ready to accept connections. ``` -------------------------------- ### ResolveReference Example Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/DotHttp/ResponseCapture Example usage of ResolveReference. Captures a response and then resolves a token reference. ```csharp var capture = new ResponseCapture(); await capture.CaptureAsync("login", response); var token = capture.ResolveReference("{{login.response.body.$.token}}"); ``` -------------------------------- ### Install BlazorEssentials.IndexedDb package Source: https://easyaf.dev/blazoressentials/guides/databases/indexeddb Use the .NET CLI to add the required package to your project. ```bash dotnet add package BlazorEssentials.IndexedDb ``` -------------------------------- ### Prepare and Execute TursoPreparedStatement Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/TursoDb/TursoPreparedStatement Demonstrates preparing a SQL statement with a parameter placeholder and executing it multiple times with different parameter values. ```csharp var statement = Database.Prepare<User>("SELECT * FROM users WHERE age > ?"); var youngUsers = await statement.QueryAsync(18); var olderUsers = await statement.QueryAsync(65); ``` -------------------------------- ### CreateChild Usage Example Source: https://easyaf.dev/simplemessagebus/api-reference/CloudNimble/SimpleMessageBus/Core/IMessage Example of creating a child event that inherits filtered parent metadata. ```csharp // Create a child event that inherits filtered parent metadata var shipmentRequested = message.CreateChild(); shipmentRequested.OrderId = message.OrderId; shipmentRequested.Items = result.Items; await publisher.PublishAsync(shipmentRequested); ``` -------------------------------- ### GetUserScopes Usage Example Source: https://easyaf.dev/odata-mcp/api-reference/System/Security/Claims/ClaimsPrincipal Example demonstrating how to retrieve and check for a specific scope using GetUserScopes. ```csharp var userScopes = User.GetUserScopes(); if (userScopes.Contains("read:users")) { // User has permission to read users } ``` -------------------------------- ### Configure providers by environment Source: https://easyaf.dev/simplemessagebus/providers/overview Use the environment-based configuration pattern to register the FileSystem provider in development and the AzureStorage provider in production. ```csharp if (builder.Environment.IsDevelopment()) { builder.Services.AddSimpleMessageBusFileSystemProvider(); } else if (builder.Environment.IsProduction()) { builder.Services.AddSimpleMessageBusAzureStorageProvider(); } ``` -------------------------------- ### TestSetup Method Source: https://easyaf.dev/breakdance/api-reference/CloudNimble/Breakdance/Assemblies/BreakdanceTestBase A virtual method for synchronous test environment setup. It calls TestSetupAsync internally. ```csharp public virtual void TestSetup() ``` -------------------------------- ### ForProduction Method Source: https://easyaf.dev/odata-mcp/api-reference/Microsoft/OData/Mcp/Core/Configuration/MonitoringConfiguration Creates a monitoring configuration instance optimized for production environments. ```csharp public static Microsoft.OData.Mcp.Core.Configuration.MonitoringConfiguration ForProduction() ``` -------------------------------- ### FindEdmxFile Example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Commands/EdmxRootCommand Example usage of FindEdmxFile. Searches the specified folder for the first EDMX file. ```csharp var edmxFile = EdmxRootCommand.FindEdmxFile("C:\\MySolution\\MyProject.Data"); ``` -------------------------------- ### Start Method Syntax Source: https://easyaf.dev/blazoressentials/api-reference/CloudNimble/BlazorEssentials/Merlin/OperationStep The Action that the Operation calls to trigger a Step. Wraps the call to onAction with status update logic. Returns a Task. ```csharp public System.Threading.Tasks.Task Start() ``` -------------------------------- ### FindDataFolder Example Source: https://easyaf.dev/api-reference/CloudNimble/EasyAF/Tools/Commands/EdmxRootCommand Example usage of FindDataFolder. Searches the specified root directory for the .Data folder. ```csharp var dataFolder = EdmxRootCommand.FindDataFolder("C:\\MySolution"); ```