/// <summary> /// Handles the ChildCompleted event of the ForEachDynamicStringForResolution ReplicatorActivity. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ReplicatorChildEventArgs"/> instance containing the event data.</param> private void ForEachDynamicStringForResolution_ChildCompleted(object sender, ReplicatorChildEventArgs e) { Logger.Instance.WriteMethodEntry(EventIdentifier.UpdateResourcesForEachDynamicStringForResolutionChildCompleted); string stringForResolution = e.InstanceData as string; string resolved = null; try { // Using the resolved filter, execute the LDAP query to determine if a conflict exists ResolveLookupString resolveDynamicLookupString = e.Activity as ResolveLookupString; if (resolveDynamicLookupString == null || string.IsNullOrEmpty(stringForResolution)) { return; } resolved = resolveDynamicLookupString.Resolved; // Load resolved value expressions to the expression evaluator this.ActivityExpressionEvaluator.LookupCache[stringForResolution] = resolved; } finally { Logger.Instance.WriteMethodExit(EventIdentifier.UpdateResourcesForEachDynamicStringForResolutionChildCompleted, "StringForResolution: '{0}'. Resolved: '{1}'.", stringForResolution, resolved); } }
/// <summary> /// Handles the ChildInitialized event of the ForEachLdap ReplicatorActivity. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ReplicatorChildEventArgs"/> instance containing the event data.</param> private void ForEachLdap_ChildInitialized(object sender, ReplicatorChildEventArgs e) { Logger.Instance.WriteMethodEntry(EventIdentifier.GenerateUniqueValueForEachLdapChildInitialized); string stringForResolution = null; try { // Prepare for the execution of the LDAP query by pulling the filter // from the definition and assigning it to the resolve lookup string // Resolve the [//Value] lookup with the current value before resolution Definition definition = e.InstanceData as Definition; ResolveLookupString resolveFilter = e.Activity as ResolveLookupString; if (resolveFilter == null || definition == null) { return; } stringForResolution = ResolveValueFilter(definition.Right, this.resolvedValue); resolveFilter.StringForResolution = stringForResolution; } finally { Logger.Instance.WriteMethodExit(EventIdentifier.GenerateUniqueValueForEachLdapChildInitialized, "StringForResolution: '{0}'.", stringForResolution); } }
/// <summary> /// Handles the ChildInitialized event of the ForEachDynamicStringForResolution ReplicatorActivity. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ReplicatorChildEventArgs"/> instance containing the event data.</param> private void ForEachDynamicStringForResolution_ChildInitialized(object sender, ReplicatorChildEventArgs e) { Logger.Instance.WriteMethodEntry(EventIdentifier.UpdateResourcesForEachDynamicStringForResolutionChildInitialized); string stringForResolution = e.InstanceData as string; try { ResolveLookupString resolveDynamicLookupString = e.Activity as ResolveLookupString; if (resolveDynamicLookupString == null || string.IsNullOrEmpty(stringForResolution)) { return; } resolveDynamicLookupString.StringForResolution = stringForResolution; } finally { Logger.Instance.WriteMethodExit(EventIdentifier.UpdateResourcesForEachDynamicStringForResolutionChildInitialized, "StringForResolution: '{0}'.", stringForResolution); } }
/// <summary> /// Handles the ChildCompleted event of the ForEachLdap ReplicatorActivity. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ReplicatorChildEventArgs"/> instance containing the event data.</param> private void ForEachLdap_ChildCompleted(object sender, ReplicatorChildEventArgs e) { Logger.Instance.WriteMethodEntry(EventIdentifier.GenerateUniqueValueForEachLdapChildCompleted); try { // Using the resolved filter, execute the LDAP query to determine if a conflict exists Definition definition = e.InstanceData as Definition; ResolveLookupString resolveFilter = e.Activity as ResolveLookupString; if (resolveFilter == null || definition == null) { return; } if (ConflictExistsInLdap(definition.Left, resolveFilter.Resolved)) { this.ldapConflict = true; } } finally { Logger.Instance.WriteMethodExit(EventIdentifier.GenerateUniqueValueForEachLdapChildCompleted, "LDAP Conflict: '{0}'.", this.ldapConflict); } }