Batch() private method

private Batch ( Action action ) : void
action Action
return void
Ejemplo n.º 1
0
		public static List<string> ReportOn(TransactionalStorage transactionalStorage)
		{
			var list = new List<string>();
			transactionalStorage.Batch(accessor =>
			{
				var session = ((StorageActionsAccessor)accessor).Inner.Session;
				var jetDbid = ((StorageActionsAccessor)accessor).Inner.Dbid;

				var dictionary = GetSizes(session, jetDbid);
				list.AddRange(dictionary.OrderByDescending(x => x.Item2).Select(l => l.Item1));
			});
			return list;
		}
Ejemplo n.º 2
0
 private static void ReportOn(TransactionalStorage transactionalStorage, string tableName, string path)
 {
     var list = new List<string>();
     transactionalStorage.Batch(accessor =>
     {
         var session = ((StorageActionsAccessor)accessor).Inner.Session;
         var jetDbid = ((StorageActionsAccessor)accessor).Inner.Dbid;
         using(var stream = new FileStream(Path.Combine(path, tableName + "Dump.csv"), FileMode.Create))
         using (var table = new Table(session, jetDbid, tableName, OpenTableGrbit.None))
         {
             DumpTable(session, table, stream);
             
         }
     });
 }