@@ -48,14 +48,15 @@ ISettingsService settings
4848 _settings = settings ;
4949 }
5050
51- public override IDisplayResult Edit ( TransformalizeFormPart part , BuildPartEditorContext context ) {
51+ public override async Task < IDisplayResult > EditAsync ( TransformalizeFormPart part , BuildPartEditorContext context ) {
5252
5353 var commands = new AdoFormCommands ( ) ;
54- var process = _configurationContainer . CreateScope ( part . Arrangement . Text , part . ContentItem , new Dictionary < string , string > ( ) , false ) . Resolve < Process > ( ) ;
54+ var initial = await _configurationContainer . CreateScopeAsync ( part . Arrangement . Text , part . ContentItem , new Dictionary < string , string > ( ) , false ) ;
55+ var process = initial . Resolve < Process > ( ) ;
5556
5657 _settings . ApplyCommonSettings ( process ) ;
5758
58- using ( var scope = _container . CreateScope ( process , _logger , null ) ) {
59+ await using ( var scope = await _container . CreateScopeAsync ( process , _logger , null ) ) {
5960 if ( scope . IsRegistered < AdoFormCommandWriter > ( ) ) {
6061 commands = scope . Resolve < AdoFormCommandWriter > ( ) . Write ( ) ;
6162 }
@@ -89,7 +90,8 @@ public override async Task<IDisplayResult> UpdateAsync(TransformalizeFormPart pa
8990
9091 try {
9192 var logger = new MemoryLogger ( LogLevel . Error ) ;
92- var process = _configurationContainer . CreateScope ( model . Arrangement . Text , part . ContentItem , new Dictionary < string , string > ( ) , false ) . Resolve < Process > ( ) ;
93+ var final = await _configurationContainer . CreateScopeAsync ( model . Arrangement . Text , part . ContentItem , new Dictionary < string , string > ( ) , false ) ;
94+ var process = final . Resolve < Process > ( ) ;
9395 if ( process . Errors ( ) . Any ( ) ) {
9496 foreach ( var error in process . Errors ( ) ) {
9597 context . Updater . ModelState . AddModelError ( Prefix , S [ error ] ) ;
0 commit comments