Index: VerpakkingsDefinitie/ApplicationContext.pas =================================================================== diff -u -r551 -r555 --- VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 551) +++ VerpakkingsDefinitie/ApplicationContext.pas (.../ApplicationContext.pas) (revision 555) @@ -7,11 +7,14 @@ interface +uses + ObserverPattern; + // SUB CONTEXTS: klassen die overeenkomen met bepaalde sub-context (bv. alles gerelateerd met authenticatie). // - UserServerService type - TUserServerServiceContext = class + TUserServerServiceContext = class(TSubject) private FSessionKey: string; FGebruikersNaam: string; @@ -20,6 +23,7 @@ FErrorMessage: string; FInternalErrorMessage: string; public + procedure Changed(); property SessionKey: string read FSessionKey write FSessionKey; property GebruikersNaam: string read FGebruikersNaam write FGebruikersNaam; property IsOK: Boolean read FIsOK write FIsOK; @@ -31,14 +35,19 @@ // Application context bevat alle sub-contexts TApplicationContext = class private - FUserServerServiceContext: TUserServerServiceContext; + FUserServerServiceContext: TUserServerServiceContext; public constructor Create(); property UserServerServiceContext: TUserServerServiceContext read FUserServerServiceContext write FUserServerServiceContext; end; implementation +procedure TUserServerServiceContext.Changed(); +begin + self.Change(); +end; + constructor TApplicationContext.Create(); begin FUserServerServiceContext := TUserServerServiceContext.Create();