예제 #1
0
        public Interpreter(IGenericHelper genericHelper, IFunctionHelper functionHelper,
                           IIntegerHelper integerHelper, IRealHelper realHelper,
                           IBooleanHelper booleanHelper, ISetHelper setHelper,
                           IElementHelper elementHelper, IStringHelper stringHelper,
                           IGraphHelper graphHelper, bool catchExceptions)
        {
            _catchExceptions = catchExceptions;
            _exceptions      = new ComponentException();
            _functionHelper  = functionHelper;

            _integerHelper = integerHelper;
            _integerHelper.SetInterpreter(this);

            _realHelper = realHelper;
            _realHelper.SetInterpreter(this);

            _booleanHelper = booleanHelper;
            _booleanHelper.SetInterpreter(this);

            _genericHelper = genericHelper;
            _genericHelper.SetInterpreter(this);

            _setHelper = setHelper;
            _setHelper.SetInterpreter(this);

            _elementHelper = elementHelper;
            _elementHelper.SetInterpreter(this);

            _stringHelper = stringHelper;
            _stringHelper.SetInterpreter(this);

            _graphHelper = graphHelper;
            _graphHelper.SetInterpreter(this);
        }
예제 #2
0
 public AddItemAction(IShoppingListManager listManager, IDataProvider <Product> dataProvider, IStringHelper actionsHelper)
 {
     this.dataProvider   = dataProvider;
     this.actionsHelper  = actionsHelper;
     shoppingListManager = listManager;
     ActionString        = "add item";
 }
예제 #3
0
 public Logger(IJsonLogger jsonLogger, IHtmlLogger htmlLogger, IStringHelper stringHelper, IConsoleManager consoleManager)
 {
     _jsonLogger = jsonLogger;
     _htmlLogger = htmlLogger;
     _stringHelper = stringHelper;
     _consoleManager = consoleManager;
 }
예제 #4
0
 public PackageService(
     IDatabaseContext databaseContext,
     IStringHelper stringHelper)
 {
     _databaseContext = databaseContext;
     _stringHelper    = stringHelper;
 }
예제 #5
0
 public Logger(IJsonLogger jsonLogger, IHtmlLogger htmlLogger, IStringHelper stringHelper, IConsoleManager consoleManager)
 {
     _jsonLogger     = jsonLogger;
     _htmlLogger     = htmlLogger;
     _stringHelper   = stringHelper;
     _consoleManager = consoleManager;
 }
 public PackageNotificationTargetService(
     IDatabaseContext databaseContext,
     IStringHelper stringHelper)
 {
     _databaseContext = databaseContext;
     _stringHelper    = stringHelper;
 }
예제 #7
0
 public VerificationService(IImageService imageService,
                            IClientService clientService, IStringHelper stringHelper, IAudioService audioService)
 {
     this.audioService  = audioService;
     this.imageService  = imageService;
     this.clientService = clientService;
     this.stringHelper  = stringHelper;
 }
예제 #8
0
 public DataProcessor(IConsoleManager consoleManager, IStringHelper stringHelper, IWebCrawler webCrawler, IExcelLogger excelLogger, ILogger logger)
 {
     _consoleManager = consoleManager;
     _stringHelper   = stringHelper;
     _webCrawler     = webCrawler;
     _excelLogger    = excelLogger;
     _logger         = logger;
 }
예제 #9
0
 public DataProcessor(IConsoleManager consoleManager, IStringHelper stringHelper, IWebCrawler webCrawler, IExcelLogger excelLogger, ILogger logger)
 {
     _consoleManager = consoleManager;
     _stringHelper = stringHelper;
     _webCrawler = webCrawler;
     _excelLogger = excelLogger;
     _logger = logger;
 }
예제 #10
0
        public static Interpreter GetIntepreterOnlyWith(IBooleanHelper booleanHelper)
        {
            IFunctionHelper functionHelper = Substitute.For <IFunctionHelper>();
            IIntegerHelper  integerHelper  = Substitute.For <IIntegerHelper>();
            IRealHelper     realHelper     = Substitute.For <IRealHelper>();
            IGenericHelper  genericHelper  = Substitute.For <IGenericHelper>();
            ISetHelper      setHelper      = Substitute.For <ISetHelper>();
            IElementHelper  elemHelper     = Substitute.For <IElementHelper>();
            IStringHelper   stringHelper   = Substitute.For <IStringHelper>();
            IGraphHelper    graphHelper    = Substitute.For <IGraphHelper>();

            return(new Interpreter(genericHelper, functionHelper, integerHelper, realHelper, booleanHelper, setHelper, elemHelper, stringHelper, graphHelper, false));
        }
예제 #11
0
        public ClientService(IHostingHelper hostingHelper, IStringHelper stringHelper,
                             IAppSettingsHelper appSettingsHelper)
        {
            this.appSettingsHelper = appSettingsHelper;
            this.stringHelper      = stringHelper;
            validationItems        = new Dictionary <string, List <ValidationItem> >();
            pathToFile             = hostingHelper.GetRootPath("App_Data\\clients.json");

            using (TextReader reader = new StreamReader(pathToFile, Encoding.UTF8))
            {
                clientItems =
                    JsonConvert.DeserializeObject <Dictionary <string, ClientItem> >(reader.ReadToEnd());
            }
        }
예제 #12
0
        public TwitterFeedService(
            ILogger <TwitterFeedService> log,
            IConfiguration config,
            IColorLogWriter colorLogWriter,
            ITwitterHelperService twitterHelperService,
            IStringHelper stringHelper
            )
        {
            _log            = log;
            _config         = config;
            _colorLogWriter = colorLogWriter;
            _stringHelper   = stringHelper;

            _twitterHelperService = twitterHelperService;
            twitterTracker        = new TwitterTracker();
        }
예제 #13
0
        public RecordProcessorManager(
            IBoxLocations boxLocations,
            ILogger <IRecordProcessorManager> logger,
            IRecordProcessorBase processor,
            IStringHelper stringHelper)
        {
            this.stringHelper = stringHelper;
            this.logger       = logger;
            this.processor    = processor;
            this.TaskId       = processor.GUID;
            var fileInfo = new FileInfo(processor.ConfigFile);

            //configs for revealing processing stage
            this.ConfigFile        = fileInfo.FullName;
            this.RunningConfigFile = Path.Combine(boxLocations.RunningDir, fileInfo.Name);
            this.EndConfigFile     = Path.Combine(boxLocations.EndDir, fileInfo.Name);
            this.OutputFile        = Path.Combine(boxLocations.OutputDir, fileInfo.Name);
        }
예제 #14
0
 public LogHelper(IStringHelper stringHelper)
 {
     _stringHelper = stringHelper;
 }
예제 #15
0
 public PasswordHelper(IStringHelper stringHelper)
 {
     this._stringHelper = stringHelper;
 }
예제 #16
0
 public string NewFormatUserName(IStringHelper stringHelper, string userName)
 {
     return(stringHelper.ToBase64(userName));
 }
예제 #17
0
 /// <summary>
 /// 构造函数注入
 /// </summary>
 /// <param name="stringHelper"></param>
 public Users(IStringHelper stringHelper)
 {
     _stringHelper = stringHelper;
 }
예제 #18
0
 public StringHelperTests()
 {
     _stringHelper = new StringHelper();
 }
예제 #19
0
 public TwitterHelperService(IColorLogWriter colorLogWriter, IStringHelper stringHelper, IConfiguration config)
 {
     _colorLogWriter = colorLogWriter;
     _stringHelper   = stringHelper;
     _config         = config;
 }
예제 #20
0
 public HeaderGenerator(IStringHelper stringHelper)
 {
     _stringHelper = stringHelper;
 }
예제 #21
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="SourceFormatFactory"/> class.
 /// </summary>
 /// <param name="stringHelper"> SourceFormatFactory instance. </param>
 public SourceFormatFactory(IStringHelper stringHelper)
 {
     _stringHelper = stringHelper;
 }
예제 #22
0
 public FindItemAction(IDataProvider <Product> idataProvider, IStringHelper actionsHelper)
 {
     this.actionsHelper = actionsHelper;
     dataProvider       = idataProvider;
     ActionString       = "I want to buy";
 }
예제 #23
0
 public void Setup()
 {
     _target = new StringHelper();
 }
 public ModuleStructArgumentsHandler(IStringHelper stringHelper)
 {
     _stringHelper = stringHelper;
 }
예제 #25
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="DimensionStructureFactory"/> class.
 /// </summary>
 /// <param name="stringHelper"> StringHelper instance. </param>
 public DimensionStructureFactory(IStringHelper stringHelper)
 {
     _stringHelper = stringHelper ?? throw new ArgumentNullException($"{nameof(stringHelper)}");
 }
예제 #26
0
 public ApiHelper(ILogHelper logHelper, IStringHelper stringHelper)
 {
     _logHelper    = logHelper;
     _stringHelper = stringHelper;
 }