Ejemplo n.º 1
0
        /// <summary>
        /// creates a control container
        /// </summary>
        /// <param name="clusterSettings">cluster settings to use</param>
        /// <param name="packageSettings">package settings to use</param>
        public Control64(ClusterSettings clusterSettings, PackageSettings packageSettings)
        {
            if (clusterSettings != null)
            {
                foreach (string k in clusterSettings.Data.Keys)
                {
                    this.control.Cluster.Data[k] = clusterSettings.Data[k];
                }
            }

            if (packageSettings != null)
            {
                foreach (string k in packageSettings.Data.Keys)
                {
                    this.control.Package.Data[k] = packageSettings.Data[k];
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// try to create a new <see cref="PackageSettings"/>
        /// </summary>
        /// <param name="args">arguments to use</param>
        /// <param name="clusterSettings">the new package settings</param>
        /// <returns>true if successful</returns>
        public static bool TryCreate(string[] args, out ClusterSettings clusterSettings)
        {
            clusterSettings = null;

            if (args == null)
            {
                return false;
            }

            clusterSettings = new ClusterSettings();
            clusterSettings.InitDefs(args);

            return true;
        }