Candy.Server.Global.Application_Start C# (CSharp) Method

Application_Start() protected method

protected Application_Start ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        protected void Application_Start(object sender, EventArgs e)
        {
            GlobalConfiguration.Configure(WebApiConfig.Register);

            var jsonFormatter = GlobalConfiguration.Configuration.Formatters.JsonFormatter;

            jsonFormatter.SerializerSettings = new JsonSerializerSettings
            {
                Formatting = Formatting.Indented,
                Converters =
                {
                    new VersionConverter()
                }
            };

            JsonConvert.DefaultSettings = () => jsonFormatter.SerializerSettings;
        }