Example #1
0
 //Constructors
 /// <summary>
 /// Creates an unitialized instance.
 /// </summary>
 /// <param name="networksCfg">The configuration of the cluster networks.</param>
 /// <param name="weightsCfg">The configuration of the macro-weights.</param>
 public TNRNetClusterSingleBoolSettings(TNRNetClusterSingleBoolNetworksSettings networksCfg,
                                        TNRNetClusterSingleBoolWeightsSettings weightsCfg
                                        )
 {
     NetworksCfg = (TNRNetClusterSingleBoolNetworksSettings)networksCfg.DeepClone();
     WeightsCfg  = (TNRNetClusterSingleBoolWeightsSettings)weightsCfg.DeepClone();
     Check();
     return;
 }
Example #2
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">A xml element containing the configuration data.</param>
        public TNRNetClusterSingleBoolSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            NetworksCfg = new TNRNetClusterSingleBoolNetworksSettings(settingsElem.Element("networks"));
            WeightsCfg  = new TNRNetClusterSingleBoolWeightsSettings(settingsElem.Element("weights"));
            Check();
            return;
        }
 /// <summary>
 /// The deep copy constructor.
 /// </summary>
 /// <param name="source">The source instance.</param>
 public TNRNetClusterSingleBoolNetworksSettings(TNRNetClusterSingleBoolNetworksSettings source)
     : this(source.NetworkCfgCollection)
 {
     return;
 }