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

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

Creates a new HelpPageSampleKey based on media type, SampleDirection, controller name, action name and parameter names.
public HelpPageSampleKey ( MediaTypeHeaderValue mediaType, SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable parameterNames ) : System
mediaType System.Net.Http.Headers.MediaTypeHeaderValue The media type.
sampleDirection SampleDirection The .
controllerName string Name of the controller.
actionName string Name of the action.
parameterNames IEnumerable The parameter names.
Результат System
        public HelpPageSampleKey(MediaTypeHeaderValue mediaType, SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable<string> parameterNames)
        {
            if (mediaType == null)
            {
                throw new ArgumentNullException("mediaType");
            }
            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;
            MediaType = mediaType;
            ParameterNames = new HashSet<string>(parameterNames, StringComparer.OrdinalIgnoreCase);
            SampleDirection = sampleDirection;
        }

Same methods

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