/// <summary> /// Implementation of exporting an entity. /// </summary> /// <remarks> /// This has been split to try and capture the common code shared by a PlatformConfigure export and a console export. /// </remarks> /// <param name="tenantId">The tenant</param> /// <param name="entityIds">The entity</param> /// <param name="target">The target</param> /// <param name="context">Processing context.</param> /// <param name="demandReadPermission">If true, perform a read demand as the current user.</param> internal void ExportEntity(long tenantId, IEnumerable <long> entityIds, IDataTarget target, IProcessingContext context, bool demandReadPermission) { using (IDataSource source = new TenantGraphSource { TenantId = tenantId, RootEntities = entityIds.ToList( ), DemandReadPermission = demandReadPermission }) { if (demandReadPermission) { CheckExportSecurity(source, context); } ///// // Copy the data ///// var processor = new CopyProcessor(source, target, context); processor.MigrateData( ); } }