From b430c71bff5b4370e7ff2582229a259ad1808afb Mon Sep 17 00:00:00 2001 From: sta Date: Sun, 23 Feb 2020 22:02:39 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/WebHeaderCollection.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index fe19250b..585f2ba9 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -575,7 +575,8 @@ namespace WebSocketSharp.Net /// An element with the specified name isn't found in . /// protected WebHeaderCollection ( - SerializationInfo serializationInfo, StreamingContext streamingContext) + SerializationInfo serializationInfo, StreamingContext streamingContext + ) { if (serializationInfo == null) throw new ArgumentNullException ("serializationInfo"); @@ -585,10 +586,12 @@ namespace WebSocketSharp.Net _state = (HttpHeaderType) serializationInfo.GetInt32 ("State"); var cnt = serializationInfo.GetInt32 ("Count"); + for (var i = 0; i < cnt; i++) { base.Add ( serializationInfo.GetString (i.ToString ()), - serializationInfo.GetString ((cnt + i).ToString ())); + serializationInfo.GetString ((cnt + i).ToString ()) + ); } } catch (SerializationException ex) {