File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
src/Microsoft.OpenApi/Reader
test/Microsoft.OpenApi.Tests/PublicApi Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -18,5 +18,13 @@ public class ReadResult
1818 /// OpenApiDiagnostic contains the Errors reported while parsing
1919 /// </summary>
2020 public OpenApiDiagnostic Diagnostic { get ; set ; }
21+ /// <summary>
22+ /// Deconstructs the result for easier assignment on the client application.
23+ /// </summary>
24+ public void Deconstruct ( out OpenApiDocument document , out OpenApiDiagnostic diagnostic )
25+ {
26+ document = Document ;
27+ diagnostic = Diagnostic ;
28+ }
2129 }
2230}
Original file line number Diff line number Diff line change @@ -1380,6 +1380,7 @@ namespace Microsoft.OpenApi.Reader
13801380 public ReadResult() { }
13811381 public Microsoft.OpenApi.Reader.OpenApiDiagnostic Diagnostic { get; set; }
13821382 public Microsoft.OpenApi.Models.OpenApiDocument Document { get; set; }
1383+ public void Deconstruct(out Microsoft.OpenApi.Models.OpenApiDocument document, out Microsoft.OpenApi.Reader.OpenApiDiagnostic diagnostic) { }
13831384 }
13841385 public enum ReferenceResolutionSetting
13851386 {
You can’t perform that action at this time.
0 commit comments