/// <summary>
        /// Simple structure to package a filter's data.
        /// </summary>
        /// <param name="method">Metric function.</param>
        internal MetricMethod(Metric.MetricDelegate method)
        {
            MetricAttribute mm = Factory.GetMetricsFromMethodInfo(method.Method);
            if (mm == null)
                throw new NotSupportedException(string.Format("Method {0} is not decorated with MetricAttribute ", method.Method.Name));

            _method = method;

            _attributes = new Hashtable();
            _attributes.Add("Name", mm.Name);
            _attributes.Add("Description", mm.Description);
        }
 /// <summary>
 /// Base class for implementing a metric associable to a Node.
 /// </summary>
 /// <param name="key">The key of the metric.</param>
 /// <param name="method">The metric function.</param>
 public MetricExecBase(string key, Metric.MetricDelegate method)
 {
     this.key = key;
     this.method = method;
 }