Author: alanmc
Date: 2008-02-09 20:47:53 -0500 (Sat, 09 Feb 2008)
New Revision: 95351

Modified:
   trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs
   trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/TorrentSettings.cs
Log:
The clone methods work correctly now

Modified: 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs
===================================================================
--- 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs    
    2008-02-10 01:31:16 UTC (rev 95350)
+++ 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs    
    2008-02-10 01:47:53 UTC (rev 95351)
@@ -283,14 +283,7 @@
 
         public EngineSettings Clone()
         {
-            return new EngineSettings(this.savePath,
-                          this.listenPort,
-                          this.globalMaxConnections,
-                          this.globalMaxHalfOpenConnections,
-                          this.globalMaxDownloadSpeed,
-                          this.globalMaxUploadSpeed,
-                          this.minEncryptionLevel,
-                          this.allowLegacyConnections);
+            return (EngineSettings)MemberwiseClone();
         }
 
         public override bool Equals(object obj)

Modified: 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/TorrentSettings.cs
===================================================================
--- 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/TorrentSettings.cs   
    2008-02-10 01:31:16 UTC (rev 95350)
+++ 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/TorrentSettings.cs   
    2008-02-10 01:47:53 UTC (rev 95351)
@@ -205,11 +205,7 @@
 
         public TorrentSettings Clone()
         {
-            return new TorrentSettings(this.uploadSlots,
-                           this.maxConnections,
-                           this.MaxDownloadSpeed,
-                           this.maxUploadSpeed,
-                           this.fastResumeEnabled);
+            return (TorrentSettings)this.MemberwiseClone();
         }
 
         public override bool Equals(object obj)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to