Ejemplo n.º 1
0
        /// <summary>
        /// Registers a raster provider.
        /// </summary>
        /// <param name="holder">A holder of raster provider</param>
        /// <param name="forceUpdate">A value indicating whether an existing registration info
        /// will be updated</param>
        public void RegisterProvider(IRasterProviderHolder holder, bool forceUpdate)
        {
            lock (_syncRoot)
            {
                for (int i = 0; i < _registeredProviders.Count; i++)
                {
                    if (_registeredProviders[i].Name == holder.Name)
                    {
                        if (forceUpdate)
                        {
                            _registeredProviders[i] = holder;
                        }

                        return;
                    }
                }

                _registeredProviders.Add(holder);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Registers a raster provider.
        /// </summary>
        /// <param name="holder">A holder of raster provider</param>
        /// <param name="forceUpdate">A value indicating whether an existing registration info
        /// will be updated</param>
        public void RegisterProvider(IRasterProviderHolder holder, bool forceUpdate)
        {
            lock (_syncRoot)
            {
                for (int i = 0; i < _registeredProviders.Count; i++)
                    if (_registeredProviders[i].Name == holder.Name)
                    {
                        if (forceUpdate)
                            _registeredProviders[i] = holder;

                        return;
                    }

                _registeredProviders.Add(holder);
            }
        }