예제 #1
0
 public LinkSteamCommand(IConstants constants, IBarebonesSteamOpenId openId,
                         EfDatabaseContextFactory databaseContextFactory)
 {
     _constants = constants;
     _openId    = openId;
     _databaseContextFactory = databaseContextFactory;
 }
예제 #2
0
 public StatusCommand(IArkContext context, IConfig config, IConstants constants, ArkContextManager contextManager)
 {
     _context        = context;
     _config         = config;
     _constants      = constants;
     _contextManager = contextManager;
 }
예제 #3
0
        public DockLayoutViewModel(ILayoutViewModel parent, IConstants constants, IEventAggregator eventAggregator)
        {
            this.eventAggregator = eventAggregator ?? throw new ArgumentNullException("eventAggregator");
            this.layoutParent    = parent;

            this.layoutFilename = constants.LayoutFileName;
        }
 public AuthenticationController(IUserService userService,
                                 IConstants constants,
                                 ITokenService tokenService) : base(userService)
 {
     _constants    = constants;
     _tokenService = tokenService;
 }
        public MediaResourcePackageManager(IBaseModule module, IConstants constants)
        {
            this.lesson = module as Lesson;
            this.constants = constants;

            this.BuildPackageVersionName();
        }
            public override void processEvent(Event @event)
            {
                Video      video       = (Video)@event.properties.get(Event.VIDEO);
                IAdContext adContext   = (IAdContext)@event.properties.get(FreeWheelController.AD_CONTEXT_KEY);
                IConstants adConstants = adContext.Constants;

                // This overrides what the plugin does by default for setVideoAsset() which is to pass in currentVideo.getId().
                adContext.setVideoAsset("3pqa_video", video.Duration / 1000, null, adConstants.VIDEO_ASSET_AUTO_PLAY_TYPE_ATTENDED(), (int)Math.Floor(new Random(1).NextDouble() * int.MaxValue), 0, adConstants.ID_TYPE_CUSTOM(), 0, adConstants.VIDEO_ASSET_DURATION_TYPE_EXACT());                 // duration type -  fallback ID -  type of video ID passed (customer created or FW issued) -  setting networkId for 0 as it's the default value for this method -  a random number -  auto play type -  location -  FW uses their duration as seconds; Android is in milliseconds -  video ID

                adContext.addSiteSectionNonTemporalSlot("300x250slot", null, 300, 250, null, true, null, null);

                // Add preroll
                Log.v(outerInstance.TAG, "Adding temporal slot for prerolls");
                adContext.addTemporalSlot("larry", "PREROLL", 0, null, 0, 0, null, null, 0);

                // Add midroll
                Log.v(outerInstance.TAG, "Adding temporal slot for midrolls");

                int midrollCount  = 1;
                int segmentLength = (video.Duration / 1000) / (midrollCount + 1);

                for (int i = 0; i < midrollCount; i++)
                {
                    adContext.addTemporalSlot("moe" + i, "MIDROLL", segmentLength * (i + 1), null, 0, 0, null, null, 0);
                }

                // Add postroll
                Log.v(outerInstance.TAG, "Adding temporal slot for postrolls");
                adContext.addTemporalSlot("curly", "POSTROLL", video.Duration / 1000, null, 0, 0, null, null, 0);

                // Add overlay
                Log.v(outerInstance.TAG, "Adding temporal slot for overlays");
                adContext.addTemporalSlot("shemp", "OVERLAY", 8, null, 0, 0, null, null, 0);
            }
        public ContentResourcePackageManager(IBaseModule module, IConstants constants)
        {
            this.level     = module as Level;
            this.constants = constants;

            this.BuildPackageVersionName();
        }
예제 #8
0
        /// <summary>
        /// Constructs a Protocol object.
        /// </summary>
        /// <param name="treeView">TreeViewEx object which holds the contact list for the application</param>
        /// <param name="taskbarNotify">TaskbarNotify object which pops up on certain events</param>
        /// <param name="fileName">Filename of the plugin assembly</param>
        /// <param name="mainStorage">IStorage instance where the application's settings are stored</param>
        public Protocol(TreeViewEx treeView, TaskbarNotifier taskbarNotify, string fileName,
                        IStorage mainStorage)
        {
            this.treeView      = treeView;
            this.taskbarNotify = taskbarNotify;

            this.classFactory = new ClassFactory(fileName);

            // create plugin constants class
            IConstants constants = classFactory.CreateConstants();

            this.localStorage = mainStorage.CreateSubSection(constants.Name);

            // create registry key for this protocol to store the settings
            this.settings = classFactory.CreateSettings(constants, this.localStorage, this.optionsList);
            this.settings.Load();

            // create protocol control and register this class to be an event listener
            this.protocolServer = new ProtocolServer();
            this.protocolServer.AddListener(this);

            this.protocolControl = new ProtocolControl(this.protocolServer);

            this.reporter = new NBM.Diagnostics.ProtocolReporter(this);
        }
예제 #9
0
 public LinkSteamCommand(IConstants constants, IBarebonesSteamOpenId openId, IUrlShortenerService urlShortenerService, EfDatabaseContextFactory databaseContextFactory)
 {
     _constants              = constants;
     _openId                 = openId;
     _urlShortenerService    = urlShortenerService;
     _databaseContextFactory = databaseContextFactory;
 }
예제 #10
0
        public SelectedBrushCreator(IEventAggregator eventAggregator, IConstants constants, ScrollModel scrollModel)
        {
            this.eventAggregator = eventAggregator ?? throw new ArgumentNullException("eventAggregator is null");
            this.constants       = constants ?? throw new ArgumentNullException("constants is null");

            this.ScrollModel = scrollModel;
        }
예제 #11
0
 public void Dispose()
 {
     _shipFactory  = null;
     _boardFactory = null;
     _logger       = null;
     _constants    = null;
 }
        public ContentResourcePackageManager(IBaseModule module, IConstants constants)
        {
            this.level = module as Level;
            this.constants = constants;

            this.BuildPackageVersionName();
        }
예제 #13
0
        private static SystemVersion _registerVersion(string browserVersion, IConstants constants, string loaderName, string[] payloadVersions)
        {
            var ret = new SystemVersion(browserVersion, constants, loaderName, payloadVersions);

            Versions.Add(ret);
            return(ret);
        }
예제 #14
0
 public SystemVersion(string browserVersion, IConstants constants, string loaderName, string[] payloadVersions)
 {
     BrowserVersion  = browserVersion;
     Constants       = constants;
     LoaderName      = loaderName;
     PayloadVersions = payloadVersions;
 }
        public MediaResourcePackageManager(IBaseModule module, IConstants constants)
        {
            this.lesson    = module as Lesson;
            this.constants = constants;

            this.BuildPackageVersionName();
        }
예제 #16
0
        public ArkDiscordBot(
            DiscordSocketClient discord,
            CommandService commands,
            IServiceProvider serviceProvider,
            IConfig config,
            IConstants constants,
            EfDatabaseContextFactory databaseContextFactory,
            ILifetimeScope scope,
            ArkContextManager contextManager)
        {
            _discord                = discord;
            _commands               = commands;
            _serviceProvider        = serviceProvider;
            _config                 = config;
            _constants              = constants;
            _databaseContextFactory = databaseContextFactory;
            _scope          = scope;
            _contextManager = contextManager;

            _discord.GuildAvailable  += DiscordOnGuildAvailable;
            _discord.MessageReceived += HandleCommandAsync;

            var args = Environment.GetCommandLineArgs();

            if (args != null && args.Contains("/restart", StringComparer.OrdinalIgnoreCase))
            {
                _wasRestarted = true;
            }
        }
예제 #17
0
 public HomeController(ICategoryRepository categoryRepository, IProductRepository productRepository,
     IConstants constants)
 {
     _categoryRepository = categoryRepository;
     _productRepository = productRepository;
     _constants = constants;
 }
예제 #18
0
 public ProcessorManager(IDispatcher dispatcher, IConstants constants)
 {
     this.Constants = constants;
     this.Clients = GlobalHost.ConnectionManager.GetHubContext<StebsHub>().Clients;
     this.Dispatcher = dispatcher;
     this.Dispatcher.StateChanged += StateChanged;
     this.Dispatcher.FinishedStep += FinishedStep;
 }
예제 #19
0
 public StartNodeCreator([NotNull] IConstants constants
                         , [NotNull] IThreadQuadTreeNodeCreatorFactory threadNodeFactory
                         , [NotNull] IQuadTreeNodeMerger quadTreeNodeMerger)
 {
     mConstants = constants;
     mThreadQuadTreeNodeCreatorFactory = threadNodeFactory;
     mQuadTreeNodeMerger = quadTreeNodeMerger;
 }
예제 #20
0
 public StartUpNodeInitializer([NotNull] IPlanetFactoryCreator planetFactoryCreator
                               , [NotNull] IConstants constants
                               , [NotNull] IArrayBackgroundWorker backgroundWorker)
 {
     mPlanetFactoryCreator = planetFactoryCreator;
     mConstants            = constants;
     mBackgroundWorker     = backgroundWorker;
 }
예제 #21
0
파일: StebsHub.cs 프로젝트: TheJP/stebs
 public StebsHub(IConstants constants, IMpm mpm, IProcessorManager manager, IFileManager fileManager, IPluginManager pluginManager)
 {
     this.Constants = constants;
     this.Mpm = mpm;
     this.Manager = manager;
     this.FileManager = fileManager;
     this.PluginManager = pluginManager;
 }
예제 #22
0
        public ItemEditorCreator(IEventAggregator eventAggregator, IConstants constants, IAmeSession session, TilesetModel tilesetModel, ScrollModel scrollModel)
        {
            this.eventAggregator = eventAggregator ?? throw new ArgumentNullException("eventAggregator is null");
            this.constants       = constants ?? throw new ArgumentNullException("constants is null");
            this.session         = session ?? throw new ArgumentNullException("session is null");

            this.TilesetModel = tilesetModel;
            this.ScrollModel  = scrollModel;
        }
        // Support Lesson media package now.
        public MediaMapfileManager(IBaseModule baseModule, IConstants constants)
        {
            this.baseModule = baseModule;
            this.constants = constants;

            this.Mapfile = new Mapfile();

            this.filePath = this.constants.LocalMediaPath + string.Format(@"lesson_{0}.json", this.baseModule.Id);
        }
        // Support Lesson media package now.
        public ContentMapfileManager(IBaseModule baseModule, IConstants constants)
        {
            this.baseModule = baseModule;
            this.constants = constants;

            this.Mapfile = new Mapfile();

            this.filePath = this.constants.LocalContentPath + string.Format(@"level_{0}_{1}.json", this.baseModule.Id, this.constants.CultureCode);
        }
예제 #25
0
        // Support Lesson media package now.
        public ContentMapfileManager(IBaseModule baseModule, IConstants constants)
        {
            this.baseModule = baseModule;
            this.constants  = constants;

            this.Mapfile = new Mapfile();

            this.filePath = this.constants.LocalContentPath + string.Format(@"level_{0}_{1}.json", this.baseModule.Id, this.constants.CultureCode);
        }
        // Support Lesson media package now.
        public MediaMapfileManager(IBaseModule baseModule, IConstants constants)
        {
            this.baseModule = baseModule;
            this.constants  = constants;

            this.Mapfile = new Mapfile();

            this.filePath = this.constants.LocalMediaPath + string.Format(@"lesson_{0}.json", this.baseModule.Id);
        }
예제 #27
0
        public Protocol(
            IConstants constants,
            IHttp http)
        {
            Ensure.Argument.IsNotNull(constants, nameof(constants));
            Ensure.Argument.IsNotNull(http, nameof(http));

            this.constants = constants;
            this.http      = http;
        }
예제 #28
0
        public ProtocolClient(
            IConstants constants,
            IHttpClient client)
        {
            Ensure.Argument.IsNotNull(constants, nameof(constants));
            Ensure.Argument.IsNotNull(client, nameof(client));

            this.constants = constants;
            this.client    = client;
        }
예제 #29
0
        public ArkServerService(IConstants constants, IConfig config, ArkContextManager contextManager)
        {
            _signaller = new Signaller <Tuple <ArkServerContext, bool, SavegameBackupResult> >();

            _constants      = constants;
            _config         = config;
            _contextManager = contextManager;

            contextManager.BackupCompleted += ContextManager_BackupCompleted;
        }
예제 #30
0
    public PlayerSpawner(IConstants constants)
    {
        float spawnWidth  = constants.HalfGameWidth / 2.0f;
        float spawnHeight = constants.HalfGameHeight / 2.0f;

        _topLeftSpawn     = new Vector3(-spawnWidth, spawnHeight, 0.0f);
        _topRightSpawn    = new Vector3(spawnWidth, spawnHeight, 0.0f);
        _bottomLeftSpawn  = new Vector3(-spawnWidth, -spawnHeight, 0.0f);
        _bottomRightSpawn = new Vector3(spawnWidth, -spawnHeight, 0.0f);
    }
예제 #31
0
    private void Start()
    {
        _constants = (IConstants)NullChecker
                     .TryFind <Constants>(Tags.Constants, gameObject);

        _gameController = (IGameController)NullChecker
                          .TryFind <GameController>(Tags.GameController, gameObject);

        _scoreController = _gameController.ScoreController;
    }
예제 #32
0
        public MapEditorCreator(IEventAggregator eventAggregator, IConstants constants, IAmeSession session, Map map, ScrollModel scrollModel)
        {
            this.eventAggregator = eventAggregator ?? throw new ArgumentNullException("eventAggregator is null");
            this.constants       = constants ?? throw new ArgumentNullException("constants is null");
            this.session         = session ?? throw new ArgumentNullException("session is null");

            this.ScrollModel = scrollModel;
            string mapTitle = string.Format("Map #{0}", session.MapCount);

            this.Map = map ?? new Map(mapTitle);
        }
예제 #33
0
 public BoardManager(IBoardFactory boardFactory, IConstants constants)
 {
     _boardFactory = boardFactory;
     _constants    = constants;
     ShipTypes     = new Dictionary <ShipType, int>
     {
         { ShipType.Battleship, _constants.NumberOfBattleships },
         { ShipType.Destroyer, _constants.NumberOfDestroyers }
     };
     GameBoard = _boardFactory.InitialiseBoard(ShipTypes);
 }
예제 #34
0
 public VisiblePlanetDataProvider([NotNull] INodeVisitor nodeVisitor
                                  , [NotNull] IRootNodeProvider rootNodeProvider
                                  , [NotNull] IPlayer player
                                  , [NotNull] IConstants constants)
 {
     mNodeVisitor      = nodeVisitor;
     mRootNodeProvider = rootNodeProvider;
     mPlayer           = player;
     mConstants        = constants;
     mVisiblePlanets   = new List <PlanetData>(mConstants.GetPlanetsToVisualize());
 }
예제 #35
0
        //private readonly Uri fullContentLink;

        public CourseContentResourceService(IDownloadService downloadService, IConstants constants)
        {
            this.ModuleId        = constants.CourseId;
            this.downloadService = downloadService;
            this.constants       = constants;

            // Get all course content.
            var fullContentLink = new Uri(this.constants.ServicePrefix + string.Format(courseLink, this.ModuleId, this.constants.SiteVersion, this.constants.CultureCode, this.constants.PartnerCode));

            // Download activity content.
            this.Content = downloadService.DownloadFromPath(fullContentLink);
        }
        //private readonly Uri fullContentLink;
        public CourseContentResourceService(IDownloadService downloadService, IConstants constants)
        {
            this.ModuleId = constants.CourseId;
            this.downloadService = downloadService;
            this.constants = constants;

            // Get all course content.
            var fullContentLink = new Uri(this.constants.ServicePrefix + string.Format(courseLink, this.ModuleId, this.constants.SiteVersion, this.constants.CultureCode, this.constants.PartnerCode));

            // Download activity content.
            this.Content = downloadService.DownloadFromPath(fullContentLink);
        }
        public UnitContentResourceService(IDownloadService downloadService, int unitId, IConstants constants)
        {
            this.downloadService = downloadService;
            this.ModuleId        = unitId;
            this.constants       = constants;

            // Get all course content.
            this.fullContentLink = new Uri(constants.ServicePrefix + string.Format(unitLink, this.ModuleId, this.constants.CultureCode, this.constants.SiteVersion, this.constants.PartnerCode));

            // Download unit content.
            this.Content = downloadService.DownloadFromPath(this.fullContentLink);
        }
        public LevelContentResourceService(IDownloadService downloadService, int levelId, IConstants constants)
        {
            this.downloadService = downloadService;

            this.ModuleId = levelId;

            // Get all course content.
            this.fullContentLink = new Uri(constants.ServicePrefix + string.Format(levelLink, this.ModuleId, constants.CultureCode, constants.SiteVersion, constants.PartnerCode));

            // Download activity content.
            this.Content = downloadService.DownloadFromPath(this.fullContentLink);
        }
예제 #39
0
 /// <summary>
 /// Load all assemblies which are found in the plugin folder.
 /// </summary>
 private void LoadPluginAssemblies(IConstants constants)
 {
     if (!Directory.Exists(constants.PluginsAbsolutePath))
     {
         Directory.CreateDirectory(constants.PluginsAbsolutePath);
     }
     foreach(var file in Directory.EnumerateFiles(constants.PluginsAbsolutePath, "*.dll", SearchOption.AllDirectories))
     {
         try { Assembly.LoadFrom(file); }
         catch (Exception) { } //TODO: Log warning
     }
 }
        public UnitContentResourceService(IDownloadService downloadService, int unitId, IConstants constants)
        {
            this.downloadService = downloadService;
            this.ModuleId = unitId;
            this.constants = constants;

            // Get all course content.
            this.fullContentLink = new Uri(constants.ServicePrefix + string.Format(unitLink, this.ModuleId, this.constants.CultureCode, this.constants.SiteVersion, this.constants.PartnerCode));

            // Download unit content.
            this.Content = downloadService.DownloadFromPath(this.fullContentLink);
        }
예제 #41
0
    private void Start()
    {
        _getAxisService = this;
        _constants      = (IConstants)NullChecker
                          .TryFind <Constants>(Tags.Constants, gameObject);

        _gameController = (IGameController)NullChecker
                          .TryFind <GameController>(Tags.GameController, gameObject);

        _speed         = _constants.HalfGameWidth;
        _playerSpawner = new PlayerSpawner(_constants);
        _playerSpawner.SetSpawnPosition(_rb);
    }
        //
        public LevelContentResourceDownloadManager(IDownloadService downloadService, IBaseModule module, IContentResourceServcie resourceService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.levelContentResourceService = resourceService;
            this.constants = constants;

            this.Level = module as Level;

            var filePath = string.Format(@"level_{0}\{1}\Level_{2}.json", this.Level.Id, this.constants.CultureCode, this.Level.Id);
            this.savePath = this.constants.LocalContentPath + filePath;

            this.ResourceList = new List<MapfileItem>();

            MapfileItem f = new MapfileItem();
            f.FileName = filePath;

            this.ResourceList.Add(f);
        }
        //
        public UnitContentResourceDownloadManager(IDownloadService downloadService, IBaseModule unit, IContentResourceServcie unitContentService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.constants = constants;
            this.unitContentService = unitContentService;

            this.Unit = unit as Unit;

            var originalContent = unitContentService.Content;

            // Replace swf to jpg, flv to mp4
            ContentHelper.ReplaceUrlFileFormat(ref originalContent);
            ContentHelper.ReplaceUrlToLocalResourcePath(ref originalContent);

            this.updatedContent = originalContent;

            this.ResourceList = new List<MapfileItem>();
            this.BuildDownloadResource();
        }
        public MediaResourceDownloadManager(IDownloadService downloadService, IBaseModule module, IContentResourceServcie activityContentResourceService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.baseModule = module;
            this.constants = constants;
            this.activityContentResourceService = activityContentResourceService;

            string oriContent = this.activityContentResourceService.Content;
            mediaList = ContentHelper.GetMediaResources(ref oriContent);

            this.ResourceList = new List<MapfileItem>();

            // Build ResourceList for Mapfile.
            foreach (var m in mediaList)
            {
                MapfileItem f = new MapfileItem();
                f.FileName = m;
                ResourceList.Add(f);
            }
        }
예제 #45
0
        /// <summary>
        /// Creates an instance of the plugin-implemented ProtocolSettings class.
        /// </summary>
        /// <param name="constants"></param>
        /// <param name="storage"></param>
        /// <param name="optionsList"></param>
        /// <returns></returns>
        public ProtocolSettings CreateSettings(IConstants constants, IStorage storage, ArrayList optionsList)
        {
            ProtocolSettings settings = null;

            try
            {
                settings = (ProtocolSettings)this.assembly.CreateInstance(Config.Constants.SettingsClassName, true,
                    BindingFlags.CreateInstance, null,
                    new object[] { constants, storage, optionsList }, null, null);
            }
            catch
            {}
            finally
            {
                if (settings == null)
                    settings = new ProtocolSettings(constants, storage, optionsList);
            }

            return settings;
        }
        //
        public ActivityContentResourceDownloadManager(IDownloadService downloadService, IBaseModule activity, IContentResourceServcie resourceService, IConstants constants)
        {
            this.downloadService = downloadService;
            this.constants = constants;
            this.activityContentResourceService = resourceService;

            ResourceList = new List<MapfileItem>();

            this.Activity = activity as Activity;

            string oriContent = activityContentResourceService.Content;

            // Replace swf to jpg, flv to mp4
            ContentHelper.ReplaceUrlFileFormat(ref oriContent);

            ContentHelper.ReplaceUrlToLocalResourcePath(ref oriContent);

            this.updatedContent = oriContent;

            BuildDownloadResource();
        }
 public RefreshController(IProductSearcher searcher, IAutoupdateRefresher autoupdateRefresher, IConstants constants)
 {
     _searcher = searcher;
     _autoupdateRefresher = autoupdateRefresher;
     _constants = constants;
 }
 public RefreshController(ISuggestionSearcher searcher, IConstants constants)
 {
     _searcher = searcher;
     _constants = constants;
 }
 public CourseStructureManager(IDownloadService ds, IContentResourceServcie resource, IConstants constants)
 {
     this.downloadService = ds;
     this.constants = constants;
     this.courseContentResourceService = resource;
 }
예제 #50
0
 public Settings(IConstants constants, IStorage storage, ArrayList optionsList)
     : base(constants, storage, optionsList)
 {
 }
예제 #51
0
 /// <summary>
 /// Adds a constant to the context.
 /// </summary>
 /// <param name="name">
 /// The name of the constant.
 /// </param>
 /// <param name="constant">
 /// The class instance of the constant.
 /// </param>
 /// <returns>The current context.</returns>
 public ParseContext AddConstant(String name, IConstants constant)
 {
     _constants[name] = constant;
     return this;
 }
예제 #52
0
 /// <summary>
 /// Constructs a ProtocolSettings
 /// </summary>
 /// <param name="constants"></param>
 /// <param name="storage"></param>
 /// <param name="optionsList"></param>
 public ProtocolSettings(IConstants constants, IStorage storage, ArrayList optionsList)
 {
     this.storage = storage;
     this.constants = constants;
 }
 public SearchResultsController(IProductSearcher searcher, IConstants constants)
 {
     _searcher = searcher;
     _constants = constants;
 }