Пример #1
0
 private void ifElseAsepct(AhainOfResponsibility ahainOfResponsibility)
 {
     foreach (var attribute in ifElseAsepctAttributes)
     {
         if (attribute.check(invocation.Arguments)) continue;
         attribute.checkForErrors();
         return;
     }
     ahainOfResponsibility.exectue();
 }
Пример #2
0
 private async void tryCatchAsepct(AhainOfResponsibility ahainOfResponsibility)
 {
     var attributes = tryCatchAsepctAttributes;
     var invocationAsepct = invocation;
     try
     {
         tryCatchAttributeBeforeAsepct(attributes);
         ahainOfResponsibility.exectue();
         var task = invocationAsepct.ReturnValue as Task;
         if (task == null)
         {
             tryCatchAttributeAfterAsepct(attributes);
         }
         else
         {
             await task;
             tryCatchAattributeAfterAsepctTask(task, attributes);
         }
     }
     catch
     {
         catchAsepct(attributes);
     }
 }
Пример #3
0
 private void asepct(AhainOfResponsibility ahainOfResponsibility)
 {
     var attributes = asepctAttributes;
     var invocationAsepct = invocation;
     attributeBeforeAsepct(attributes);
     ahainOfResponsibility.exectue();
     var task = invocationAsepct.ReturnValue as Task;
     if (task == null)
         attributeAfterAsepct(attributes);
     else
         attributeAfterAsepctTask(task, attributes);
 }