/// <summary> /// Determines whether the specified action is deprecated for the provided API version. /// </summary> /// <param name="actionDescriptor">The <see cref="ActionDescriptor">action</see> to evaluate.</param> /// <param name="apiVersion">The <see cref="ApiVersion">API version</see> to evaluate.</param> /// <returns>True if the specified <paramref name="actionDescriptor">action</paramref> is deprecated for the /// <paramref name="apiVersion">API version</paramref>; otherwise, false.</returns> public virtual bool IsDeprecated(ActionDescriptor actionDescriptor, ApiVersion apiVersion) { Arg.NotNull(actionDescriptor, nameof(actionDescriptor)); Arg.NotNull(apiVersion, nameof(apiVersion)); var model = actionDescriptor.GetApiVersionModel(); return(!model.IsApiVersionNeutral && model.DeprecatedApiVersions.Contains(apiVersion)); }