Esempio n. 1
0
 public static BasicOutputType <T> CreateAsOK(T item)
 {
     return(new BasicOutputType <T>()
     {
         Item = item,
         StandardRetur = StandardReturType.OK()
     });
 }
Esempio n. 2
0
 public static bool IsSucceeded(StandardReturType ret)
 {
     if (ret != null)
     {
         int code;
         if (int.TryParse(ret.StatusKode, out code))
         {
             return(code / 100 == (int)HttpErrorCode.OK / 100);
         }
     }
     return(false);
 }
Esempio n. 3
0
 public static StandardReturType ApplicationNameExists(string applicationName)
 {
     return(StandardReturType.Create(HttpErrorCode.BAD_CLIENT_REQUEST, string.Format("ApplicationName '{0}' already exists", applicationName)));
 }