Пример #1
0
 protected override void RegisterServices(IVLFactory factory)
 {
     if (!factory.HasService <NodeContext, IResourceProvider <Device> >())
     {
         factory.RegisterService <NodeContext, IResourceProvider <Device> >(nodeContext =>
         {
             // One per entry point
             return(ResourceProvider.NewPooledPerApp(nodeContext, () => new Device(DriverType.Hardware, DeviceCreationFlags.BgraSupport | DeviceCreationFlags.VideoSupport)));
         });
     }
 }
Пример #2
0
 protected override void RegisterServices(IVLFactory factory)
 {
     if (!factory.HasService <NodeContext, IResourceProvider <Device> >())
     {
         factory.RegisterService <NodeContext, IResourceProvider <Device> >(nodeContext =>
         {
             // One per entry point
             var key = nodeContext.Path.Stack.Last();
             return(ResourceProvider.NewPooledSystemWide(key, _ => new Device(DriverType.Hardware, DeviceCreationFlags.BgraSupport | DeviceCreationFlags.VideoSupport)));
         });
     }
 }
Пример #3
0
 protected override void RegisterServices(IVLFactory factory)
 {
     factory.RegisterNodeFactory(nodeFactory);
     factory.RegisterService <NodeContext, IResourceProvider <GlobalEngine> >(n => ResourceProvider.NewPooledSystemWide("VL.Audio", _ => new GlobalEngine()));
 }