Foundation.Server.Areas.HelpPage.HelpPageSampleGenerator.GetAllActionSamples C# (CSharp) Method

GetAllActionSamples() private method

private GetAllActionSamples ( string controllerName, string actionName, IEnumerable parameterNames, SampleDirection sampleDirection ) : object>>.IEnumerable
controllerName string
actionName string
parameterNames IEnumerable
sampleDirection SampleDirection
return object>>.IEnumerable
        private IEnumerable<KeyValuePair<HelpPageSampleKey, object>> GetAllActionSamples(string controllerName, string actionName, IEnumerable<string> parameterNames, SampleDirection sampleDirection)
        {
            HashSet<string> parameterNamesSet = new HashSet<string>(parameterNames, StringComparer.OrdinalIgnoreCase);
            foreach (var sample in ActionSamples)
            {
                HelpPageSampleKey sampleKey = sample.Key;
                if (String.Equals(controllerName, sampleKey.ControllerName, StringComparison.OrdinalIgnoreCase) &&
                    String.Equals(actionName, sampleKey.ActionName, StringComparison.OrdinalIgnoreCase) &&
                    (sampleKey.ParameterNames.SetEquals(new[] { "*" }) || parameterNamesSet.SetEquals(sampleKey.ParameterNames)) &&
                    sampleDirection == sampleKey.SampleDirection)
                {
                    yield return sample;
                }
            }
        }