/// <summary> /// Initializes a new instance of the <see cref="ElementBaseRowViewModel{T}" /> class /// </summary> /// <param name="elementBase">The associated <see cref="ElementBase" /></param> /// <param name="currentDomain">The active <see cref="DomainOfExpertise" /></param> /// <param name="session">The associated <see cref="ISession" /></param> /// <param name="containerViewModel">The container view-model</param> protected ElementBaseRowViewModel( T elementBase, DomainOfExpertise currentDomain, ISession session, IViewModelBase <Thing> containerViewModel, IObfuscationService obfuscationService) : base(elementBase, session, containerViewModel) { this.parameterBaseCache = new Dictionary <ParameterBase, IRowViewModelBase <ParameterBase> >(); this.parameterBaseContainerMap = new Dictionary <ParameterBase, ParameterGroup>(); this.parameterGroupCache = new Dictionary <ParameterGroup, ParameterGroupRowViewModel>(); this.parameterGroupContainment = new Dictionary <ParameterGroup, ParameterGroup>(); this.ParameterBaseListener = new Dictionary <ParameterBase, IDisposable>(); this.ObfuscationService = obfuscationService; this.currentDomain = currentDomain; this.UpdateOwnerProperties(); this.UpdateObfuscationProperties(); this.PropertyChanged += (sender, args) => { if (args.PropertyName == nameof(this.Owner)) { this.UpdateOwnerProperties(); } }; this.UpdateModelCode(); }
/// <summary> /// Initializes a new instance of the <see cref="ElementUsageRowViewModel"/> class /// </summary> /// <param name="elementUsage">The associated <see cref="ElementUsage"/></param> /// <param name="currentExpertise">The active <see cref="DomainOfExpertise"/></param> /// <param name="session">The associated <see cref="ISession"/></param> /// <param name="containerViewModel">The container view-model</param> /// <param name="obfuscationService">The obfuscation service</param> public ElementUsageRowViewModel(ElementUsage elementUsage, DomainOfExpertise currentExpertise, ISession session, IViewModelBase <Thing> containerViewModel, IObfuscationService obfuscationService) : base(elementUsage, currentExpertise, session, containerViewModel, obfuscationService) { this.AllOptions = new ReactiveList <Option>(); this.ExcludedOptions = new ReactiveList <Option>(); this.SelectedOptions = new ReactiveList <Option>(); this.PropertyChanged += (s, e) => { if (e.PropertyName == nameof(this.SelectedOptions)) { this.ExcludedOptions = new ReactiveList <Option>(this.AllOptions.Except(this.SelectedOptions)); } if (e.PropertyName == nameof(this.ExcludedOptions)) { if (!this.SelectedOptions.Any()) { this.HasExcludes = null; this.OptionToolTip = "This ElementUsage is not used in any option."; } else { this.HasExcludes = this.ExcludedOptions.Any(); if (this.HasExcludes.Value) { var excludedOptionNames = string.Join("\n", this.ExcludedOptions.Select(o => o.Name)); this.OptionToolTip = $"This ElementUsage is excluded from options:\n\r{excludedOptionNames}"; } else if (!this.HasExcludes.Value) { this.OptionToolTip = "This ElementUsage is used in all options."; } } this.SendUpdateExcludedOptionOperation(); } }; this.UpdateOptionLists(); this.PopulateParameterGroups(); this.UpdateProperties(); }
public CohortCounter( IOptions <RuntimeOptions> opts, IOptions <DeidentificationOptions> deidentOpts, PanelConverter converter, PanelValidator validator, IPatientCohortService counter, ICohortCacheService cohortCache, IObfuscationService obfuscator, IUserContext user, ILogger <CohortCounter> log) { this.runtime = opts.Value.Runtime; this.deidentOpts = deidentOpts.Value; this.converter = converter; this.validator = validator; this.counter = counter; this.obfuscator = obfuscator; this.cohortCache = cohortCache; this.user = user; this.log = log; }
public ObfuscateFlushLogArgsService(IObfuscationService obfuscationService) { _obfuscationService = obfuscationService; }
public GitController(IGitToJarService service, IObfuscationService obfuscation) { _service = service; _obfuscation = obfuscation; }
/// <summary> /// Initializes a new instance of the <see cref="ElementDefinitionRowViewModel"/> class /// </summary> /// <param name="elementDefinition">The associated <see cref="ElementDefinition"/></param> /// <param name="currentDomain">The active <see cref="DomainOfExpertise"/></param> /// <param name="session">The associated <see cref="ISession"/></param> /// <param name="containerViewModel">The container view-model</param> /// <param name="obfuscationService">The obfuscation service</param> public ElementDefinitionRowViewModel(ElementDefinition elementDefinition, DomainOfExpertise currentDomain, ISession session, IViewModelBase <Thing> containerViewModel, IObfuscationService obfuscationService) : base(elementDefinition, currentDomain, session, containerViewModel, obfuscationService) { this.UpdateProperties(); }
protected virtual void ObfuscateProperty <T>(T objectToObfuscate, PropertyInfo propertyInfo, IObfuscationService obfuscator) { // get property value var oldValue = propertyInfo.GetValue(objectToObfuscate); if (oldValue == null) { return; } // run obfuscator var obfuscatedValue = obfuscator.Obfuscate(oldValue); // set new value to property propertyInfo.SetValue(objectToObfuscate, obfuscatedValue); }
public ObfuscateController(IObfuscationService service) { _service = service; }