public static void Register(HttpConfiguration config) { config.MapHttpAttributeRoutes(); var serializerSettings = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings; serializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); serializerSettings.Converters.Add(new StringEnumConverter { CamelCaseText = true }); var locatorProvider = new StructureMapServiceLocator(StructureMapContainerProvider.GetContainer()); ServiceLocator.SetLocatorProvider(() => locatorProvider); config.DependencyResolver = new DependencyResolver(); }
public StructureMapServiceLocatorTests() { _structureMapServiceLocator = new StructureMapServiceLocator(StructureMapContainerProvider.GetContainer()); ServiceLocator.SetLocatorProvider(() => _structureMapServiceLocator); }