File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -189,13 +189,13 @@ private void AddFrameworkDependencies(JObject json, string jsonPath)
189
189
/// (together with used package information) required for compilation.
190
190
/// </summary>
191
191
/// <returns>True if parsing succeeds, otherwise false.</returns>
192
- public bool TryParse ( string json )
192
+ public bool TryParse ( string json , string ? jsonPath = null )
193
193
{
194
194
try
195
195
{
196
196
var obj = JObject . Parse ( json ) ;
197
- AddPackageDependencies ( obj , json ) ;
198
- AddFrameworkDependencies ( obj , json ) ;
197
+ AddPackageDependencies ( obj , jsonPath ?? json ) ;
198
+ AddFrameworkDependencies ( obj , jsonPath ?? json ) ;
199
199
return true ;
200
200
}
201
201
catch ( Exception e )
@@ -228,7 +228,7 @@ public void AddDependencies(string asset)
228
228
{
229
229
if ( TryReadAllText ( asset , logger , out var json ) )
230
230
{
231
- TryParse ( json ) ;
231
+ TryParse ( json , asset ) ;
232
232
}
233
233
}
234
234
You can’t perform that action at this time.
0 commit comments