Пример #1
0
 void DeepClone(IDeepClonable other)
 {
     // just to be sure ....
     if (other is ClassA)
     {
         var o = (ClassA)other;
         this.A = o.A;
     }
 }
Пример #2
0
 /// <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
 /// <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;
 }