public SetDefaultAlternativeParameterCommand(PKSim.Core.Model.ParameterAlternativeGroup parameterGroup, PKSim.Core.Model.ParameterAlternative parameterAlternative, IExecutionContext context)
 {
     _parameterGroup = parameterGroup;
      _parameterGroupId = _parameterGroup.Id;
      _parameterAlternative = parameterAlternative;
      _oldDefaultAlternative = parameterGroup.DefaultAlternative;
      _oldDefaultAlternativeId = _oldDefaultAlternative.Id;
      ObjectType = PKSimConstants.ObjectTypes.Compound;
      CommandType = PKSimConstants.Command.CommandTypeEdit;
      BuildingBlockId = context.BuildingBlockIdContaining(parameterGroup);
      Description = PKSimConstants.Command.SetDefaultAlternativeParameterDescription(context.DisplayNameFor(parameterGroup), _oldDefaultAlternative.Name, parameterAlternative.Name);
      ShouldChangeVersion = false;
      context.UpdateBuildinBlockProperties(this, context.BuildingBlockContaining(parameterGroup));
 }
 protected override void ClearReferences()
 {
     _parameterGroup = null;
      _parameterAlternative = null;
      _oldDefaultAlternative = null;
 }
 public override void RestoreExecutionData(IExecutionContext context)
 {
     base.RestoreExecutionData(context);
      _parameterGroup = context.Get<PKSim.Core.Model.ParameterAlternativeGroup>(_parameterGroupId);
      _oldDefaultAlternative = context.Get<PKSim.Core.Model.ParameterAlternative>(_oldDefaultAlternativeId);
 }
Ejemplo n.º 4
0
 public virtual void RemoveAlternative(ParameterAlternative parameterAlternative) => RemoveChild(parameterAlternative);
Ejemplo n.º 5
0
 public virtual void AddAlternative(ParameterAlternative parameterAlternative) => Add(parameterAlternative);
Ejemplo n.º 6
0
 protected override void Because()
 {
     _result = sut.CreateDefaultAlternativeFor(_compoundParameterGroup);
 }