コード例 #1
0
ファイル: Control64.cs プロジェクト: zbrad/FabricLib
        /// <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];
                }
            }
        }
コード例 #2
0
ファイル: ClusterSettings.cs プロジェクト: zbrad/FabricLib
        /// <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;
        }