internal static ObjectId GetRootId(FailedMSOSyncObjectIdParameter identityParameter) { if (identityParameter != null && identityParameter.IsServiceInstanceDefinied) { ADObjectId adobjectId = SyncServiceInstance.GetServiceInstanceObjectId(identityParameter.ServiceInstance.InstanceId); return(SyncServiceInstance.GetDivergenceContainerId(adobjectId)); } return(SyncServiceInstance.GetMsoSyncRootContainer()); }
private IEnumerable <SyncServiceInstance> GetAllServiceInstances() { return(this.configurationSession.FindPaged <SyncServiceInstance>(SyncServiceInstance.GetMsoSyncRootContainer(), QueryScope.OneLevel, null, null, 0)); }
internal static ArbitrationConfigFromAD GetArbitrationConfigFromAD(string serviceInstanceName) { IConfigurationSession configurationSession = ForwardSyncDataAccessHelper.CreateSession(true); RidMasterInfo ridMasterInfo = SyncDaemonArbitrationConfigHelper.GetRidMasterInfo(configurationSession); SyncServiceInstance[] array = configurationSession.Find <SyncServiceInstance>(SyncServiceInstance.GetMsoSyncRootContainer(), QueryScope.SubTree, new ComparisonFilter(ComparisonOperator.Equal, ADObjectSchema.Name, serviceInstanceName), null, 1); if (array == null || array.Length != 1) { throw new SyncDaemonArbitrationConfigException(Strings.ErrorCannotRetrieveSyncDaemonArbitrationConfigContainer((array == null) ? "0" : array.Length.ToString())); } return(new ArbitrationConfigFromAD(array[0], ridMasterInfo)); }