public ComboGestureCompilerInternal( ComboGestureIntegrator integrator) { _animatorController = (AnimatorController)integrator.animatorController; _conflictPrevention = ConflictPrevention.OfIntegrator(integrator.writeDefaults); // FIXME: Incorrect pattern in use here, none of those are necessary _comboLayers = new List <GestureComboStageMapper>(); _parameterGeneration = ParameterGeneration.Unique; _gesturePlayableLayerController = null; _customEmptyClip = null; _analogBlinkingUpperThreshold = 0f; _featuresToggles = 0; _conflictPreventionTempGestureLayer = ConflictPrevention.OfFxLayer(WriteDefaultsRecommendationMode.UseUnsupportedWriteDefaultsOn); _compilerConflictFxLayerMode = ConflictFxLayerMode.KeepBoth; _compilerIgnoreParamList = new AnimationClip(); _compilerFallbackParamList = new AnimationClip(); _avatarDescriptor = null; _expressionsAvatarMask = null; _logicalAvatarMask = null; _weightCorrectionAvatarMask = null; _gesturePlayableLayerExpressionsAvatarMask = null; _gesturePlayableLayerTechnicalAvatarMask = null; _integrateLimitedLipsync = false; _limitedLipsync = null; _assetContainer = null; _useGestureWeightCorrection = false; _useSmoothing = _useGestureWeightCorrection; }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @After public void resetFeatureToggle() public void resetFeatureToggle() { FeatureToggles.clear(typeof(MultipleIndexPopulator), BATCH_SIZE_NAME); FeatureToggles.clear(typeof(BatchingMultipleIndexPopulator), BATCH_SIZE_NAME); FeatureToggles.clear(typeof(MultipleIndexPopulator), QUEUE_THRESHOLD_NAME); FeatureToggles.clear(typeof(BatchingMultipleIndexPopulator), QUEUE_THRESHOLD_NAME); }
void Start() { if (FeatureToggles.Get().persons) { Populate(); } }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeClass public static void setUpFeatureToggles() public static void SetUpFeatureToggles() { // Configure populator so that it will use block-based population and reduce batch size and increase number of workers // so that population will very likely create more batches in more threads (affecting number of buffers used) FeatureToggles.set(typeof(GenericNativeIndexPopulator), BLOCK_BASED_POPULATION_NAME, true); FeatureToggles.set(typeof(BlockBasedIndexPopulator), BLOCK_SIZE_NAME, _testBlockSize); }
void Update() { if (FeatureToggles.Get().predators) { MaybePopulate(); } }
private static void SetupOverrides(Dictionary <string, bool> dictionary) { var overrides = new Mock <IOverrideProvider>(); overrides.Setup(x => x.GetOverrides()).Returns(dictionary); FeatureToggles.SetOverrideProvider(overrides.Object); }
public DeliveryModelServiceTestFixture() { var fixture = new Fixture(); _apiClient = new Mock <IProviderCoursesApiClient <ProviderCoursesApiConfiguration> >(); _commitmentsApiClient = new Mock <ICommitmentsV2ApiClient <CommitmentsV2ApiConfiguration> >(); _fjaaApiClient = new Mock <IFjaaApiClient <FjaaApiConfiguration> >(); _featureToggles = new FeatureToggles { ApprovalsFeatureToggleFjaaEnabled = true }; _apiResponse = fixture.Create <GetHasPortableFlexiJobOptionResponse>(); _accountLegalEntityResponse = fixture.Create <GetAccountLegalEntityResponse>(); _flexiJobAgencyResponse = new ApiResponse <GetAgencyResponse>(null, HttpStatusCode.NotFound, string.Empty); _apprenticeshipId = null; _apiClient .Setup(x => x.Get <GetHasPortableFlexiJobOptionResponse>(It.IsAny <GetDeliveryModelsRequest>())) .ReturnsAsync(_apiResponse); _commitmentsApiClient.Setup(x => x.Get <GetAccountLegalEntityResponse>(It.IsAny <GetAccountLegalEntityRequest>())) .ReturnsAsync(_accountLegalEntityResponse); _fjaaApiClient.Setup(x => x .GetWithResponseCode <GetAgencyResponse>(It.IsAny <GetAgencyRequest>())) .ReturnsAsync(_flexiJobAgencyResponse); _handler = new Approvals.Services.DeliveryModelService(_apiClient.Object, _fjaaApiClient.Object, _commitmentsApiClient.Object, Mock.Of <ILogger <Approvals.Services.DeliveryModelService> >(), _featureToggles); }
/// <summary> /// Base size of blocks of entries. As entries gets written to a BlockStorage, they are buffered up to this size, then sorted and written out. /// As blocks gets merged into bigger blocks, this is still the size of the read buffer for each block no matter its size. /// Each thread has its own buffer when writing and each thread has <seealso cref="mergeFactor"/> buffers when merging. /// The memory usage will be at its biggest during merge and a total memory usage sum can be calculated like so: /// /// blockSize * numberOfPopulationWorkers * <seealso cref="mergeFactor"/> /// /// where typically <seealso cref="BatchingMultipleIndexPopulator"/> controls the number of population workers. The setting /// `unsupported.dbms.multi_threaded_schema_index_population_enabled` controls whether or not the multi-threaded <seealso cref="BatchingMultipleIndexPopulator"/> /// is used, otherwise a single-threaded populator is used instead. /// </summary> public static int ParseBlockSize() { long blockSize = ByteUnit.parse(FeatureToggles.getString(typeof(BlockBasedIndexPopulator), BLOCK_SIZE_NAME, "1M")); Preconditions.checkArgument(blockSize >= 20 && blockSize < int.MaxValue, "Block size need to fit in int. Was " + blockSize); return(( int )blockSize); }
protected void Start() { _originalLocalPosition = transform.localPosition; _originalScale = transform.localScale * 1.5f; transform.localScale = _originalScale; _featureToggles = FeatureToggles.Get(); _worldPlane = WorldPlane.Get(); if (isStartingInteractor) { GetComponentInParent <BlockInteractionPalette>().Select(this); Activate(); } _ghost = Instantiate(BlockFactory.Get().interactableGhostTemplate); _ghost.SetActive(false); _nonInteractableGhost = Instantiate(BlockFactory.Get().nonInteractableGhostTemplate); _nonInteractableGhost.SetActive(false); _started = true; }
private void Start() { _sandSpreadController = SandSpreadController.Get(); _worldPlane = WorldPlane.Get(); _block = GetComponentInChildren <Block>(); _featureToggles = FeatureToggles.Get(); }
public static NextSection Next(ChangeOfCircs form, Sections completedSection) { var index = _order.IndexOf(completedSection) + 1; Sections?nextSection = null; while (!nextSection.HasValue && index < _order.Count) { var section = _order[index]; if (!FeatureToggles.SkipWorkInProgressSection(section)) { var strategy = SectionStrategy.For(section); if (strategy.Required(form)) { nextSection = section; } else { strategy.SkipSection(form); } } index++; } return(new NextSection { Id = form.Id, Section = nextSection, }); }
// The single-threaded setting makes the test deterministic. The multi-threaded variant has the same problem tested below. //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Before public void setFeatureToggle() public void setFeatureToggle() { // let our populator have fine-grained insight into updates coming in FeatureToggles.set(typeof(MultipleIndexPopulator), BATCH_SIZE_NAME, 1); FeatureToggles.set(typeof(BatchingMultipleIndexPopulator), BATCH_SIZE_NAME, 1); FeatureToggles.set(typeof(MultipleIndexPopulator), QUEUE_THRESHOLD_NAME, 1); FeatureToggles.set(typeof(BatchingMultipleIndexPopulator), QUEUE_THRESHOLD_NAME, 1); }
public DeliveryModelService(IProviderCoursesApiClient <ProviderCoursesApiConfiguration> apiClient, IFjaaApiClient <FjaaApiConfiguration> fjaaClient, ICommitmentsV2ApiClient <CommitmentsV2ApiConfiguration> commitmentsV2ApiClient, ILogger <DeliveryModelService> logger, FeatureToggles featureToggles) { _apiClient = apiClient; _fjaaClient = fjaaClient; _commitmentsV2ApiClient = commitmentsV2ApiClient; _logger = logger; _featureToggles = featureToggles; }
private static LayoutToggle GetElement(Guid itemId, string currentLanguage, Func <Feature, IList <LayoutToggle> > expression) { return(FeatureToggles.GetAllEnabledFeatures() .Where(x => x.EnabledForLanguage(currentLanguage)) .SelectMany(expression.Invoke) .Where(x => x != null) .FirstOrDefault(x => x.Id == itemId)); }
public void GetAllFeatures_GivenFeatureEnabledConfig_ReturnsEnabledFeature() { var feature = FeatureToggles.GetAllFeatures().FirstOrDefault(x => x.Name == "featureenabled"); Assert.IsNotNull(feature); Assert.AreEqual("featureenabled", feature.Name); Assert.AreEqual(true, feature.Enabled); }
public ContactUsAreaControllerTests() { _featureToggles = new FeatureToggles { ContactUsArea = true }; _controller = new ContactUsAreaController(_repository.Object, _featureToggles, _logger.Object); }
void Start() { _worldPlane = GetComponent <WorldPlane>(); _lastPlacedHouse = Time.fixedTime - 10; _sandSpreadController = SandSpreadController.Get(); _featureToggles = FeatureToggles.Get(); _workQueue = WorkQueue.Get(); }
public void GetsSublayoutsCorrectly() { var sublayouts = FeatureToggles.GetAllSublayoutReplacements().ToArray(); Assert.AreEqual(1, sublayouts.Length); Assert.IsTrue(sublayouts[0].Enabled); Assert.AreEqual(new Guid("{AD909EB2-A8E8-484C-BA23-E0CC137142A1}"), sublayouts[0].Original); Assert.AreEqual(new Guid("{E8A4B6F9-E787-45A1-AB8A-3883405C4436}"), sublayouts[0].New); }
public void GetCssClassesForFeatures_GivenNoLanguage_ReturnsCorrectString() { var featuresForClass = FeatureToggles.GetCssClassesForFeatures(); Assert.IsTrue(featuresForClass.Contains(" feat-enabledbutwronglanguage")); Assert.IsTrue(featuresForClass.Contains(" feat-enabledforcurrentlanguage")); Assert.IsTrue(featuresForClass.Contains(" no-feat-featuredisabled")); Assert.IsTrue(featuresForClass.Contains("feat-featureenabled")); }
public AlertsInlineTagParserTest() { _featureToggles = new FeatureToggles() { SemanticInlineAlert = true }; _viewRenderer = new Mock <IViewRender>(); _mockLogger = new Mock <ILogger <Alert> >(); _alertsInlineTagParser = new AlertsInlineTagParser(_viewRenderer.Object, _mockLogger.Object, _featureToggles); }
public FeatureToggle AddNewFeatureToggle(string key, string description) { Guard.IsFalse(FeatureToggles.Any(x => x.Key == key), "Duplicated key for this application"); var featureToggle = FeatureToggle.New(key, description, this); FeatureToggles.Add(featureToggle); return(featureToggle); }
public void GetOverrideProvider_ReturnsCurrentProvider() { var provider = Substitute.For <IOverrideProvider>(); FeatureToggles.SetOverrideProvider(provider); var overrides = FeatureToggles.GetOverrideProviders(); overrides.Should().Contain(provider); }
public void GetAllFeatures_ReturnsFeaturesDescriptionAndStepsAlongWithTheFeatures() { //Arrange var feature = FeatureToggles.GetAllFeatures().First(); //Assert Assert.IsNotNull(feature); Assert.AreEqual("Short description", feature.ShortDescription); Assert.AreEqual("<li>Step1</li>", feature.Requirements); }
public void GetAllFeatures_GivenFeatureEnabledConfigButOverriddenByTheUser_ReturnsDisabledFeature() { SetupOverrides(new Dictionary <string, bool> { { "featureenabledTest", false } }); var enabled = FeatureToggles.IsEnabled("featureenabledTest"); Assert.False(enabled); }
public bool IsLot() { if (FeatureToggles.Get().desertsAreBeaches) { return(IsGrass() || IsSand()); } else { return(IsGrass()); } }
public bool CanBeDugAsAnIndependentBlock() { if (FeatureToggles.Get().desertsAreBeaches) { return(IsGrass() || IsSand()); } else { return(IsGrass()); } }
public async Task ShouldIncludeFeatureTogglesInHealthcheck() { var featureToggles = new FeatureToggles(); var healthCheckServiceWithNotFoundVersion = CreateHealthcheckService(_appVersionPath, _shaPath, featureToggles); var check = await healthCheckServiceWithNotFoundVersion.Get(); check.FeatureToggles.Should().NotBeNull(); check.FeatureToggles.Should().BeEquivalentTo(featureToggles); }
public Healthcheck(string appVersion, string businessId, string sha, FeatureToggles featureToggles, Dictionary <string, Healthcheck> dependencies, string environment, List <RedisValueData> redisValueData) { AppVersion = appVersion; BusinessId = businessId; SHA = sha; FeatureToggles = featureToggles; Dependencies = dependencies ?? new Dictionary <string, Healthcheck>(); Environment = environment; RedisValueData = redisValueData; }
public ViewModelService( ICategoryService categoryService, ISiteSettingsService settings, IStyleService styleService, IProductService productService, IOptions <FeatureToggles> featureToggles) { _settings = settings; _styleService = styleService; _productService = productService; _categoryService = categoryService; _featureToggles = featureToggles.Value; }
protected override void CreateChildControls() { if (FeatureToggles.IsEnabled(FeatureName)) { EnabledTemplate.InstantiateIn(this); } else { DisabledTemplate.InstantiateIn(this); } base.CreateChildControls(); }