本文整理汇总了C#中IObservable.LaunchOrKill方法的典型用法代码示例。如果您正苦于以下问题:C# IObservable.LaunchOrKill方法的具体用法?C# IObservable.LaunchOrKill怎么用?C# IObservable.LaunchOrKill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IObservable
的用法示例。
在下文中一共展示了IObservable.LaunchOrKill方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public IDisposable Initialize(IObservable<IConnected<IBroker>> brokerStream)
{
var disposable = brokerStream.LaunchOrKill(broker => new PricingServiceHost(_service, broker)).Subscribe();
_cleanup.Add(disposable);
return disposable;
}
示例2: Initialize
public IDisposable Initialize(IObservable<IConnected<IBroker>> brokerStream, IObservable<IConnected<IEventStoreConnection>> eventStoreStream)
{
var repositoryStream = eventStoreStream.LaunchOrKill(conn => new Repository(conn, new EventTypeResolver(ReflectionHelper.ContractsAssembly)));
var serviceStream = repositoryStream.LaunchOrKill(engine => new ReferenceWriteService(engine));
_cleanup.Disposable =
serviceStream.LaunchOrKill(brokerStream, (service, broker) => new ReferenceWriteServiceHost(service, broker)).Subscribe();
return _cleanup;
}
开发者ID:AdaptiveConsulting,项目名称:ReactiveTraderCloud,代码行数:9,代码来源:ReferenceDataWriteServiceHostFactory.cs
示例3: Initialize
public IDisposable Initialize(IObservable<IConnected<IBroker>> brokerStream, IObservable<IConnected<IEventStoreConnection>> eventStore)
{
_cache = new TradeCache(eventStore);
_service = new BlotterService(_cache.GetTrades());
var disposable = brokerStream.LaunchOrKill(broker => new BlotterServiceHost(_service, broker)).Subscribe();
_cleanup.Add(disposable);
return disposable;
}
示例4: Initialize
public IDisposable Initialize(IObservable<IConnected<IBroker>> brokerStream,
IObservable<IConnected<IEventStoreConnection>> eventStoreStream)
{
_cache = new CurrencyPairCache(eventStoreStream);
_service = new ReferenceService(_cache.GetCurrencyPairUpdates());
var disposable = brokerStream.LaunchOrKill(broker => new ReferenceReadServiceHost(_service, broker))
.Subscribe();
_cleanup.Add(disposable);
return disposable;
}
开发者ID:AdaptiveConsulting,项目名称:ReactiveTraderCloud,代码行数:11,代码来源:ReferenceDataReadServiceHostFactory.cs
示例5: Initialize
public IDisposable Initialize(IObservable<IConnected<IBroker>> brokerStream, IObservable<IConnected<IEventStoreConnection>> eventStoreStream)
{
var repositoryStream = eventStoreStream.LaunchOrKill(conn => new Repository(conn, new EventTypeResolver(ReflectionHelper.ContractsAssembly)));
var idProvider = repositoryStream.LaunchOrKill(repo => new TradeIdProvider(repo));
var engineStream = repositoryStream.LaunchOrKill(idProvider, (repo, id) => new TradeExecutionEngine(repo, id));
var serviceStream = engineStream.LaunchOrKill(engine => new TradeExecutionService(engine));
var disposable = serviceStream.LaunchOrKill(brokerStream, (service, broker) => new TradeExecutionServiceHost(service, broker)).Subscribe();
_cleanup.Add(disposable);
return disposable;
}