Example #1
0
        public override void Initialize(string name, NameValueCollection attributes)
        {
            if (_initialized)
            {
                throw new InvalidOperationException(
                          SR.GetString(SR.XmlSiteMapProvider_Cannot_Be_Inited_Twice));
            }

            if (attributes != null)
            {
                if (string.IsNullOrEmpty(attributes["description"]))
                {
                    attributes.Remove("description");
                    attributes.Add("description", SR.GetString(SR.XmlSiteMapProvider_Description));
                }

                string siteMapFile = null;
                ProviderUtil.GetAndRemoveStringAttribute(attributes, _siteMapFileAttribute, name, ref siteMapFile);
                _virtualPath = VirtualPath.CreateAllowNull(siteMapFile);
            }

            base.Initialize(name, attributes);

            if (attributes != null)
            {
                ProviderUtil.CheckUnrecognizedAttributes(attributes, name);
            }

            _initialized = true;
        }
        public override void Initialize(string name, NameValueCollection config)
        {
            Debug.Trace("IisTraceWebEventProvider", "Initializing: name=" + name);
            base.Initialize(name, config);

            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }
Example #3
0
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            base.Initialize(name, config);

            _appName          = ProviderUtil.GetAppName(config);
            _connectionString = ProviderUtil.GetConnectionString(config);

            ProviderUtil.CheckUnrecognizedAttributes(config);
        }
Example #4
0
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)
        {
            base.Initialize(name, config);

            _connectionString = ProviderUtil.GetConnectionString(config);

            this.WorldName = ProviderUtil.GetAndRemoveStringAttribute(config, "worldName");

            ProviderUtil.CheckUnrecognizedAttributes(config);
        }
Example #5
0
        public override void Initialize(string name, NameValueCollection config)
        {
            Debug.Trace("WebEventLogEventProvider", "Initializing: name=" + name);

            _maxTruncatedParamLen = EventLogParameterMaxLength - _truncateWarning.Length;

            base.Initialize(name, config);

            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }
        public override void Initialize(string name, NameValueCollection config)
        {
            int num = UnsafeNativeMethods.InitializeWmiManager();

            if (num != 0)
            {
                throw new ConfigurationErrorsException(System.Web.SR.GetString("Wmi_provider_cant_initialize", new object[] { "0x" + num.ToString("X8", CultureInfo.CurrentCulture) }));
            }
            base.Initialize(name, config);
            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }
 public override void Initialize(string name, NameValueCollection config)
 {
     ProviderUtil.GetAndRemoveBooleanAttribute(config, "buffer", name, ref this._buffer);
     if (this._buffer)
     {
         ProviderUtil.GetAndRemoveRequiredNonEmptyStringAttribute(config, "bufferMode", name, ref this._bufferMode);
         this._webEventBuffer = new WebEventBuffer(this, this._bufferMode, new WebEventBufferFlushCallback(this.ProcessEventFlush));
     }
     else
     {
         ProviderUtil.GetAndRemoveStringAttribute(config, "bufferMode", name, ref this._bufferMode);
     }
     base.Initialize(name, config);
     ProviderUtil.CheckUnrecognizedAttributes(config, name);
 }
Example #8
0
        public override void Initialize(string name, NameValueCollection config)
        {
            Debug.Trace("WmiWebEventProvider", "Initializing: name=" + name);

            int hr;

            hr = UnsafeNativeMethods.InitializeWmiManager();
            if (hr != 0)
            {
                throw new ConfigurationErrorsException(
                          SR.GetString(SR.Wmi_provider_cant_initialize, "0x" + hr.ToString("X8", CultureInfo.CurrentCulture)));
            }

            base.Initialize(name, config);

            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }
        public override void Initialize(string name, NameValueCollection config)
        {
            // create buffer according to the buffer mode settings specified, like we do in sql/mail providers
            // wire up the delegate to the ProcessEventFlush method
            Debug.Trace("BufferedWebEventProvider", "Initializing: name=" + name);

            ProviderUtil.GetAndRemoveBooleanAttribute(config, "buffer", name, ref _buffer);

            if (_buffer)
            {
                ProviderUtil.GetAndRemoveRequiredNonEmptyStringAttribute(config, "bufferMode", name, ref _bufferMode);
                _webEventBuffer = new WebEventBuffer(this, _bufferMode, new WebEventBufferFlushCallback(this.ProcessEventFlush));
            }
            else
            {
                ProviderUtil.GetAndRemoveStringAttribute(config, "bufferMode", name, ref _bufferMode);
            }

            base.Initialize(name, config);

            ProviderUtil.CheckUnrecognizedAttributes(config, name);
        }
Example #10
0
 public override void Initialize(string name, NameValueCollection config)
 {
     base.Initialize(name, config);
     ProviderUtil.CheckUnrecognizedAttributes(config, name);
 }
Example #11
0
 public override void Initialize(string name, NameValueCollection config)
 {
     this._maxTruncatedParamLen = 0x7ffe - "...".Length;
     base.Initialize(name, config);
     ProviderUtil.CheckUnrecognizedAttributes(config, name);
 }