Exemplo n.º 1
0
        // Token: 0x06000351 RID: 849 RVA: 0x00011FC4 File Offset: 0x000101C4
        public static ADNotificationRequestCookie RegisterChangeNotification <T>(ADObjectId baseDN, ADNotificationCallback callback, object context, int retryCount) where T : ADConfigurationObject, new()
        {
            object wrappedContext;

            ADNotificationAdapter.CreateWrappedContextForRegisterChangeNotification(ref baseDN, callback, context, out wrappedContext);
            return(ADNotificationAdapter.RegisterChangeNotification <T>(baseDN, wrappedContext, true, retryCount));
        }
Exemplo n.º 2
0
        // Token: 0x06000356 RID: 854 RVA: 0x000121D0 File Offset: 0x000103D0
        public static ADOperationResult TryRegisterChangeNotification <T>(Func <ADObjectId> baseDNGetter, ADNotificationCallback callback, object context, int retryCount, out ADNotificationRequestCookie cookie) where T : ADConfigurationObject, new()
        {
            cookie = null;
            ADNotificationRequestCookie returnedCookie = cookie;
            ADOperationResult           result         = ADNotificationAdapter.TryRunADOperation(delegate()
            {
                ADObjectId baseDN = (baseDNGetter == null) ? null : baseDNGetter();
                object wrappedContext;
                ADNotificationAdapter.CreateWrappedContextForRegisterChangeNotification(ref baseDN, callback, context, out wrappedContext);
                returnedCookie = ADNotificationAdapter.RegisterChangeNotification <T>(baseDN, wrappedContext, false, 0);
            }, retryCount);

            cookie = returnedCookie;
            return(result);
        }