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);
 }
예제 #4
0
 public virtual void RemoveAlternative(ParameterAlternative parameterAlternative) => RemoveChild(parameterAlternative);
예제 #5
0
 public virtual void AddAlternative(ParameterAlternative parameterAlternative) => Add(parameterAlternative);
예제 #6
0
 protected override void Because()
 {
     _result = sut.CreateDefaultAlternativeFor(_compoundParameterGroup);
 }