In the documentation for using handler functions with ArcGIS Server Rest SOE's, they don't explain how the keys in the boundVariables collection are determined. When I search through the entire solution for "customLayersID" I don't see anything. How would I know to use "customLayersID" as a key?
private byte[] CustomLayer(NameValueCollection boundVariables, string outputFormat,
string requestProperties, out string responseProperties)
{
responseProperties = null;
//The LayerID.
int layerID = Convert.ToInt32(boundVariables["customLayersID"]);
//Execute.
CustomLayerInfo layerInfo = GetLayerInfo(layerID);
string json = layerInfo.ToJsonObject().ToJson();
return Encoding.UTF8.GetBytes(json);
}