/// <summary> /// Adds the rest handlers. /// </summary> /// <param name="services">The services.</param> public void Init(IEnumerable <IRestfulService> services) { _restServices.AddRange(services); _logger.Info("Calling EndpointHost.ConfigureHost"); EndpointHost.ConfigureHost(this, ServerName, CreateServiceManager()); _logger.Info("Registering protobuf as a content type filter"); ContentTypeFilters.Register(ContentType.ProtoBuf, (reqCtx, res, stream) => ProtobufSerializer.SerializeToStream(res, stream), (type, stream) => ProtobufSerializer.DeserializeFromStream(stream, type)); _logger.Info("Calling ServiceStack AppHost.Init"); Init(); }