[smuxi: 155/179] Engine: implement ServerModel copy constructor
- From: Mirco M. M. Bauer <mmmbauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [smuxi: 155/179] Engine: implement ServerModel copy constructor
- Date: Sat, 4 Nov 2017 05:50:43 +0000 (UTC)
commit 6badd5bde95c8422149277318e48b448046ea0ae
Author: Mirco Bauer <meebey meebey net>
Date: Sun Jun 4 13:18:26 2017 +0800
Engine: implement ServerModel copy constructor
src/Engine/Config/ServerModel.cs | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/src/Engine/Config/ServerModel.cs b/src/Engine/Config/ServerModel.cs
index 1c753c1..c0576e1 100644
--- a/src/Engine/Config/ServerModel.cs
+++ b/src/Engine/Config/ServerModel.cs
@@ -1,7 +1,7 @@
/*
* Smuxi - Smart MUltipleXed Irc
*
- * Copyright (c) 2007, 2010, 2012-2014 Mirco Bauer <meebey meebey net>
+ * Copyright (c) 2007, 2010, 2012-2014, 2017 Mirco Bauer <meebey meebey net>
*
* Full GPL License: <http://www.gnu.org/licenses/gpl.txt>
*
@@ -61,6 +61,28 @@ namespace Smuxi.Engine
{
}
+ public ServerModel(ServerModel server)
+ {
+ if (server == null) {
+ throw new ArgumentNullException("server");
+ }
+
+ UseEncryption = server.UseEncryption;
+ ValidateServerCertificate = server.ValidateServerCertificate;
+ ClientCertificateFilename = server.ClientCertificateFilename;
+ Protocol = server.Protocol;
+ Hostname = server.Hostname;
+ Port = server.Port;
+ Network = server.Network;
+ Nickname = server.Nickname;
+ Realname = server.Realname;
+ Username = server.Username;
+ Password = server.Password;
+ OnStartupConnect = server.OnStartupConnect;
+ OnConnectCommands = new List<string>(server.OnConnectCommands);
+ ServerID = server.ServerID;
+ }
+
protected ServerModel(SerializationInfo info, StreamingContext ctx)
{
Protocol = info.GetString("_Protocol");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]