Ejemplo n.º 1
0
        static public IRequestValidationAgent GetRegisteredOrNew(HttpConfiguration httpConfig)
        {
            IRequestValidationAgent retVal;

            if (httpConfig == null || httpConfig.DependencyResolver == null ||
                (retVal = httpConfig.DependencyResolver.GetServiceOrDefault<IRequestValidationAgent>()) == null)
                retVal = new RequestValidationAgent();

            return retVal;
        }
Ejemplo n.º 2
0
        static public IRequestValidationAgent GetRegisteredOrNew(HttpConfiguration httpConfig)
        {
            IRequestValidationAgent retVal;

            if (httpConfig == null || httpConfig.DependencyResolver == null ||
                (retVal = httpConfig.DependencyResolver.GetServiceOrDefault <IRequestValidationAgent>()) == null)
            {
                retVal = new RequestValidationAgent();
            }

            return(retVal);
        }