Ejemplo n.º 1
0
 public static APIController GetAPI(APIEnum api,string userName, string password, string apiId)
 {
     switch (api)
     {
         case APIEnum.HTTP:
             return new API.HTTP(userName, password, apiId);
         case APIEnum.REST:
             return new API.REST(userName, password, apiId);
         default:
             throw new NotImplementedException(string.Format("APIEnum {0:F} does not exist.",api));
     }
 }
Ejemplo n.º 2
0
        public static APIController GetAPI(APIEnum api, string userName, string password, string apiId)
        {
            switch (api)
            {
            case APIEnum.HTTP:
                return(new API.HTTP(userName, password, apiId));

            case APIEnum.REST:
                return(new API.REST(userName, password, apiId));

            default:
                throw new NotImplementedException(string.Format("APIEnum {0:F} does not exist.", api));
            }
        }