daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private IEnumerable<DisconnectedPollingFanOutJobEntry> HostsAndGuestsView
  2.         {
  3.             get
  4.             {
  5.                 return Hosts
  6.                     .Select(e => e as DisconnectedPollingFanOutJobEntry)
  7.                     //because we are dotnet 3.5 we can't use covariances
  8.                     .Concat(Guests.Select(e => e as DisconnectedPollingFanOutJobEntry));
  9.                     //so this as good as it gets.                          
  10.             }
  11.         }
  12.  
  13. and then i'd use it like
  14.  
  15. while (!CancelQueue &&
  16.                   HostsAndGuestsView.Any(
  17.                       e =>
  18.                       e.DisconnectedJobState == DisconnectedPollingFanoutJobState.Pending ||
  19.                       e.DisconnectedJobState == DisconnectedPollingFanoutJobState.Running)
  20.                )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top