SyncUpdateCallback 委托

定义

在复制同步期间接收事件通知。Receives event notifications during a replica synchronization.

public delegate bool SyncUpdateCallback(SyncFromAllServersEvent eventType, System::String ^ targetServer, System::String ^ sourceServer, SyncFromAllServersOperationException ^ exception);
public delegate bool SyncUpdateCallback(SyncFromAllServersEvent eventType, string targetServer, string sourceServer, SyncFromAllServersOperationException exception);
type SyncUpdateCallback = delegate of SyncFromAllServersEvent * string * string * SyncFromAllServersOperationException -> bool
Public Delegate Function SyncUpdateCallback(eventType As SyncFromAllServersEvent, targetServer As String, sourceServer As String, exception As SyncFromAllServersOperationException) As Boolean 

参数

eventType
SyncFromAllServersEvent

指定事件类型的 SyncFromAllServersEvent 成员之一。One of the SyncFromAllServersEvent members that specifies the type of event.

targetServer
String

包含作为复制目标的服务器的 DNS 名称。Contains the DNS name of the server that is the target of the replication. 如果通知操作不使用此参数,则此参数将为 nullThis parameter will be null if it is not used by the notification.

sourceServer
String

包含作为复制源的服务器的 DNS 名称。Contains the DNS name of the server that is the source of the replication. 如果通知操作不使用此参数,则此参数将为 nullThis parameter will be null if it is not used by the notification.

exception
SyncFromAllServersOperationException

SyncFromAllServersOperationException 对象,它包含有关所有已发生的错误的附加信息。A SyncFromAllServersOperationException object that contains additional information about any error that has occurred. 如果未发生错误,则此参数将为 nullThis parameter will be null if no error has occurred.

返回值

Boolean

如果对 AdamInstanceDirectoryServerDomainController 对象调用的 SyncReplicaFromAllServers 方法应继续,则为 true;如果 SyncReplicaFromAllServers 方法应终止,则为 falsetrue if the SyncReplicaFromAllServers method invoked on a AdamInstance, DirectoryServer or DomainController object should resume; false if the SyncReplicaFromAllServers method should terminate.

继承
SyncUpdateCallback

注解

SyncReplicaFromAllServersThe SyncReplicaFromAllServers

操作需要很长时间才能完成, 并且可能会在服务器上失败。operation takes a long time to complete and potentially could fail on a server. 通过SyncUpdateCallback回调函数, 应用程序可以指示 SyncReplicaFromAllServers 方法是否应继续执行。The SyncUpdateCallback callback function enables the application to indicate whether the SyncReplicaFromAllServers method should continue executing. 例如, 应用程序可能返回 false 以终止SyncReplicaFromAllServersFor example, the application could return false to terminate SyncReplicaFromAllServers

发生错误时执行。execution if an error occurs. 使用此功能的另一种情况是终止SyncReplicaFromAllServersAnother scenario in which this capability would be used is to terminate SyncReplicaFromAllServers

在应用程序检测到某个目标服务器或源服务器对的同步已完成后执行。execution once the application detects that synchronization has completed for a certain target server or source server pair.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于

另请参阅