public IUniqueValueRenderer newUniqueValueRenderer(
            ISymbol defaultSymbol,
            ObservableCollection <string> fields,
            ObservableCollection <IUniqueValueInfo> infos)
        {
            IS3UniqueValueRenderer renderer = new IS3UniqueValueRenderer();

            renderer.DefaultSymbol = defaultSymbol;
            renderer.Fields        = fields;
            renderer.Infos         = infos;
            return(renderer);
        }
        public IRenderer newRenderer(RendererDef rendererDef)
        {
            Type rendererType = rendererDef.GetType();

            if (rendererType == typeof(SimpleRendererDef))
            {
                SimpleRendererDef rDef     = (SimpleRendererDef)rendererDef;
                IS3SimpleRenderer renderer = new IS3SimpleRenderer();
                renderer.Symbol = newSymbol(rDef.SymbolDef);
                return(renderer);
            }
            else if (rendererType == typeof(UniqueValueRendererDef))
            {
                UniqueValueRendererDef rDef     = (UniqueValueRendererDef)rendererDef;
                IS3UniqueValueRenderer renderer = new IS3UniqueValueRenderer();
                renderer.DefaultSymbol = newSymbol(rDef.DefaultSymbolDef);
                renderer.Fields        = rDef.Fields;
                renderer.Infos         = new ObservableCollection <IUniqueValueInfo>(
                    rDef.InfosDef.Select(x => new IS3UniqueValueInfo
                {
                    Symbol = newSymbol(x.SymbolDef),
                    Values = x.Values
                })
                    );
                return(renderer);
            }
            else if (rendererType == typeof(ClassBreaksRendererDef))
            {
                ClassBreaksRendererDef rDef     = (ClassBreaksRendererDef)rendererDef;
                IS3ClassBreaksRenderer renderer = new IS3ClassBreaksRenderer();
                renderer.DefaultSymbol = newSymbol(rDef.DefaultSymbolDef);
                renderer.Field         = rDef.Field;
                renderer.Infos         = new ObservableCollection <IClassBreakInfo>(
                    rDef.InfosDef.Select(x => new IS3ClassBreakInfo
                {
                    Maximum = x.Maximum,
                    Minimum = x.Maximum,
                    Symbol  = newSymbol(x.SymbolDef)
                })
                    );
                return(renderer);
            }
            return(null);
        }