Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 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);
         }
     }
 }