Exemple #1
0
 public static BasicOutputType <T> CreateAsOK(T item)
 {
     return(new BasicOutputType <T>()
     {
         Item = item,
         StandardRetur = StandardReturType.OK()
     });
 }
 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);
 }
 public static StandardReturType ApplicationNameExists(string applicationName)
 {
     return(StandardReturType.Create(HttpErrorCode.BAD_CLIENT_REQUEST, string.Format("ApplicationName '{0}' already exists", applicationName)));
 }