public static Responder getInstance() { if (instance != null) { return(instance); } instance = new BoringResponder(); return(instance); }
public static Responder GetResponder(string name) { if (name == null) { return(BoringResponder.getInstance()); } if (name.ToLower().StartsWith("arn")) { return(ArnieResponder.getInstance()); } else if (name.ToLower().StartsWith("marx") || name.ToLower().StartsWith("karl")) { return(MarxResponder.getInstance()); } else { return(BoringResponder.getInstance()); } }