public SearchReferralEventArgs(LdapMessage sourceMessage, EventClassifiers aClassification, LdapEventType aType) : base(sourceMessage, EventClassifiers.CLASSIFICATION_LDAP_PSEARCH, LdapEventType.LDAP_PSEARCH_ANY) // TODO: why type is ANY..? { }
public SearchResultEventArgs( LdapMessage sourceMessage, EventClassifiers aClassification, LdapEventType aType) : base(sourceMessage, EventClassifiers.ClassificationLdapPsearch, aType) { }
public DirectoryEventArgs( LdapMessage sourceMessage, EventClassifiers aClassification) : base(sourceMessage) { EClassification = aClassification; }
// TODO: why type is ANY..? public SearchReferralEventArgs(LdapMessage sourceMessage, EventClassifiers aClassification, LdapEventType aType) : base(sourceMessage, EventClassifiers.CLASSIFICATION_LDAP_PSEARCH, LdapEventType.LDAP_PSEARCH_ANY) { }
public LdapEventArgs( LdapMessage sourceMessage, EventClassifiers aClassification, LdapEventType aType) : base(sourceMessage, aClassification) { eType = aType; }
public SearchReferralEventArgs( LdapMessage sourceMessage, EventClassifiers aClassification, LdapEventType aType) : base(sourceMessage, EventClassifiers.ClassificationLdapPsearch, LdapEventType.LdapPsearchAny) // TODO: why type is ANY..? { }
public LdapEventArgs( LdapMessage sourceMessage, EventClassifiers aClassification, LdapEventType aType) : base(sourceMessage, aClassification) { eType = aType; }
protected void NotifyListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType) { // first let the actual source Notify the listeners with // appropriate EventArgs bool bListenersNotified = NotifyEventListeners(sourceMessage, aClassification, nType); if (!bListenersNotified) { // Actual EventSource could not recognize the event // Just notify the listeners for generic directory events NotifyDirectoryListeners(sourceMessage, aClassification); } }
protected override bool NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType) { bool bListenersNotified = false; if (null != edir_event) { if (null != sourceMessage) { if ((sourceMessage.Type == LdapMessage.INTERMEDIATE_RESPONSE) && (sourceMessage is EdirEventIntermediateResponse)) { edir_event(this, new EdirEventArgs(sourceMessage, EventClassifiers.CLASSIFICATION_EDIR_EVENT)); bListenersNotified = true; } } } return(bListenersNotified); }
protected void NotifyDirectoryListeners(LdapMessage sourceMessage, EventClassifiers aClassification) { NotifyDirectoryListeners(new DirectoryEventArgs(sourceMessage, aClassification)); }
NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType);
protected override bool NotifyEventListeners( LdapMessage sourceMessage, EventClassifiers aClassification, int nType) { var bListenersNotified = false; if (sourceMessage == null) { return(bListenersNotified); } switch (sourceMessage.Type) { case LdapMessage.SearchResultReference: if (_searchReferralEvent != null) { _searchReferralEvent( this, new SearchReferralEventArgs( sourceMessage, aClassification, (LdapEventType)nType)); bListenersNotified = true; } break; case LdapMessage.SearchResponse: if (_searchResultEvent != null) { var changeType = LdapEventType.TypeUnknown; var controls = sourceMessage.Controls; foreach (var control in controls) { if (control is LdapEntryChangeControl) { changeType = (LdapEventType)((LdapEntryChangeControl)control).ChangeType; // TODO: Why is this continue here..? (from Java code..) // TODO: Why are we interested only in the last changeType..? } } // if no changeType then value is TYPE_UNKNOWN _searchResultEvent( this, new SearchResultEventArgs( sourceMessage, aClassification, changeType)); bListenersNotified = true; } break; case LdapMessage.SearchResult: // This is a generic LDAP Event // TODO: Why the type is ANY...? (java code) NotifyDirectoryListeners(new LdapEventArgs( sourceMessage, EventClassifiers.ClassificationLdapPsearch, LdapEventType.LdapPsearchAny)); bListenersNotified = true; break; default: // This seems to be some unknown event. // Let this be notified to generic DirectoryListeners in the base class... break; } return(bListenersNotified); }
public EdirEventArgs(LdapMessage sourceMessage, EventClassifiers aClassification) : base(sourceMessage, aClassification) { }
} // end of method StopEventPolling protected abstract bool NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType);
protected abstract bool NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType);
public SearchResultEventArgs(LdapMessage sourceMessage, EventClassifiers aClassification, LdapEventType aType) : base(sourceMessage, EventClassifiers.CLASSIFICATION_LDAP_PSEARCH, aType) { }
NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType);
protected void NotifyListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType) { // first let the actual source Notify the listeners with // appropriate EventArgs bool bListenersNotified = NotifyEventListeners(sourceMessage, aClassification, nType); if (!bListenersNotified) { // Actual EventSource could not recognize the event // Just notify the listeners for generic directory events NotifyDirectoryListeners(sourceMessage, aClassification); } }
protected override bool NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType) { bool bListenersNotified = false; if (null == sourceMessage) { return bListenersNotified; } switch (sourceMessage.Type) { case LdapMessage.SEARCH_RESULT_REFERENCE : if (null != search_referral_event) { search_referral_event(this, new SearchReferralEventArgs( sourceMessage, aClassification, (LdapEventType)nType) ); bListenersNotified = true; } break; case LdapMessage.SEARCH_RESPONSE: if (null != search_result_event) { LdapEventType changeType = LdapEventType.TYPE_UNKNOWN; LdapControl[] controls = sourceMessage.Controls; foreach(LdapControl control in controls) { if (control is LdapEntryChangeControl) { changeType = (LdapEventType)(((LdapEntryChangeControl)control).ChangeType); // TODO: Why is this continue here..? (from Java code..) // TODO: Why are we interested only in the last changeType..? continue; } } // if no changeType then value is TYPE_UNKNOWN search_result_event(this, new SearchResultEventArgs( sourceMessage, aClassification, changeType) ); bListenersNotified = true; } break; case LdapMessage.SEARCH_RESULT: // This is a generic LDAP Event // TODO: Why the type is ANY...? (java code) NotifyDirectoryListeners(new LdapEventArgs(sourceMessage, EventClassifiers.CLASSIFICATION_LDAP_PSEARCH, LdapEventType.LDAP_PSEARCH_ANY)); bListenersNotified = true; break; default: // This seems to be some unknown event. // Let this be notified to generic DirectoryListeners in the base class... break; } return bListenersNotified; }
public EdirEventArgs(LdapMessage sourceMessage, EventClassifiers aClassification) : base(sourceMessage, aClassification) { }
public DirectoryEventArgs(LdapMessage sourceMessage, EventClassifiers aClassification) : base(sourceMessage) { eClassification = aClassification; }
protected override bool NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType) { bool bListenersNotified = false; if (null != edir_event) { if (null != sourceMessage) { if ((sourceMessage.Type == LdapMessage.INTERMEDIATE_RESPONSE) && (sourceMessage is EdirEventIntermediateResponse)) { edir_event(this, new EdirEventArgs(sourceMessage, EventClassifiers.CLASSIFICATION_EDIR_EVENT)); bListenersNotified = true; } } } return bListenersNotified; }
protected override bool NotifyEventListeners(LdapMessage sourceMessage, EventClassifiers aClassification, int nType) { bool bListenersNotified = false; if (null == sourceMessage) { return(bListenersNotified); } switch (sourceMessage.Type) { case LdapMessage.SEARCH_RESULT_REFERENCE: if (null != search_referral_event) { search_referral_event(this, new SearchReferralEventArgs( sourceMessage, aClassification, (LdapEventType)nType) ); bListenersNotified = true; } break; case LdapMessage.SEARCH_RESPONSE: if (null != search_result_event) { LdapEventType changeType = LdapEventType.TYPE_UNKNOWN; LdapControl[] controls = sourceMessage.Controls; foreach (LdapControl control in controls) { if (control is LdapEntryChangeControl) { changeType = (LdapEventType)(((LdapEntryChangeControl)control).ChangeType); // TODO: Why is this continue here..? (from Java code..) // TODO: Why are we interested only in the last changeType..? continue; } } // if no changeType then value is TYPE_UNKNOWN search_result_event(this, new SearchResultEventArgs( sourceMessage, aClassification, changeType) ); bListenersNotified = true; } break; case LdapMessage.SEARCH_RESULT: // This is a generic LDAP Event // TODO: Why the type is ANY...? (java code) NotifyDirectoryListeners(new LdapEventArgs(sourceMessage, EventClassifiers.CLASSIFICATION_LDAP_PSEARCH, LdapEventType.LDAP_PSEARCH_ANY)); bListenersNotified = true; break; default: // This seems to be some unknown event. // Let this be notified to generic DirectoryListeners in the base class... break; } return(bListenersNotified); }
protected void NotifyDirectoryListeners(LdapMessage sourceMessage, EventClassifiers aClassification) { NotifyDirectoryListeners(new DirectoryEventArgs(sourceMessage, aClassification)); }