src/Misc/EFTools/EntityDesignModel/EdmFeatureManager.cs
/// <summary>
///     Captures the common pattern:
///     1. Check if the workflow supports the feature
///     2. If the workflow allows the feature to be enabled, we may want to disable it based on the runtime.
/// </summary>
Captures the common pattern:
1. Check if the workflow supports the feature
2. If the workflow allows the feature to be enabled, we may want to disable it based on the runtime.
Captures the common pattern : 1 . Check if the workflow supports the feature 2 . If the workflow allows the feature to be enabled we may want to disable it based on the runtime .
private static FeatureState IsFeatureSupportedForWorkflowAndRuntime(
            EFArtifact artifact,
            Func<EFArtifact, FeatureState, FeatureState> featureManagerFunction)
        {
            const FeatureState featureState = FeatureState.VisibleAndEnabled;
            Debug.Assert(artifact != null, "Not a valid EFArtifact");
            Debug.Assert(featureManagerFunction != null, "Not a valid featureManager function");
            if (featureState.IsEnabled())
            {
                return featureManagerFunction(artifact, featureState);
            }
            return featureState;
        }
private static FeatureState IsFeatureSupportedForWorkflowAndRuntime ( EFArtifact artifact , Func < EFArtifact , FeatureState , FeatureState > featureManagerFunction ) { const FeatureState featureState = FeatureState . VisibleAndEnabled ; Debug . Assert ( artifact != null , " " ) ; Debug . Assert ( featureManagerFunction != null , " " ) ; if ( featureState . IsEnabled ( ) ) { return featureManagerFunction ( artifact , featureState ) ; } return featureState ; }
Captures the common pattern:
1.
Captures the common pattern : 1 .
// If a feature is deemed invisible within the workflow, there's nothing more we can do within the runtime. // NOTE: There are no scenarios yet for the case where a feature is disabled (but visible) and the runtime wants to set it to invisible.
artifact
EFArtifact
featureManagerFunction
Func<EFArtifact, FeatureState, FeatureState>