Esempio n. 1
0
        /// <summary>
        /// Method to reset the state of this provider, so that the API will be re-generated
        /// </summary>
        protected void Reset()
        {
            DirectProviderCache cache = DirectProviderCache.GetInstance();

            if (cache.ContainsProvider(this.ProviderName))
            {
                cache[this.ProviderName].Clear();
            }
        }
Esempio n. 2
0
        private DirectProvider GetProvider(HttpContext context, string name)
        {
            DirectProviderCache cache = DirectProviderCache.GetInstance();

            if (!cache.ContainsProvider(name))
            {
                DirectProvider provider = new DirectProvider()
                {
                    Name          = name,
                    Url           = context.Request.Path,
                    Namespace     = this.Namespace,
                    Timeout       = this.Timeout,
                    MaxRetries    = this.MaxRetries,
                    AutoNamespace = this.AutoNamespace,
                    Id            = this.Id
                };
                this.ConfigureProvider(provider);
                cache.Add(provider);
            }
            return(cache[name]);
        }