コード例 #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
ファイル: GeneticData.cs プロジェクト: Thomsch/EVA
 /// <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
ファイル: Gene.cs プロジェクト: TermanEmil/GeneticLib
 public Gene(Gene other)
 {
     this.Value = other.Value.Clone() as IDeepClonable <object>;
 }
コード例 #6
0
ファイル: Gene.cs プロジェクト: TermanEmil/GeneticLib
 public Gene(IDeepClonable <object> value)
 {
     this.Value = value;
 }