Beispiel #1
0
 public static ProjectHookClient ParseHook(ProjectHookTypeClient hookType)
 {
     if (hookType.HookType == ProjectHookType.push)
     {
         return(HttpRequestParser.Parse <PushHookClient>(hookType.Json));
     }
     if (hookType.HookType == ProjectHookType.merge_request)
     {
         return(HttpRequestParser.Parse <MergeRequestHookClient>(hookType.Json));
     }
     if (hookType.HookType == ProjectHookType.build)
     {
         return(HttpRequestParser.Parse <BuildHookClient>(hookType.Json));
     }
     return(null);
 }
Beispiel #2
0
 public static ProjectHookTypeClient ParseHookType(string json)
 {
     return(HttpRequestParser.Parse <ProjectHookTypeClient>(json));
 }