示例#1
0
        public static string Summarise(this IncidentType type)
        {
            switch (type)
            {
            case IncidentType.Burglary:
                return(IncidentSummaryResources.type_burglary);

            default:
                throw new IndexOutOfRangeException("Unrecognised incident type: " + type.ToString());
            }
        }
 public override void Dump(SourceBuilder builder)
 {
     builder.AppendFront("AdjustListHeads ");
     if (Type == AdjustListHeadsTypes.GraphElements)
     {
         builder.Append("GraphElements ");
         builder.AppendFormat("on {0} node:{1} {2}\n",
                              PatternElementName, IsNode, Parallel ? "Parallel " : "");
     }
     else // Type==AdjustListHeadsTypes.IncidentEdges
     {
         builder.Append("IncidentEdges ");
         builder.AppendFormat("on {0} from:{1} incident type:{2} {3}\n",
                              PatternElementName, StartingPointNodeName, IncidentType.ToString(), Parallel ? "Parallel " : "");
     }
 }