Beispiel #1
0
        private static ISignatureGenerator GetSignatureGenerator(IServiceProvider services)
        {
            ISignatureGenerator sigGenerator = null;

#if net40
            var httpContext = HttpContext.Current;
            if (httpContext != null)
            {
                sigGenerator = httpContext.Items[ContextKey_SignatureGenerator] as ISignatureGenerator;
            }
#endif
            if (services != null)
            {
                sigGenerator = TryGetService <ISignatureGenerator>(services);
            }

            if (sigGenerator == null)
            {
                sigGenerator = new Services.Impl.SignatureGenerator();
            }
            return(sigGenerator);
        }
Beispiel #2
0
        private static ISignatureGenerator GetSignatureGenerator()
        {
            ISignatureGenerator sigGenerator = null;

            var httpContext = HttpContext.Current;
            if (httpContext != null)
            {
                sigGenerator = httpContext.Items[ContextKey_SignatureGenerator] as ISignatureGenerator;
            }

            if (sigGenerator == null)
            {
                sigGenerator = new Services.Impl.SignatureGenerator();
            }

            return sigGenerator;
        }