public PropertiesController(IPropertyAllocationAndAdvertisingFacade propertyService)
        {
            Check.If(propertyService).IsNotNull();

            _propertyService = propertyService;
        }
Пример #2
0
        public static PropertiesController GetInitialisedPropertiesController(IPropertyAllocationAndAdvertisingFacade propertyServiceFacade)
        {
            var controller = new PropertiesController(propertyServiceFacade)
            {
                Request = new HttpRequestMessage { RequestUri = new Uri(Url) },
                Configuration = new HttpConfiguration()
            };

            controller.Configuration.MapHttpAttributeRoutes();
            controller.Configuration.EnsureInitialized();

            return controller;
        }