Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 28th, 2012  |  syntax: None  |  size: 0.51 KB  |  views: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public class MasterLoginLogoutPartialActionExtension : IPartialActionExtension<MasterLoginLogoutModel>
  2. {
  3.     private readonly IAuthenticationManager _authenticationManager;
  4.  
  5.     public MasterLoginLogoutPartialActionExtension(IAuthenticationManager authenticationManager)
  6.     {
  7.         _authenticationManager = authenticationManager;
  8.     }
  9.  
  10.     public MasterLoginLogoutModel Modify(MasterLoginLogoutModel model)
  11.     {
  12.         model.IsAuthenticated = _authenticationManager.LoggedIn;
  13.            
  14.         return model;
  15.     }
  16. }
clone this paste RAW Paste Data