File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/Razor/src/Microsoft.AspNetCore.Razor.ProjectEngineHost/ProjectSystem Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) .NET Foundation. All rights reserved.
2
2
// Licensed under the MIT license. See License.txt in the project root for license information.
3
3
4
+ using System ;
5
+ using System . Buffers ;
4
6
using System . Collections . Immutable ;
5
7
using System . IO ;
6
8
using MessagePack ;
@@ -45,9 +47,15 @@ public RazorProjectInfo(
45
47
Documents = documents . NullToEmpty ( ) ;
46
48
}
47
49
50
+ public void SerializeTo ( IBufferWriter < byte > bufferWriter )
51
+ => MessagePackSerializer . Serialize ( bufferWriter , this , s_options ) ;
52
+
48
53
public void SerializeTo ( Stream stream )
49
54
=> MessagePackSerializer . Serialize ( stream , this , s_options ) ;
50
55
56
+ public static RazorProjectInfo ? DeserializeFrom ( ReadOnlyMemory < byte > buffer )
57
+ => MessagePackSerializer . Deserialize < RazorProjectInfo > ( buffer , s_options ) ;
58
+
51
59
public static RazorProjectInfo ? DeserializeFrom ( Stream stream )
52
60
=> MessagePackSerializer . Deserialize < RazorProjectInfo > ( stream , s_options ) ;
53
61
}
You can’t perform that action at this time.
0 commit comments