Changes between Version 3 and Version 4 of Documentatie/Ontwikkelaar/OpenAC3/Scriptfuncties


Ignore:
Timestamp:
03/20/20 08:44:15 (6 years ago)
Author:
henk
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentatie/Ontwikkelaar/OpenAC3/Scriptfuncties

    v3 v4  
    3636#!csharp 
    3737 
    38     public interface ITabelScript 
    39     { 
    40         IEnumerable<TabelScriptRegistration> RegisterFor { get; } 
    41         Task<TabelScriptResult> ExecuteAsync(IServiceProvider serviceProvider, PathElement path, HubCommand command, TabelScriptWhen when, TabelScriptResult scriptResult); 
    42     } 
     38public interface ITabelScript 
     39{ 
     40    IEnumerable<TabelScriptRegistration> RegisterFor { get; } 
     41    Task<TabelScriptResult> ExecuteAsync(IServiceProvider serviceProvider, PathElement path, HubCommand command, TabelScriptWhen when, TabelScriptResult scriptResult); 
     42} 
    4343 
    4444 
    4545}}} 
     46 
     47Het is mogelijk om een tabelscript klasse te registreren voor meerdere events (combinatie van pad, actie en moment). Onderstaand een voorbeeld: 
     48 
     49{{{ 
     50#!csharp 
     51 
     52public IEnumerable<TabelScriptRegistration> RegisterFor => new List<TabelScriptRegistration> { 
     53    new TabelScriptRegistration { Command = HubCommand.DELETE, When = TabelScriptWhen.BEFORE, Path = "patient/behandelingen/fin_trajecten" }, 
     54    new TabelScriptRegistration { Command = HubCommand.DELETE, When = TabelScriptWhen.AFTER, Path = "patient/behandelingen/fin_trajecten" }, 
     55    new TabelScriptRegistration { Command = HubCommand.UPDATE, When = TabelScriptWhen.AFTER, Path = "patient/behandelingen/fin_trajecten" }         
     56}; 
     57 
     58}}} 
     59 
     60Voor elk van bovenstaande events zal method {{{ ExecuteAsync }}} van de klasse worden uitgevoerd. 
     61 
     62