@@ -643,7 +643,7 @@ public GeneratorTestContextBuilder AddMarkup(string name, CodeMarkup source)
643643 {
644644 return this with
645645 {
646- _markedLocations = _markedLocations . Add ( name , new ( source . Location , source . Trigger ) ) ,
646+ _markedLocations = _markedLocations . SetItem ( name , new ( source . Location , source . Trigger ) ) ,
647647 _sources = _sources . Add ( new ( SourceText . From ( source . Code , Encoding . UTF8 ) ) { Name = name , } ) ,
648648 } ;
649649 }
@@ -726,14 +726,14 @@ public GeneratorTestContextBuilder AddAdditionalTexts(params IEnumerable<Additio
726726 public GeneratorTestContextBuilder AddOption ( string path , string key , string value )
727727 {
728728 var rootOptions = _options ;
729- if ( rootOptions . TryGetValue ( path , out var fileOptions ) )
729+ if ( _options . TryGetValue ( path , out var fileOptions ) )
730730 {
731- fileOptions = fileOptions . Add ( key , value ) ;
731+ fileOptions = fileOptions . SetItem ( key , value ) ;
732732 rootOptions = rootOptions . SetItem ( path , fileOptions ) ;
733733 }
734734 else
735735 {
736- rootOptions = rootOptions . SetItem ( path , ImmutableDictionary < string , string > . Empty . Add ( key , value ) ) ;
736+ rootOptions = rootOptions . SetItem ( path , ImmutableDictionary < string , string > . Empty . SetItem ( key , value ) ) ;
737737 }
738738
739739 return this with { _options = rootOptions , } ;
@@ -745,7 +745,7 @@ public GeneratorTestContextBuilder AddOption(string path, string key, string val
745745 /// <param name="key"></param>
746746 /// <param name="value"></param>
747747 /// <returns></returns>
748- public GeneratorTestContextBuilder AddGlobalOption ( string key , string value ) => this with { _globalOptions = _globalOptions . Add ( key , value ) , } ;
748+ public GeneratorTestContextBuilder AddGlobalOption ( string key , string value ) => this with { _globalOptions = _globalOptions . SetItem ( key , value ) , } ;
749749
750750 /// <summary>
751751 /// Create the <see cref="GeneratorTestContext" /> from the builder
0 commit comments