MapSuiteGisEditor/GisEditorInfrastructure/Managers/LayerPluginManager.cs
/// <summary>
/// Gets the layer plugins core.
/// </summary>
/// <param name="layerType">Type of the layer.</param>
/// <returns></returns>
Gets the layer plugins core.
Gets the layer plugins core .
protected virtual Collection<LayerPlugin> GetLayerPluginsCore(Type layerType)
        {
            var providers = GetPlugins().OfType<LayerPlugin>().Where(p => p.IsActive).OrderBy(p => p.Index).ToList();          
            Collection<LayerPlugin> supportedProviders = new Collection<LayerPlugin>();
            foreach (var supportedProvider in providers.Where(tmpProvider => tmpProvider.GetLayerType().Equals(layerType)))
            {
                supportedProviders.Add(supportedProvider);
            }
            if (supportedProviders.Count == 0)
            {
                foreach (var supportedProvider in providers.Where(tmpProvider => layerType.IsSubclassOf(tmpProvider.GetLayerType())))
                {
                    supportedProviders.Add(supportedProvider);
                }
            }
            return supportedProviders;
        }
protected virtual Collection < LayerPlugin > GetLayerPluginsCore ( Type layerType ) { var providers = GetPlugins ( ) . OfType < LayerPlugin > ( ) . Where ( p => p . IsActive ) . OrderBy ( p => p . Index ) . ToList ( ) ; Collection < LayerPlugin > supportedProviders = new Collection < LayerPlugin > ( ) ; foreach ( var supportedProvider in providers . Where ( tmpProvider => tmpProvider . GetLayerType ( ) . Equals ( layerType ) ) ) { supportedProviders . Add ( supportedProvider ) ; } if ( supportedProviders . Count == 0 ) { foreach ( var supportedProvider in providers . Where ( tmpProvider => layerType . IsSubclassOf ( tmpProvider . GetLayerType ( ) ) ) ) { supportedProviders . Add ( supportedProvider ) ; } } return supportedProviders ; }
Gets the layer plugins core.
Gets the layer plugins core .
None
layerType
Type
Type of the layer.
Type of the layer .