summary refs log tree commit diff
path: root/crypto/src/asn1/BERSequenceParser.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/BERSequenceParser.cs')
-rw-r--r--crypto/src/asn1/BERSequenceParser.cs42
1 files changed, 24 insertions, 18 deletions
diff --git a/crypto/src/asn1/BERSequenceParser.cs b/crypto/src/asn1/BERSequenceParser.cs
index 8474b8d24..5fa1de8a6 100644
--- a/crypto/src/asn1/BERSequenceParser.cs
+++ b/crypto/src/asn1/BERSequenceParser.cs
@@ -1,24 +1,30 @@
+using System;
+
 namespace Org.BouncyCastle.Asn1
 {
-	public class BerSequenceParser
-		: Asn1SequenceParser
-	{
-		private readonly Asn1StreamParser _parser;
+    public class BerSequenceParser
+        : Asn1SequenceParser
+    {
+        private readonly Asn1StreamParser _parser;
+
+        internal BerSequenceParser(Asn1StreamParser parser)
+        {
+            this._parser = parser;
+        }
 
-		internal BerSequenceParser(
-			Asn1StreamParser parser)
-		{
-			this._parser = parser;
-		}
+        public IAsn1Convertible ReadObject()
+        {
+            return _parser.ReadObject();
+        }
 
-		public IAsn1Convertible ReadObject()
-		{
-			return _parser.ReadObject();
-		}
+        public Asn1Object ToAsn1Object()
+        {
+            return Parse(_parser);
+        }
 
-		public Asn1Object ToAsn1Object()
-		{
-			return new BerSequence(_parser.ReadVector());
-		}
-	}
+        internal static BerSequence Parse(Asn1StreamParser sp)
+        {
+            return new BerSequence(sp.ReadVector());
+        }
+    }
 }