Exemplo n.º 1
0
 private ExpansionControl OnFailure(ExpansionFailure failure, ADRawEntry recipient, ExpansionType recipientExpansionType, ADRawEntry parent, ExpansionType parentExpansionType)
 {
     if (failure == ExpansionFailure.LoopDetected)
     {
         return(ExpansionControl.Skip);
     }
     return(ExpansionControl.Continue);
 }
Exemplo n.º 2
0
        // Token: 0x06001AB3 RID: 6835 RVA: 0x000700C4 File Offset: 0x0006E2C4
        private bool ProcessChild(ADRawEntry child, ADRecipientExpansion.ExpandableEntry parent, ADRecipientExpansion.HandleRecipientDelegate handleRecipient, ADRecipientExpansion.HandleFailureDelegate handleFailure, Stack <ADRecipientExpansion.ExpandableEntry> expansionStack)
        {
            ExpansionFailure failure       = ExpansionFailure.NotMailEnabled;
            bool             flag          = false;
            ExpansionType    expansionType = ADRecipientExpansion.GetExpansionType(child);

            ExTraceGlobals.ADExpansionTracer.TraceDebug <object, string>((long)this.GetHashCode(), "Processing recipient {0} with expansion type {1}", child[ADObjectSchema.Id], ADRecipientExpansion.GetExpansionTypeString(expansionType));
            if (!this.ignoreMailEnabledCase && !this.IsMailEnabled(child))
            {
                failure = ExpansionFailure.NotMailEnabled;
                flag    = true;
            }
            if (!flag && !this.IsAuthorized(child))
            {
                failure = ExpansionFailure.NotAuthorized;
                flag    = true;
            }
            if (!flag && expansionType != ExpansionType.None && this.IsLoopDetected(child, parent))
            {
                failure = ExpansionFailure.LoopDetected;
                flag    = true;
            }
            if (flag)
            {
                return(ADRecipientExpansion.InvokeFailureDelegate(handleFailure, failure, child, expansionType, parent) != ExpansionControl.Terminate);
            }
            ExpansionControl expansionControl = ExpansionControl.Continue;

            if (expansionType != ExpansionType.ContactChain)
            {
                expansionControl = ADRecipientExpansion.InvokeRecipientDelegate(handleRecipient, child, expansionType, parent);
            }
            if (expansionControl == ExpansionControl.Terminate)
            {
                return(false);
            }
            if (expansionControl != ExpansionControl.Skip && expansionType != ExpansionType.None)
            {
                expansionStack.Push(new ADRecipientExpansion.ExpandableEntry(child, expansionType, parent));
                ExTraceGlobals.ADExpansionTracer.TraceDebug((long)this.GetHashCode(), "Recipient {0} pushed on the expansion stack", new object[]
                {
                    child[ADObjectSchema.Id]
                });
            }
            return(true);
        }
Exemplo n.º 3
0
 // Token: 0x06001AAD RID: 6829 RVA: 0x0006FCE2 File Offset: 0x0006DEE2
 private static bool InvokeFailureDelegate(ADRecipientExpansion.HandleFailureDelegate handleFailure, ExpansionFailure failure, ADRecipientExpansion.ExpandableEntry recipient)
 {
     return(ADRecipientExpansion.InvokeFailureDelegate(handleFailure, failure, recipient.Entry, recipient.ExpansionType, recipient.Parent) != ExpansionControl.Terminate);
 }
Exemplo n.º 4
0
 // Token: 0x06001AAC RID: 6828 RVA: 0x0006FCD9 File Offset: 0x0006DED9
 private static string GetExpansionFailureString(ExpansionFailure expansionFailure)
 {
     return(ADRecipientExpansion.expansionFailureStrings[(int)expansionFailure]);
 }
Exemplo n.º 5
0
        // Token: 0x06001AA9 RID: 6825 RVA: 0x0006FC14 File Offset: 0x0006DE14
        private static ExpansionControl InvokeFailureDelegate(ADRecipientExpansion.HandleFailureDelegate handleFailure, ExpansionFailure failure, ADRawEntry recipient, ExpansionType expansionType, ADRecipientExpansion.ExpandableEntry parent)
        {
            if (handleFailure == null)
            {
                return(ExpansionControl.Continue);
            }
            ExpansionType expansionType2 = (parent == null) ? ExpansionType.None : parent.ExpansionType;

            ExTraceGlobals.ADExpansionTracer.TraceDebug(0L, "Invoking failure delegate: failure={0}; recipient={1}; expansion-type={2}; parent={3}; parent-expansion-type={4}", new object[]
            {
                ADRecipientExpansion.GetExpansionFailureString(failure),
                recipient[ADObjectSchema.Id],
                ADRecipientExpansion.GetExpansionTypeString(expansionType),
                (parent == null) ? "<null>" : parent.Entry[ADObjectSchema.Id],
                ADRecipientExpansion.GetExpansionTypeString(expansionType2)
            });
            ExpansionControl expansionControl = handleFailure(failure, recipient, expansionType, (parent == null) ? null : parent.Entry, expansionType2);

            ExTraceGlobals.ADExpansionTracer.TraceDebug <string>(0L, "Delegate returned '{0}'", ADRecipientExpansion.GetExpansionControlString(expansionControl));
            return(expansionControl);
        }
Exemplo n.º 6
0
 private ExpansionControl OnFailure(ExpansionFailure failure, ADRawEntry recipient, ExpansionType recipientExpansionType, ADRawEntry parent, ExpansionType parentExpansionType)
 {
     return(ExpansionControl.Continue);
 }
Exemplo n.º 7
0
 private ExpansionControl OnFailureEncountered(ExpansionFailure failure, ADRawEntry recipient, ExpansionType recipientExpansionType, ADRawEntry parent, ExpansionType parentExpansionType)
 {
     this.AllVisitedAttendees.Add(recipient.Id);
     return(ExpansionControl.Skip);
 }