public HelpPageSampleKey ( |
||
mediaType | The media type. | |
sampleDirection | SampleDirection | The |
controllerName | string | Name of the controller. |
actionName | string | Name of the action. |
parameterNames | IEnumerable |
The parameter names. |
return | 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;
}
HelpPageSampleKey::HelpPageSampleKey ( |
|
HelpPageSampleKey::HelpPageSampleKey ( SampleDirection sampleDirection, string controllerName, string actionName, IEnumerable |