示例#1
0
 void DeepClone(IDeepClonable other)
 {
     // just to be sure ....
     if (other is ClassA)
     {
         var o = (ClassA)other;
         this.A = o.A;
     }
 }
示例#2
0
文件: Extension.cs 项目: Thomsch/EVA
 /// <summary>
 /// Add or modify a specific gene in the extension.
 /// </summary>
 /// <param name="tag">Name of the gene</param>
 /// <param name="data">Data associated</param>
 public void setGeneticData(string tag, IDeepClonable data)
 {
     geneticData.set(tag, data);
 }
示例#3
0
文件: Extension.cs 项目: Thomsch/EVA
 /// <summary>
 /// Add or modify a specific gene in the extension.
 /// </summary>
 /// <param name="tag">Name of the gene</param>
 /// <param name="data">Data associated</param>
 public void SetGeneticData(string tag, IDeepClonable data)
 {
     GeneticData.Set(tag, data);
 }
示例#4
0
 /// <summary>
 /// Add or modifiy a gene.
 /// </summary>
 /// <param name="element">The name of the gene</param>
 /// <param name="data">The value of the gene</param>
 public void Set(String element, IDeepClonable data)
 {
     this.data[element] = data;
 }
示例#5
0
 public Gene(Gene other)
 {
     this.Value = other.Value.Clone() as IDeepClonable <object>;
 }
示例#6
0
 public Gene(IDeepClonable <object> value)
 {
     this.Value = value;
 }