public EdgeMessageProcessor(ISystemVocabularyAccessor systemVocabularyAccessor , IVariableAccessor variableAccessor , IRandomNumberService randomPercentService) { _systemVocabularyAccessor = systemVocabularyAccessor; _variableAccessor = variableAccessor; _randomPercentService = randomPercentService; }
public SessionEngine(ISettingsAccessor settingsAccessor , IStringService stringService , IScriptAccessor scriptAccessor , ITimerFactory timerFactory , IFlagAccessor flagAccessor , IImageAccessor imageAccessor , IVideoAccessor videoAccessor , IVariableAccessor variableAccessor , ITauntAccessor tauntAccessor , ISystemVocabularyAccessor systemVocabularyAccessor , IVocabularyAccessor vocabularyAccessor , ILineCollectionFilter lineCollectionFilter , IRandomNumberService randomNumberService , IConfigurationAccessor configurationAccessor , INotifyUser notifyUser , IPathsAccessor pathsAccessor , IGetCommandProcessorsService getCommandProcessorsService , IInterpolationProcessor interpolationProcessor ) { CommandProcessors = getCommandProcessorsService.CreateCommandProcessors(); CommandProcessors[Keyword.StartStroking].CommandProcessed += StartStrokingCommandProcessed; CommandProcessors[Keyword.Edge].CommandProcessed += EdgeCommandProcessed; CommandProcessors[Keyword.End].CommandProcessed += EndCommandProcessed; CommandProcessors[Keyword.TauntFromFile].CommandProcessed += TauntFromFileCommandProcessed; CommandProcessors[Keyword.ShowImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowButtImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowBoobsImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.SearchImageBlog].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowHardcoreImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowSoftcoreImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowLesbianImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowBlowjobImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowFemdomImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowLezdomImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowHentaiImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowGayImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowMaledomImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowCaptionsImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowGeneralImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowLikedImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowDislikedImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowBlogImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.NewBlogImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.ShowLocalImage].CommandProcessed += ShowImageCommandProcessed; CommandProcessors[Keyword.PlayVideo].CommandProcessed += PlayVideoCommandProcessed; CommandProcessors[Keyword.PlayJoiVideo].CommandProcessed += PlayVideoCommandProcessed; CommandProcessors[Keyword.PlayCockHeroVideo].CommandProcessed += PlayVideoCommandProcessed; CommandProcessors[Keyword.PlayCensorshipSucks].CommandProcessed += PlayCensorshipSucksVideoTauntCommandProcessed; CommandProcessors[Keyword.PlayRedLightGreenLight].CommandProcessed += PlayRedLightGreenLightVideoTauntCommandProcessed; CommandProcessors[Keyword.StopVideo].CommandProcessed += StopVideoCommandProcessed; CommandProcessors[Keyword.PauseVideo].CommandProcessed += PauseVideoCommandProcessed; CommandProcessors[Keyword.UnpauseVideo].CommandProcessed += UnpauseVideoCommandProcessed; CommandProcessors[Keyword.ShowCensorshipBar].CommandProcessed += ShowCensorshipBarCommandProcessed; CommandProcessors[Keyword.HideCensorshipBar].CommandProcessed += HideCensorshipBarCommandProcessed; CommandProcessors[Keyword.SendDailyTasks].CommandProcessed += RequestTaskCommandProcessed; CommandProcessors[Keyword.VitalSubAssignment].CommandProcessed += VitalSubAssignmentCommandProcessed; MessageProcessors = CreateMessageProcessors(settingsAccessor, stringService, new LineService(), systemVocabularyAccessor, variableAccessor, new RandomNumberService()); MessageProcessors[MessageProcessor.ScriptResponse].MessageProcessed += ScriptResponse_MessageProcessed; MessageProcessors[MessageProcessor.EdgeDetection].MessageProcessed += EdgeDetection_MessageProcessed; CommandProcessors[Keyword.RiskyPickStart].CommandProcessed += RiskyPickStartCommandProcessed; CommandProcessors[Keyword.LikeImage].BeforeCommandProcessed += LikeImageCommandProcessed; _scriptAccessor = scriptAccessor; _variableAccessor = variableAccessor; _configurationAccessor = configurationAccessor; _scriptTimer = timerFactory.Create(); _scriptTimer.Elapsed += _scriptTimer_Elapsed; _tauntTimer = timerFactory.Create(); _tauntTimer.Elapsed += _tauntTimer_Elapsed; _teaseCountDown = timerFactory.Create(); _teaseCountDown.Elapsed += _teaseCountDown_Elapsed; _vocabularyProcesser = new VocabularyProcessor(lineCollectionFilter, new LineService(), vocabularyAccessor, imageAccessor, randomNumberService, settingsAccessor); _interpolationProcessor = interpolationProcessor; }
private Dictionary <MessageProcessor, IMessageProcessor> CreateMessageProcessors(ISettingsAccessor settingsService , IStringService stringService , LineService lineService , ISystemVocabularyAccessor systemVocabularyAccessor , IVariableAccessor variableAccessor , IRandomNumberService randomPercentService ) { var rval = new Dictionary <MessageProcessor, IMessageProcessor>(); rval.Add(MessageProcessor.Greeting, new GreetingMessageProcessor(settingsService, stringService)); rval.Add(MessageProcessor.Safeword, new SafewordMessageProcessor()); rval.Add(MessageProcessor.ScriptResponse, new ScriptResponseMessageProcessor(lineService)); rval.Add(MessageProcessor.EdgeDetection, new EdgeMessageProcessor(systemVocabularyAccessor, variableAccessor, randomPercentService)); return(rval); }