Пример #1
0
        public static Responder getInstance()
        {
            if (instance != null)
            {
                return(instance);
            }

            instance = new MarxResponder();
            return(instance);
        }
Пример #2
0
 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());
     }
 }