コード例 #1
0
        protected override bool VisitCollectionsBeforeSave(object entity, object id, object[] values, Type.IType[] types, IEventSource source)
        {
            //TODO: we use two visitors here, inefficient!
            OnReplicateVisitor visitor = new OnReplicateVisitor(source, id, entity, false);

            visitor.ProcessEntityPropertyValues(values, types);
            return(base.VisitCollectionsBeforeSave(entity, id, values, types, source));
        }
コード例 #2
0
		protected override async Task<bool> VisitCollectionsBeforeSaveAsync(object entity, object id, object[] values, Type.IType[] types, IEventSource source, CancellationToken cancellationToken)
		{
			cancellationToken.ThrowIfCancellationRequested();
			//TODO: we use two visitors here, inefficient!
			OnReplicateVisitor visitor = new OnReplicateVisitor(source, id, entity, false);
			await (visitor.ProcessEntityPropertyValuesAsync(values, types, cancellationToken)).ConfigureAwait(false);
			return await (base.VisitCollectionsBeforeSaveAsync(entity, id, values, types, source, cancellationToken)).ConfigureAwait(false);
		}