CanvasControlLibrary.Areas.HelpPage.HelpPageSampleKey.HelpPageSampleKey C# (CSharp) Метод

HelpPageSampleKey() публичный Метод

Creates a new HelpPageSampleKey based on SampleDirection, controller name, action name and parameter names.
public HelpPageSampleKey ( SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable parameterNames ) : System
sampleDirection SampleDirection The .
controllerName string Name of the controller.
actionName string Name of the action.
parameterNames IEnumerable The parameter names.
Результат System
        public HelpPageSampleKey(SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable<string> parameterNames)
        {
            if (!Enum.IsDefined(typeof(SampleDirection), sampleDirection))
            {
                throw new InvalidEnumArgumentException("sampleDirection", (int)sampleDirection, typeof(SampleDirection));
            }
            if (controllerName == null)
            {
                throw new ArgumentNullException("controllerName");
            }
            if (actionName == null)
            {
                throw new ArgumentNullException("actionName");
            }
            if (parameterNames == null)
            {
                throw new ArgumentNullException("parameterNames");
            }
            ControllerName = controllerName;
            ActionName = actionName;
            ParameterNames = new HashSet<string>(parameterNames, StringComparer.OrdinalIgnoreCase);
            SampleDirection = sampleDirection;
        }

Same methods

HelpPageSampleKey::HelpPageSampleKey ( MediaTypeHeaderValue mediaType, SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable parameterNames ) : System
HelpPageSampleKey::HelpPageSampleKey ( MediaTypeHeaderValue mediaType, Type type ) : System