示例#1
0
        public void InitPlugin(string[] args)
        {
            logger.Info("InitPlugin() called with args = {0}", (args == null) ? "" : string.Join(", ", args));

            // .. with built-in options
            options = AasxUaNetServer.UaNetServerOptions.CreateDefault();

            // try load defaults options from assy directory
            try
            {
                var newOpt =
                    /* AasxPluginOptionsBase */ LoadDefaultOptionsFromAssemblyDirXXXX <
                        AasxUaNetServer.UaNetServerOptions>(
                        this.GetPluginName(), Assembly.GetExecutingAssembly());
                if (newOpt != null)
                {
                    this.options = newOpt;
                }
            }
            catch (Exception ex)
            {
                logger?.Error(ex, "Exception when reading default options {1}");
            }
        }
        /// <summary>
        /// Create a set of minimal options
        /// </summary>
        public static UaNetServerOptions CreateDefault()
        {
            var opt = new UaNetServerOptions();

            return(opt);
        }