public UndoCommandService(Container container, IFunctionStrategyService <UndoAction, object, object> undoStrategy) { _container = container; _undoStrategy = undoStrategy; InitializeUndoStrategy(); }
private void InitializeEmailStrategy() { _emailStrategy = new FunctionStrategyService <EmailType, MessageData, Task>(); _emailStrategy.AddStrategy(EmailType.ConfirmAccount, SendConfirmAccountMessage); _emailStrategy.AddStrategy(EmailType.ChangeEmail, SendChangeEmailMessage); _emailStrategy.AddStrategy(EmailType.ResetPassword, SendResetPasswordMessage); _emailStrategy.AddStrategy(EmailType.UserMessage, SendMessageFromUser); }
internal OAuthRegisterDataService(IOAuthWrapper oAuthWrapper) { _registerDataService = new FunctionStrategyService <string, OAuthResult, OAuthRegisterData>(); _registerDataService.AddStrategy("google", new GoogleRegisterDataStrategy(oAuthWrapper).Execute) .AddStrategy("facebook", new FacebookRegisterDataStrategy(oAuthWrapper).Execute) .AddStrategy("twitter", new TwitterRegisterDataStrategy(oAuthWrapper).Execute) .SetDefaultStrategy(ThrowUnknownProvider); }
private void InitializeItemModelTypeStrategy() { itemModelTypeStrategy = new FunctionStrategyService <int, Type>(); itemModelTypeStrategy.AddStrategy((int)ItemType.TableRect, () => { return(typeof(TableRectModel)); }); itemModelTypeStrategy.AddStrategy((int)ItemType.TableRound, () => { return(typeof(TableRoundModel)); }); itemModelTypeStrategy.AddStrategy((int)ItemType.PillarRect, () => { return(typeof(PillarRectModel)); }); itemModelTypeStrategy.AddStrategy((int)ItemType.PillarRound, () => { return(typeof(PillarRoundModel)); }); itemModelTypeStrategy.AddStrategy((int)ItemType.StageRect, () => { return(typeof(StageRectModel)); }); itemModelTypeStrategy.AddStrategy((int)ItemType.StageHalfCircle, () => { return(typeof(StageHalfCircleModel)); }); }
public TaskCardItemsService(IFunctionStrategyService <string, string, bool> validationStrategy) { _validationStrategy = validationStrategy; InitializeItemsStrategy(); }