Example #1
0
 /// <summary>
 ///  do an export triggered by events.
 /// </summary>
 /// <param name="e"></param>
 private void USyncTriggers_DoExport(uSyncTriggerArgs e)
 {
     if (e.EntityTypes != null && !string.IsNullOrWhiteSpace(e.Folder))
     {
         logger.Info <uSyncService>("Export Triggered by downlevel change {0}", e.Folder);
         var handlers = GetHandlersByEntitytype(e.EntityTypes, e.HandlerOptions);
         if (handlers.Count > 0)
         {
             this.Export(e.Folder, handlers, null);
         }
     }
 }
Example #2
0
        /// <summary>
        ///  Do an import triggered by an event.
        /// </summary>
        /// <param name="e"></param>
        private void USyncTriggers_DoImport(uSyncTriggerArgs e)
        {
            if (e.EntityTypes != null && !string.IsNullOrWhiteSpace(e.Folder))
            {
                logger.Info <uSyncService>("Import Triggered by downlevel change {0}", e.Folder);

                var handlers = handlerFactory
                               .GetValidHandlersByEntityType(e.EntityTypes, e.HandlerOptions);

                if (handlers.Any())
                {
                    this.Import(e.Folder, false, handlers, null);
                }
            }
        }