project-code-name
Kentico 12 MVC application for <...>
Current Kentico
12.0.68
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using CMS; | |
using CMS.Helpers; | |
using CMS.MacroEngine; | |
using CMS.PortalEngine; | |
using CMS.SiteProvider; | |
using Sandbox.Infrastructure.Emails; |
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<configSections> | |
<!-- Content staging BEGIN --> | |
<section name="microsoft.web.services3" type="Microsoft.Web.Services3.Configuration.WebServicesConfiguration, Microsoft.Web.Services3, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> | |
<!-- Content staging END --> | |
<!-- AjaxControlToolkit BEGIN --> | |
<section name="ajaxControlToolkit" type="AjaxControlToolkit.AjaxControlToolkitConfigSection, AjaxControlToolkit" requirePermission="false" /> | |
<!-- AjaxControlToolkit END --> | |
</configSections> |
Kentico 12 MVC application for <...>
12.0.68
{ | |
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.hg": true, | |
"**/CVS": true, | |
"**/.DS_Store": true, | |
"node_modules": true, | |
"obj": true, | |
"bin": true, |
public static class PageTypeRouteAttributeCacheHelper | |
{ | |
public static readonly Dictionary<string, ControllerActionPair> ClassNameLookup; | |
static PageTypeRouteAttributeCacheHelper() | |
{ | |
var controllerTypes = typeof(PageTypeRouteAttributeCacheHelper) | |
.Assembly | |
.GetTypes() | |
.Where(t => |
/// <summary> | |
/// From https://github.com/garysharp/Disco/commit/1dfa3f4f15fe4fc093e90e4cd490dd06cc30cf07 | |
/// </summary> | |
public class JsonDotNetValueProviderFactory : ValueProviderFactory | |
{ | |
private readonly JsonSerializerSettings serializerSettings; | |
public JsonDotNetValueProviderFactory(JsonSerializerSettings serializerSettings) | |
{ | |
Guard.Against.Null(serializerSettings, nameof(serializerSettings)); |
public class ApiExceptionResult : IHttpActionResult | |
{ | |
private static readonly MediaTypeHeaderValue mediaType = new MediaTypeHeaderValue("application/json"); | |
private readonly ApiError errorResponse; | |
private readonly JsonMediaTypeFormatter jsonMediaTypeFormatter; | |
private readonly HttpRequestMessage requestMessage; | |
private readonly HttpStatusCode statusCode; | |
public ApiExceptionResult(HttpRequestMessage requestMessage, HttpStatusCode statusCode, ApiError errorResponse, JsonMediaTypeFormatter jsonMediaTypeFormatter) |
<!-- Add this to ensure the XML comments are picked up by the Swashbuckle integration --> | |
<PropertyGroup> | |
<DocumentationFile>bin\KenticoMvcApp.xml</DocumentationFile> | |
</PropertyGroup> |
[TextFixture] | |
public class UserInfoTests : UnitTests | |
{ | |
[Test] | |
public void IsAuthorized_Will_Return_True_When_User_Is_In_All_Roles( | |
int userId, | |
string userName, | |
int siteId, | |
string siteName, | |
int roleId1, |
public static class DependencyResolverConfig | |
{ | |
public static IContainer BuildContainer() | |
{ | |
var builder = new ContainerBuilder(); | |
// My registration classes use a "fluent" interface, always returning the ContainerBuilder | |
// so the next call can be chained off the previous | |
var container = builder | |
.RegisterApplicationTypes() |