File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
ValveKeyValue/ValveKeyValue
Deserialization/KeyValues3 Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public void ReadObject()
2828 {
2929 Require . NotDisposed ( nameof ( KV3TextReader ) , disposed ) ;
3030
31- tokenReader . ReadHeader ( ) ;
31+ var file = tokenReader . ReadHeader ( ) ;
3232
3333 while ( stateMachine . IsInObject )
3434 {
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ KVToken ReadBinaryBlob()
139139 return new KVToken ( KVTokenType . BinaryBlob , sb . ToString ( ) ) ;
140140 }
141141
142- public KVToken ReadHeader ( )
142+ public KVFile ReadHeader ( )
143143 {
144144 var str = ReadToken ( ) ;
145145
@@ -222,7 +222,11 @@ public KVToken ReadHeader()
222222 throw new InvalidDataException ( $ "Unrecognized encoding specifier, expected '{ Format . Generic } ' but got '{ format } '.") ;
223223 }
224224
225- return new KVToken ( KVTokenType . Header , string . Empty ) ;
225+ return new KVFile
226+ {
227+ Encoding = encoding ,
228+ Format = format ,
229+ } ;
226230 }
227231
228232 KVToken ReadComment ( )
Original file line number Diff line number Diff line change 1+ using System ;
2+
3+ namespace ValveKeyValue
4+ {
5+ public class KVFile
6+ {
7+ public Guid Encoding { get ; set ; }
8+ public Guid Format { get ; set ; }
9+ public KVObject Root { get ; set ; }
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments