Exemple #1
0
        public UndoCommandService(Container container, IFunctionStrategyService <UndoAction, object, object> undoStrategy)
        {
            _container    = container;
            _undoStrategy = undoStrategy;

            InitializeUndoStrategy();
        }
Exemple #2
0
 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);
 }
Exemple #3
0
        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)); });
 }
Exemple #5
0
 public TaskCardItemsService(IFunctionStrategyService <string, string, bool> validationStrategy)
 {
     _validationStrategy = validationStrategy;
     InitializeItemsStrategy();
 }