ArcIMS Select Buffer tool
ArcIMS_SelectBufferTool_CSharp\App_Code\LayerNames.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.
// 

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
using System.Collections.Generic;

// Layer names for dynamic layers
public static class LayerNames
{
    static LayerNames() { }

    public static readonly string SelectionToolActive = "selectiontoolactive";
    public static readonly string SelectionToolTarget = "selectiontooltarget";
    public static readonly string SelectionToolBuffer = "selectiontoolbuffer";
    public static readonly string BufferToolLine = "buffertoolline";
    public static readonly string BufferToolTarget = "buffertooltarget";

    // To iterate through all dynamic layers, use this enumerator 
    // (used by the ClearAllLayers() method in Default.aspx.cs).
    public static IEnumerable GetLayerNames()
    {
        List<string> list = new List<string>();
        list.Add(SelectionToolActive);
        list.Add(SelectionToolTarget);
        list.Add(SelectionToolBuffer);
        list.Add(BufferToolLine);
        list.Add(BufferToolTarget);
        foreach (string layerName in list)
        {
            yield return layerName;
        }
    }
}