Author: alanmc
Date: 2008-02-09 20:31:16 -0500 (Sat, 09 Feb 2008)
New Revision: 95350

Modified:
   trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs
Log:
API Cleanup - the same reasons as for TorrentSettings

Modified: 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs
===================================================================
--- 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs    
    2008-02-10 01:28:42 UTC (rev 95349)
+++ 
trunk/bitsharp/src/MonoTorrent/MonoTorrent.Client/Settings/EngineSettings.cs    
    2008-02-10 01:31:16 UTC (rev 95350)
@@ -202,7 +202,10 @@
         #region Constructors
 
         public EngineSettings()
+            : this(DefaultSavePath, DefaultListenPort, DefaultMaxConnections, 
DefaultMaxHalfOpenConnections,
+                  DefaultMaxDownloadSpeed, DefaultMaxUploadSpeed, 
DefaultMinLevel, DefaultAllowLegacyConnections)
         {
+
         }
 
 
@@ -273,29 +276,21 @@
 
         #region Methods
 
-        public object Clone()
+        object ICloneable.Clone()
         {
-            return new EngineSettings(this.savePath,
-                                      this.listenPort,
-                                      this.globalMaxConnections,
-                                      this.globalMaxHalfOpenConnections,
-                                      this.globalMaxDownloadSpeed,
-                                      this.globalMaxUploadSpeed,
-                                      this.minEncryptionLevel,
-                                      this.allowLegacyConnections);
+            return Clone();
         }
 
-        public void CopyFrom(EngineSettings other)
+        public EngineSettings Clone()
         {
-            this.allowLegacyConnections = other.allowLegacyConnections;
-            this.globalMaxConnections = other.globalMaxConnections;
-            this.globalMaxDownloadSpeed = other.globalMaxDownloadSpeed;
-            this.globalMaxHalfOpenConnections = 
other.globalMaxHalfOpenConnections;
-            this.globalMaxUploadSpeed = other.globalMaxUploadSpeed;
-            this.haveSupressionEnabled = other.haveSupressionEnabled;
-            this.listenPort = other.listenPort;
-            this.minEncryptionLevel = other.minEncryptionLevel;
-            this.savePath = other.savePath;
+            return new EngineSettings(this.savePath,
+                          this.listenPort,
+                          this.globalMaxConnections,
+                          this.globalMaxHalfOpenConnections,
+                          this.globalMaxDownloadSpeed,
+                          this.globalMaxUploadSpeed,
+                          this.minEncryptionLevel,
+                          this.allowLegacyConnections);
         }
 
         public override bool Equals(object obj)
@@ -325,25 +320,5 @@
         }
 
         #endregion Methods
-
-
-        #region Default Settings
-
-        /// <summary>
-        /// Returns a new copy of the default settings for the engine
-        /// </summary>
-        public static EngineSettings DefaultSettings()
-        {
-            return new EngineSettings(DefaultSavePath,
-                                     DefaultListenPort,
-                                     DefaultMaxConnections,
-                                     DefaultMaxHalfOpenConnections,
-                                     DefaultMaxDownloadSpeed,
-                                     DefaultMaxUploadSpeed,
-                                     DefaultMinLevel,
-                                     DefaultAllowLegacyConnections);
-        }
-
-        #endregion
     }
 }
\ No newline at end of file

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

Reply via email to