Пример #1
0
 public void Map(NosDB.Common.IJSONDocument document, IOutputMap context)
 {
     if (document != null)
     {
         context.Emit(document["ShipCity"], 1);
     }
 }
Пример #2
0
 /// <summary>
 /// For every key-value pair input, Map method is executed, to get a more specific and meaningful data.
 /// </summary>
 /// <param name="key">Key value of cache Entry.</param>
 /// <param name="value">Value for the key</param>
 /// <param name="context">Emitted output value for each key-value pair</param>
 public void Map(object key, object value, IOutputMap context)
 {
     if (value != null)
     {
         context.Emit(_aggKey, _valueExtractor.Extract(value));
     }
 }
Пример #3
0
 public void Map(object key, object value, IOutputMap context)
 {
     if (value is Customer tempCustomer)
     {
         string myKey = (string)key;
         tempCustomer.WentThroughMapper = true;
         var cacheItem = new  CacheItem(tempCustomer);
         Console.WriteLine("Through Mapper");
         cache.Insert(myKey, cacheItem);
     }
 }