public override bool InitializeDocument(params object[] args)
        {
            if (args.Length > 1 && args[1] is UserDefinedUnitEnvironments availableEnvironments)
            {
                _availableEnvironments = availableEnvironments;
            }

            return(base.InitializeDocument(args));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="UserDefinedUnitEnvironmentsService"/> class.
 /// Reads the environments from the property service.
 /// </summary>
 public UserDefinedUnitEnvironmentsService()
 {
     Environments = Current.PropertyService.GetValue(UserDefinedUnitEnvironments.PropertyKeyDefaultInstance,
                                                     Altaxo.Main.Services.RuntimePropertyKind.UserAndApplicationAndBuiltin);
 }