Skip to main content

Definition

Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.Object

Syntax

Summary

Configuration for enabling/disabling specific features.

Remarks

Feature flags allow selective enabling of functionality for gradual rollouts, A/B testing, or environment-specific configurations without code changes.

Constructors

.ctor

Initializes a new instance of the FeatureFlagsConfiguration class.

Syntax

.ctor Inherited

Inherited from object

Syntax

Properties

CustomFlags

Gets or sets custom feature flag values.

Syntax

Property Value

Type: System.Collections.Generic.Dictionary<string, bool> A dictionary of custom feature flag names and their enabled status.

Remarks

Custom feature flags allow applications to define their own toggleable features beyond the predefined flags in this configuration.

EnableAdvancedQuerying

Gets or sets a value indicating whether advanced querying features are enabled.

Syntax

Property Value

Type: bool true to enable advanced querying; otherwise, false.

Remarks

Advanced querying includes features like complex filterexpressions,customfunctions,andsophisticatedfilter expressions, custom functions, and sophisticated expand operations.

EnableAsyncStreaming

Gets or sets a value indicating whether async streaming is enabled.

Syntax

Property Value

Type: bool true to enable async streaming; otherwise, false.

Remarks

Async streaming allows large result sets to be returned incrementally, improving perceived performance and reducing memory usage.

EnableBatchOperations

Gets or sets a value indicating whether batch operations are enabled.

Syntax

Property Value

Type: bool true to enable batch operations; otherwise, false.

Remarks

Batch operations allow multiple operations to be executed in a single request, improving performance but increasing complexity and resource usage.

EnableBetaApiVersions

Gets or sets a value indicating whether beta API versions are enabled.

Syntax

Property Value

Type: bool true to enable beta API versions; otherwise, false.

Remarks

Beta API versions provide access to new functionality before it becomes generally available, but may be unstable or subject to breaking changes.

EnableCachingOptimizations

Gets or sets a value indicating whether caching optimizations are enabled.

Syntax

Property Value

Type: bool true to enable caching optimizations; otherwise, false.

Remarks

Caching optimizations include aggressive caching strategies that may improve performance at the cost of data freshness.

EnableCustomToolExtensions

Gets or sets a value indicating whether custom tool extensions are enabled.

Syntax

Property Value

Type: bool true to enable custom tool extensions; otherwise, false.

Remarks

Custom tool extensions allow loading additional MCP tools from external assemblies or configuration, extending the server’s capabilities.

EnableDevelopmentEndpoints

Gets or sets a value indicating whether development endpoints are enabled.

Syntax

Property Value

Type: bool true to enable development-specific endpoints; otherwise, false.

Remarks

Development endpoints include features like detailed diagnostics, configuration inspection, and testing utilities that should not be available in production.

EnableEnhancedSecurity

Gets or sets a value indicating whether enhanced security features are enabled.

Syntax

Property Value

Type: bool true to enable enhanced security; otherwise, false.

Remarks

Enhanced security features provide additional protection mechanisms that may impact performance or compatibility with some clients.

EnableExperimentalFeatures

Gets or sets a value indicating whether experimental features are enabled.

Syntax

Property Value

Type: bool true to enable experimental features; otherwise, false.

Remarks

Experimental features are new or unstable functionality that may change or be removed in future versions. Use with caution in production.

EnableLegacyCompatibility

Gets or sets a value indicating whether legacy compatibility mode is enabled.

Syntax

Property Value

Type: bool true to enable legacy compatibility; otherwise, false.

Remarks

Legacy compatibility mode maintains backward compatibility with older OData versions or non-standard implementations at the cost of modern features.

EnablePerformanceProfiling

Gets or sets a value indicating whether performance profiling is enabled.

Syntax

Property Value

Type: bool true to enable performance profiling; otherwise, false.

Remarks

Performance profiling collects detailed timing and resource usage information for optimization purposes but adds overhead to request processing.

EnforceStrictSchemaValidation

Gets or sets a value indicating whether schema validation is enforced.

Syntax

Property Value

Type: bool true to enforce strict schema validation; otherwise, false.

Remarks

Strict schema validation ensures all requests conform exactly to the OData schema but may reject valid requests with minor variations.

FlagMetadata

Gets or sets feature flag metadata.

Syntax

Property Value

Type: System.Collections.Generic.Dictionary<string, object> A dictionary containing metadata about feature flags.

Remarks

Metadata can include information such as flag descriptions, deprecation notices, rollout percentages, or other contextual information.

Methods

AddFlagMetadata

Adds metadata for a feature flag.

Syntax

Parameters

Exceptions

Clone

Creates a copy of this configuration.

Syntax

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.FeatureFlagsConfiguration A new instance with the same settings.

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ForDevelopment

Creates a configuration optimized for development environments.

Syntax

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.FeatureFlagsConfiguration A feature flags configuration suitable for development.

ForProduction

Creates a configuration optimized for production environments.

Syntax

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.FeatureFlagsConfiguration A feature flags configuration suitable for production.

GetEnabledFlags

Gets all enabled feature flags.

Syntax

Returns

Type: System.Collections.Generic.IEnumerable<string> A collection of enabled feature flag names.

GetFlagMetadata

Gets metadata for a feature flag.

Syntax

Parameters

Returns

Type: T? The metadata object if found and of the correct type; otherwise, the default value.

Type Parameters

  • T - The type of the metadata object.

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetStatistics

Gets feature flag statistics for monitoring and diagnostics.

Syntax

Returns

Type: System.Collections.Generic.Dictionary<string, object> A dictionary containing feature flag statistics.

GetType Inherited

Inherited from object

Syntax

Returns

Type: System.Type

IsEnabled

Determines whether a specific feature flag is enabled.

Syntax

Parameters

Returns

Type: bool true if the flag is enabled; otherwise, false.

MemberwiseClone Inherited

Inherited from object

Syntax

Returns

Type: object

MergeWith

Merges another configuration into this one, with the other configuration taking precedence.

Syntax

Parameters

Exceptions

Minimal

Creates a minimal configuration with most features disabled.

Syntax

Returns

Type: Microsoft.OData.Mcp.Core.Configuration.FeatureFlagsConfiguration A feature flags configuration with minimal features enabled.

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

RemoveCustomFlag

Removes a custom feature flag.

Syntax

Parameters

Returns

Type: bool true if the flag was removed; otherwise, false.

SetCustomFlag

Sets the value of a custom feature flag.

Syntax

Parameters

Exceptions

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?

Validate

Validates the feature flags configuration.

Syntax

Returns

Type: System.Collections.Generic.IEnumerable<string> A collection of validation warnings, or empty if the configuration is valid.

Remarks

Feature flags validation focuses on warnings rather than errors, as most combinations are valid but some may indicate misconfigurations.