public OrderObserver(AggregatorService service) { PluginContext.Notifications.DeliveryOrderChanged.Subscribe(OnDeliveryOrderChanged); string cachePath = $"{PluginContext.Integration.GetDataStorageDirectoryPath()}/AggregatorMix.json"; _cache = new SerializableCache <CommonCacheData>(cachePath); _service = service; _subs.Add(_cache); }
private void EnsureCache(NativeActivityContext context) { if (IsCached(context)) { var vars = ComputationContext.GetVariables(context, this); if (!vars.Exists(CacheVarName)) { var cache = new SerializableCache(CacheName); vars.Set(CacheVarName, cache); } } }