Common Custom renderers
Common_CustomRenderers_CSharp\App_Code\RendererBase.cs
// Copyright 2011 ESRI
// 
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
// 
// You may freely redistribute and use this sample code, with or
// without modification, provided you include the original copyright
// notice and use restrictions.
// 
// See the use restrictions.
// 

namespace ESRI.ADF.Samples.Renderers
{
  /// <summary>
  /// Base Renderer for simplifying creating a new renderer
  /// You only need to implement the Render method, unless you want support for legends.
  /// </summary>
    [System.Serializable]
  public abstract class RendererBase : ESRI.ArcGIS.ADF.Web.Display.Renderer.IRenderer
  {
    #region IRenderer Members

    public virtual ESRI.ArcGIS.ADF.Web.Display.Swatch.SwatchCollection GenerateSwatches(
            ESRI.ArcGIS.ADF.Web.Display.Swatch.SwatchInfo swatchInfo, string fileName, string minScale, string maxScale)
    {
      //Override if needed
      return new ESRI.ArcGIS.ADF.Web.Display.Swatch.SwatchCollection();
    }

    public virtual void GetAllSymbols(System.Collections.Generic.List<ESRI.ArcGIS.ADF.Web.Display.Symbol.FeatureSymbol> symbols)
    {
      //Override if needed
    }

    public virtual void GetMaxSwatchDimensions(ref int width, ref int height)
    {
      //Override if needed
    }

    public abstract void Render(System.Data.DataRow row, System.Drawing.Graphics graphics, System.Data.DataColumn geometryColumn);

    #endregion

    #region ICloneable Members

    public virtual object Clone()
    {
      return this.MemberwiseClone() as RendererBase;
    }

    #endregion
  }
}