Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
44 lines (41 loc) · 1.71 KB

File metadata and controls

44 lines (41 loc) · 1.71 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using Autofac;
using Microsoft.ApplicationInsights;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using Sample.Core.Data.Database;
using Sample.Core.Logging;
using Sample.Core.Modules;
using Sample.Core.Web.Formatters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http.ExceptionHandling;
namespace Sample.Core
{
public class SampleCoreModule : ILamaCoreModule, ILamaWebApiModule, ILamaWebModule
{
public static JsonSerializerSettings JsonSettings { get; } = new JsonSerializerSettings
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
Converters = new List<JsonConverter> {
new StringEnumConverter { CamelCaseText = true },
new IsoDateTimeConverter { DateTimeFormat = "yyyy-MM-ddTHH:mm:ss.fffzzz" }
},
DateParseHandling = DateParseHandling.DateTimeOffset,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
Formatting = Formatting.None
};
public void Initialize(ContainerBuilder builder)
{
builder.RegisterType<ApplicationInsightsLogger>().As<ILogger>().SingleInstance();
builder.RegisterType<ApplicationInsightsWebApiLogger>().As<IExceptionLogger>().SingleInstance();
builder.RegisterType<MultipartFormFormatter>().SingleInstance();
builder.RegisterType<TelemetryClient>().SingleInstance();
builder.RegisterType<UnitOfWork>().As<IUnitOfWorkAsync>().As<IUnitOfWork>().InstancePerLifetimeScope();
}
public void PostInitialize(ILifetimeScope container) { }
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.