Example #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;
        }
        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);
        }