Esempio n. 1
0
        public void InitPlugin(string[] args)
        {
            // start ..
            _log.Info("InitPlugin() called with args = {0}", (args == null) ? "" : string.Join(", ", args));

            // .. with built-in options
            _options = DocumentShelfOptions.CreateDefault();

            // try load defaults options from assy directory
            try
            {
                var newOpt =
                    AasxPluginOptionsBase.LoadDefaultOptionsFromAssemblyDir <DocumentShelfOptions>(
                        this.GetPluginName(), Assembly.GetExecutingAssembly());
                if (newOpt != null)
                {
                    _options = newOpt;
                }
            }
            catch (Exception ex)
            {
                _log.Error(ex, "Exception when reading default options {1}");
            }

            // index them!
            _options.IndexListOfRecords(_options.Records);
        }
Esempio n. 2
0
        public void InitPlugin(string[] args)
        {
            // start ..
            Log.Info("InitPlugin() called with args = {0}", (args == null) ? "" : string.Join(", ", args));

            // .. with built-in options
            options = AasxPluginBomStructure.BomStructureOptions.CreateDefault();

            // try load defaults options from assy directory
            try
            {
                var newOpt =
                    AasxPluginOptionsBase
                    .LoadDefaultOptionsFromAssemblyDir <AasxPluginBomStructure.BomStructureOptions>(
                        this.GetPluginName(), Assembly.GetExecutingAssembly());
                if (newOpt != null)
                {
                    this.options = newOpt;
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex, "Exception when reading default options {1}");
            }
        }
Esempio n. 3
0
        public void InitPlugin(string[] args)
        {
            // start ..
            Log.Info("InitPlugin() called with args = {0}", (args == null) ? "" : string.Join(", ", args));

            // .. with built-in options
            options = AasxPluginGenericForms.GenericFormOptions.CreateDefault();

            // try load defaults options from assy directory
            try
            {
                // need special settings
                var settings = AasxPluginOptionSerialization.GetDefaultJsonSettings(
                    new[] { typeof(AasxPluginGenericForms.GenericFormOptions), typeof(AasForms.FormDescBase) });

                // base options
                var newOpt =
                    AasxPluginOptionsBase.LoadDefaultOptionsFromAssemblyDir <AasxPluginGenericForms.GenericFormOptions>(
                        this.GetPluginName(), Assembly.GetExecutingAssembly(), settings);
                if (newOpt != null)
                {
                    this.options = newOpt;
                }

                // try find additional options
                this.options.TryLoadAdditionalOptionsFromAssemblyDir <AasxPluginGenericForms.GenericFormOptions>(
                    this.GetPluginName(), Assembly.GetExecutingAssembly(), settings, this.Log);
            }
            catch (Exception ex)
            {
                Log.Error(ex, "Exception when reading default options {1}");
            }
        }
Esempio n. 4
0
 public virtual void Merge(AasxPluginOptionsBase options)
 {
 }