public void AddAddtionalAction(AdditionalActionDelegate additionalActionDelegate , AddtionalActionSequence addtionalActionSequence) { switch (addtionalActionSequence) { case AddtionalActionSequence.First: AddToFirstStep(additionalActionDelegate); break; case AddtionalActionSequence.Last: AddToLastStep(additionalActionDelegate); break; case AddtionalActionSequence.BeforeAuthorization: AddToBeforeAuthorization(additionalActionDelegate); break; case AddtionalActionSequence.AfterAuthorization: AddToAfterAuthorization(additionalActionDelegate); break; case AddtionalActionSequence.BeforeValidation: AddToBeforeValidation(additionalActionDelegate); break; case AddtionalActionSequence.AfterValidation: AddToAfterValidation(additionalActionDelegate); break; case AddtionalActionSequence.BeforeRequestProcessing: AddToBeforeRequestProcessing(additionalActionDelegate); break; case AddtionalActionSequence.AfterRequestProcessing: AddToAfterRequestProcessing(additionalActionDelegate); break; } }
public static void AddApFrameworkGloablAction( AdditionalActionDelegate action , AddtionalActionSequence sequence) { GlobalActions.Add(new KeyValuePair <AddtionalActionSequence, AdditionalActionDelegate>(sequence, action)); }