public QueueProcessor(IServiceScopeFactory serviceProvider, SynchronizeDelegate processFile, IMemoryCache memoryCache) { _bgTaskQueue = serviceProvider.CreateScope().ServiceProvider.GetService <IDiskWatcherBackgroundTaskQueue>(); _processFile = processFile; _memoryCache = memoryCache; }
public void Synchronize(SynchronizeDelegate syncFn) { RefreshActors(); foreach (var actor in Actors) { syncFn(actor); } }
internal QueueProcessor(IDiskWatcherBackgroundTaskQueue diskWatcherBackgroundTaskQueue, SynchronizeDelegate processFile, IMemoryCache memoryCache, TimeSpan expirationTime) { _bgTaskQueue = diskWatcherBackgroundTaskQueue; _processFile = processFile; _memoryCache = memoryCache; _expirationTime = expirationTime; }
public void RegisterInterface(IUpdate iUpdate) { BeginPaint = new BeginPaintDelegate(iUpdate.BeginPaint); EndPaint = new EndPaintDelegate(iUpdate.EndPaint); SetBounds = new SetBoundsDelegate(iUpdate.SetBounds); Synchronize = new SynchronizeDelegate(iUpdate.Synchronize); DesktopResize = new DesktopResizeDelegate(iUpdate.DesktopResize); BitmapUpdate = new BitmapUpdateDelegate(iUpdate.BitmapUpdate); Palette = new PaletteDelegate(iUpdate.Palette); PlaySound = new PlaySoundDelegate(iUpdate.PlaySound); SurfaceBits = new SurfaceBitsDelegate(iUpdate.SurfaceBits); update->BeginPaint = Marshal.GetFunctionPointerForDelegate(BeginPaint); update->EndPaint = Marshal.GetFunctionPointerForDelegate(EndPaint); update->SetBounds = Marshal.GetFunctionPointerForDelegate(SetBounds); update->Synchronize = Marshal.GetFunctionPointerForDelegate(Synchronize); update->DesktopResize = Marshal.GetFunctionPointerForDelegate(DesktopResize); update->BitmapUpdate = Marshal.GetFunctionPointerForDelegate(BitmapUpdate); update->Palette = Marshal.GetFunctionPointerForDelegate(Palette); update->PlaySound = Marshal.GetFunctionPointerForDelegate(PlaySound); update->SurfaceBits = Marshal.GetFunctionPointerForDelegate(SurfaceBits); }
public void RegisterInterface(IUpdate iUpdate) { BeginPaint = new BeginPaintDelegate(iUpdate.BeginPaint); EndPaint = new EndPaintDelegate(iUpdate.EndPaint); SetBounds = new SetBoundsDelegate(iUpdate.SetBounds); Synchronize = new SynchronizeDelegate(iUpdate.Synchronize); DesktopResize = new DesktopResizeDelegate(iUpdate.DesktopResize); BitmapUpdate = new BitmapUpdateDelegate(iUpdate.BitmapUpdate); Palette = new PaletteDelegate(iUpdate.Palette); PlaySound = new PlaySoundDelegate(iUpdate.PlaySound); SurfaceBits = new SurfaceBitsDelegate(iUpdate.SurfaceBits); update->BeginPaint = Marshal.GetFunctionPointerForDelegate(BeginPaint); update->EndPaint = Marshal.GetFunctionPointerForDelegate(EndPaint); update->SetBounds = Marshal.GetFunctionPointerForDelegate(SetBounds); update->Synchronize = Marshal.GetFunctionPointerForDelegate(Synchronize); update->DesktopResize = Marshal.GetFunctionPointerForDelegate(DesktopResize); update->BitmapUpdate = Marshal.GetFunctionPointerForDelegate(BitmapUpdate); update->Palette = Marshal.GetFunctionPointerForDelegate(Palette); update->PlaySound = Marshal.GetFunctionPointerForDelegate(PlaySound); update->SurfaceBits = Marshal.GetFunctionPointerForDelegate(SurfaceBits); }