File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/ModelContextProtocol/Protocol/Types Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1- using System . Text . Json ;
1+ using System . ComponentModel ;
2+ using System . Text . Json ;
23using System . Text . Json . Serialization ;
34
45namespace ModelContextProtocol . Protocol . Types ;
@@ -27,8 +28,13 @@ internal ResourceContents()
2728 public string ? MimeType { get ; set ; }
2829}
2930
30- internal class ResourceContentsConverter : JsonConverter < ResourceContents >
31+ /// <summary>
32+ /// Converter for <see cref="ResourceContents"/>.
33+ /// </summary>
34+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
35+ public class ResourceContentsConverter : JsonConverter < ResourceContents >
3136{
37+ /// <inheritdoc/>
3238 public override ResourceContents ? Read ( ref Utf8JsonReader reader , Type typeToConvert , JsonSerializerOptions options )
3339 {
3440 if ( reader . TokenType == JsonTokenType . Null )
@@ -100,9 +106,10 @@ internal class ResourceContentsConverter : JsonConverter<ResourceContents>
100106 return null ;
101107 }
102108
109+ /// <inheritdoc/>
103110 public override void Write ( Utf8JsonWriter writer , ResourceContents value , JsonSerializerOptions options )
104111 {
105- if ( value == null )
112+ if ( value is null )
106113 {
107114 writer . WriteNullValue ( ) ;
108115 return ;
You can’t perform that action at this time.
0 commit comments