// Token: 0x06000119 RID: 281 RVA: 0x00006032 File Offset: 0x00004232
 public NspiStatus End(out NspiState state, out int?delta)
 {
     base.CheckDisposed();
     base.CheckCompletion();
     state = this.returnState;
     delta = this.returnedDelta;
     return(base.Status);
 }
示例#2
0
 public NspiStatus End(out NspiState state, out PropertyValue[][] rowset)
 {
     base.CheckDisposed();
     base.CheckCompletion();
     state  = this.returnState;
     rowset = this.returnRowset;
     return(base.Status);
 }
 public NspiStatus End(out NspiState state, out int[] mids)
 {
     base.CheckDisposed();
     base.CheckCompletion();
     state = this.returnState;
     mids  = this.returnMids;
     return(base.Status);
 }
        // Token: 0x06000178 RID: 376 RVA: 0x00007608 File Offset: 0x00005808
        public NspiStatus EndUpdateStat(ICancelableAsyncResult asyncResult, out NspiState state, out int?delta)
        {
            NspiState  localState = null;
            int?       localDelta = null;
            NspiStatus result;

            try
            {
                result = this.EndContextWrapper("EndUpdateStat", asyncResult, (NspiDispatchTask task) => ((NspiUpdateStatDispatchTask)task).End(out localState, out localDelta));
            }
            finally
            {
                state = localState;
                delta = localDelta;
            }
            return(result);
        }
        // Token: 0x0600017A RID: 378 RVA: 0x0000775C File Offset: 0x0000595C
        public NspiStatus EndQueryRows(ICancelableAsyncResult asyncResult, out NspiState state, out PropertyValue[][] rowset)
        {
            NspiState localState = null;

            PropertyValue[][] localRowset = null;
            NspiStatus        result;

            try
            {
                result = this.EndContextWrapper("EndQueryRows", asyncResult, (NspiDispatchTask task) => ((NspiQueryRowsDispatchTask)task).End(out localState, out localRowset));
            }
            finally
            {
                state  = localState;
                rowset = localRowset;
            }
            return(result);
        }
        // Token: 0x06000180 RID: 384 RVA: 0x00007B58 File Offset: 0x00005D58
        public NspiStatus EndResortRestriction(ICancelableAsyncResult asyncResult, out NspiState state, out int[] mids)
        {
            NspiState localState = null;

            int[]      localMids = null;
            NspiStatus result;

            try
            {
                result = this.EndContextWrapper("EndResortRestriction", asyncResult, (NspiDispatchTask task) => ((NspiResortRestrictionDispatchTask)task).End(out localState, out localMids));
            }
            finally
            {
                state = localState;
                mids  = localMids;
            }
            return(result);
        }
        // Token: 0x0600136B RID: 4971 RVA: 0x000715A8 File Offset: 0x0006F7A8
        public PropertyManager(OfflineAddressBook offlineAddressBook, SecurityIdentifier userSid, string userDomain, bool habEnabled)
        {
            PropertyManager.Tracer.TraceFunction((long)this.GetHashCode(), "PropertyManager.PropertyManager");
            Dictionary <PropTag, OABPropertyFlags> dictionary = new Dictionary <PropTag, OABPropertyFlags>();

            PropertyManager.AddProperties("RdnProperties", PropertyManager.RdnProperties, OABPropertyFlags.RDN, dictionary);
            PropertyManager.AddProperties("OfflineAddressBookSchema.ANRProperties", PropertyManager.GetPropTagArray(offlineAddressBook[OfflineAddressBookSchema.ANRProperties]), OABPropertyFlags.ANR, dictionary);
            PropertyManager.AddProperties("OfflineAddressBookSchema.DetailsProperties", PropertyManager.GetPropTagArray(offlineAddressBook[OfflineAddressBookSchema.DetailsProperties]), OABPropertyFlags.None, dictionary);
            if (habEnabled)
            {
                PropertyManager.AddProperties("HABProperties", PropertyManager.habProperties, OABPropertyFlags.None, dictionary);
            }
            PropertyManager.AddProperties("OfflineAddressBookSchema.TruncatedProperties", PropertyManager.GetPropTagArray(offlineAddressBook[OfflineAddressBookSchema.TruncatedProperties]), OABPropertyFlags.Truncated, dictionary);
            PropertyManager.AddProperties("RequiredProperties", PropertyManager.RequiredProperties, OABPropertyFlags.None, dictionary);
            foreach (PropTag key in PropertyManager.V4ANRPropTags)
            {
                OABPropertyFlags oabpropertyFlags;
                if (dictionary.TryGetValue(key, out oabpropertyFlags))
                {
                    dictionary[key] = (oabpropertyFlags | OABPropertyFlags.ANR);
                }
            }
            PropertyManager.InitializeNspiPropMapper();
            this.oabProperties = OABProperty.CreateOABPropertyList(dictionary);
            SecurityAccessToken securityAccessToken = new SecurityAccessToken
            {
                UserSid = userSid.ToString()
            };
            ClientSecurityContext clientSecurityContext = new ClientSecurityContext(securityAccessToken);

            this.nspiContext = new NspiContext(clientSecurityContext, userDomain, string.Empty, string.Empty, string.Empty, default(Guid));
            if (!this.nspiContext.TryAcquireBudget())
            {
                PropertyManager.Tracer.TraceError((long)this.GetHashCode(), "NspiContext.TryAcquireBudget failed");
            }
            NspiState state = new NspiState
            {
                CodePage = Encoding.UTF8.CodePage
            };

            this.nspiContext.Bind(NspiBindFlags.None, state);
            this.nspiPropMapper = new NspiPropMapper(this.nspiContext, Array.ConvertAll <OABProperty, PropTag>(this.oabProperties, (OABProperty property) => property.PropTag), Encoding.UTF8.CodePage, NspiPropMapperFlags.IncludeHiddenFromAddressListsEnabled);
        }
示例#8
0
        internal static int GetEstimatedRowCount(IConfigurationSession session, Guid addressListObjectGuid)
        {
            int result;

            try
            {
                using (NspiRpcClientConnection nspiRpcClientConnection = session.GetNspiRpcClientConnection())
                {
                    int addressListEphemeralId = NspiVirtualListView.GetAddressListEphemeralId(nspiRpcClientConnection, addressListObjectGuid);
                    if (addressListEphemeralId == 0)
                    {
                        result = -1;
                    }
                    else
                    {
                        NspiState nspiState = new NspiState
                        {
                            ContainerId    = addressListEphemeralId,
                            CodePage       = 1252,
                            TemplateLocale = 1033,
                            SortLocale     = 1033
                        };
                        using (SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle(nspiState.GetBytesToMarshal()))
                        {
                            IntPtr intPtr = safeRpcMemoryHandle.DangerousGetHandle();
                            nspiState.MarshalToNative(intPtr);
                            int num = nspiRpcClientConnection.RpcClient.UpdateStat(intPtr);
                            if (num != 0)
                            {
                                throw new NspiFailureException(num);
                            }
                            nspiState.MarshalFromNative(intPtr);
                        }
                        result = nspiState.TotalRecords;
                    }
                }
            }
            catch (RpcException ex)
            {
                throw new DataSourceOperationException(DirectoryStrings.NspiRpcError(ex.Message), ex);
            }
            return(result);
        }
示例#9
0
        public ADRawEntry[] GetPropertyBags(int offset, int count)
        {
            if (count < 0)
            {
                throw new ArgumentOutOfRangeException("count");
            }
            if (count == 0)
            {
                return(Array <ADRawEntry> .Empty);
            }
            Encoding        encoding        = Encoding.GetEncoding(this.codePage);
            NspiPropertyMap nspiPropertyMap = NspiPropertyMap.Create(this.properties, encoding);
            PropRowSet      propRowSet      = null;

            try
            {
                using (NspiRpcClientConnection nspiRpcClientConnection = this.session.GetNspiRpcClientConnection())
                {
                    int addressListEphemeralId = NspiVirtualListView.GetAddressListEphemeralId(nspiRpcClientConnection, this.addressListId.ObjectGuid);
                    if (addressListEphemeralId == 0)
                    {
                        return(null);
                    }
                    NspiState nspiState = new NspiState
                    {
                        SortIndex      = SortIndex.DisplayName,
                        ContainerId    = addressListEphemeralId,
                        CurrentRecord  = 0,
                        Delta          = offset,
                        CodePage       = this.codePage,
                        TemplateLocale = this.session.Lcid,
                        SortLocale     = this.session.Lcid
                    };
                    using (SafeRpcMemoryHandle safeRpcMemoryHandle = new SafeRpcMemoryHandle(nspiState.GetBytesToMarshal()))
                    {
                        SafeRpcMemoryHandle safeRpcMemoryHandle2 = null;
                        try
                        {
                            IntPtr intPtr = safeRpcMemoryHandle.DangerousGetHandle();
                            nspiState.MarshalToNative(intPtr);
                            int num = nspiRpcClientConnection.RpcClient.UpdateStat(intPtr);
                            if (num != 0)
                            {
                                throw new NspiFailureException(num);
                            }
                            num = nspiRpcClientConnection.RpcClient.QueryRows(0, intPtr, null, count, nspiPropertyMap.NspiProperties, out safeRpcMemoryHandle2);
                            if (num != 0)
                            {
                                throw new NspiFailureException(num);
                            }
                            nspiState.MarshalFromNative(intPtr);
                            this.currentRow        = nspiState.Position;
                            this.estimatedRowCount = nspiState.TotalRecords;
                            if (safeRpcMemoryHandle2 != null)
                            {
                                propRowSet = new PropRowSet(safeRpcMemoryHandle2, true);
                            }
                        }
                        finally
                        {
                            if (safeRpcMemoryHandle2 != null)
                            {
                                safeRpcMemoryHandle2.Dispose();
                            }
                        }
                    }
                }
            }
            catch (RpcException ex)
            {
                throw new DataSourceOperationException(DirectoryStrings.NspiRpcError(ex.Message), ex);
            }
            if (propRowSet == null)
            {
                return(null);
            }
            return(nspiPropertyMap.Convert(propRowSet));
        }
 public NspiResortRestrictionDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiResortRestrictionFlags flags, NspiState state, int[] mids) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags = flags;
     this.mids  = mids;
 }
示例#11
0
 // Token: 0x060000C3 RID: 195 RVA: 0x00004D28 File Offset: 0x00002F28
 public NspiGetMatchesDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiGetMatchesFlags flags, NspiState state, int[] mids, int interfaceOptions, Restriction restriction, IntPtr pPropName, int maxRows, PropertyTag[] propertyTags) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags            = flags;
     this.interfaceOptions = interfaceOptions;
     this.restriction      = restriction;
     this.maxRows          = maxRows;
     this.propertyTags     = propertyTags;
     if (this.maxRows < 0 || this.maxRows > 100000)
     {
         this.maxRows = 100000;
     }
 }
 // Token: 0x060000A3 RID: 163 RVA: 0x00004818 File Offset: 0x00002A18
 public NspiCompareDNTsDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiCompareDNTsFlags flags, NspiState state, int mid1, int mid2) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags = flags;
     this.mid1  = mid1;
     this.mid2  = mid2;
 }
示例#13
0
 public NspiQueryRowsDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiQueryRowsFlags flags, NspiState state, int[] mids, int rowCount, PropertyTag[] propertyTags) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags        = flags;
     this.mids         = mids;
     this.rowCount     = rowCount;
     this.propertyTags = propertyTags;
 }
 // Token: 0x0600017B RID: 379 RVA: 0x00007810 File Offset: 0x00005A10
 public ICancelableAsyncResult BeginSeekEntries(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiSeekEntriesFlags flags, NspiState state, PropertyValue?target, int[] restriction, PropertyTag[] propTags, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginSeekEntries", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiSeekEntriesDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, target, restriction, propTags)));
 }
 // Token: 0x06000173 RID: 371 RVA: 0x00007308 File Offset: 0x00005508
 public ICancelableAsyncResult BeginBind(ProtocolRequestInfo protocolRequestInfo, ClientBinding clientBinding, NspiBindFlags flags, NspiState state, Guid?guid, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginWrapper("BeginBind", asyncCallback, asyncState, true, (NspiContext context) => new NspiBindDispatchTask(asyncCallback, asyncState, protocolRequestInfo, clientBinding, context, flags, state, guid), () => ClientContextCache.CreateContext(clientBinding)));
 }
 // Token: 0x0600017D RID: 381 RVA: 0x00007970 File Offset: 0x00005B70
 public ICancelableAsyncResult BeginGetMatches(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiGetMatchesFlags flags, NspiState state, int[] mids, int interfaceOptions, Restriction restriction, IntPtr propName, int maxRows, PropertyTag[] propTags, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginGetMatches", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiGetMatchesDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, mids, interfaceOptions, restriction, propName, maxRows, propTags)));
 }
 public NspiGetHierarchyInfoDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiGetHierarchyInfoFlags flags, NspiState state, int version) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags   = flags;
     this.version = version;
 }
示例#18
0
 public NspiResolveNamesDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiResolveNamesFlags flags, NspiState state, PropertyTag[] propertyTags, byte[][] names) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags        = flags;
     this.propertyTags = propertyTags;
     this.names        = names;
 }
 // Token: 0x0600018B RID: 395 RVA: 0x00008124 File Offset: 0x00006324
 public ICancelableAsyncResult BeginGetHierarchyInfo(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiGetHierarchyInfoFlags flags, NspiState state, int version, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginGetHierarchyInfo", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiGetHierarchyInfoDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, version)));
 }
 // Token: 0x06000189 RID: 393 RVA: 0x00008048 File Offset: 0x00006248
 public ICancelableAsyncResult BeginModProps(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiModPropsFlags flags, NspiState state, PropertyTag[] propTags, PropertyValue[] row, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginModProps", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiModPropsDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, propTags, row)));
 }
 // Token: 0x06000187 RID: 391 RVA: 0x00007F2C File Offset: 0x0000612C
 public ICancelableAsyncResult BeginCompareDNTs(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiCompareDNTsFlags flags, NspiState state, int mid1, int mid2, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginCompareDNTs", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiCompareDNTsDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, mid1, mid2)));
 }
示例#22
0
 // Token: 0x060000D6 RID: 214 RVA: 0x000051A8 File Offset: 0x000033A8
 public NspiGetPropsDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiGetPropsFlags flags, NspiState state, PropertyTag[] propertyTags) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags        = flags;
     this.propertyTags = propertyTags;
 }
 // Token: 0x0600019B RID: 411 RVA: 0x000089EC File Offset: 0x00006BEC
 public ICancelableAsyncResult BeginResolveNamesW(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiResolveNamesFlags flags, NspiState state, PropertyTag[] propTags, string[] names, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginResolveNamesW", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiResolveNamesWDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, propTags, names)));
 }
 // Token: 0x0600017F RID: 383 RVA: 0x00007AD0 File Offset: 0x00005CD0
 public ICancelableAsyncResult BeginResortRestriction(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiResortRestrictionFlags flags, NspiState state, int[] mids, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginResortRestriction", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiResortRestrictionDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, mids)));
 }
 public NspiStateDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiState state) : base(asyncCallback, asyncState, protocolRequestInfo, context)
 {
     this.state = state;
 }
 // Token: 0x06000177 RID: 375 RVA: 0x00007580 File Offset: 0x00005780
 public ICancelableAsyncResult BeginUpdateStat(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiUpdateStatFlags flags, NspiState state, bool deltaRequested, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginUpdateStat", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiUpdateStatDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, deltaRequested)));
 }
 // Token: 0x06000118 RID: 280 RVA: 0x00006007 File Offset: 0x00004207
 public NspiUpdateStatDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiUpdateStatFlags flags, NspiState state, bool deltaRequested) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags          = flags;
     this.deltaRequested = deltaRequested;
 }
 // Token: 0x06000179 RID: 377 RVA: 0x000076C4 File Offset: 0x000058C4
 public ICancelableAsyncResult BeginQueryRows(ProtocolRequestInfo protocolRequestInfo, IntPtr contextHandle, NspiQueryRowsFlags flags, NspiState state, int[] mids, int rowCount, PropertyTag[] propTags, CancelableAsyncCallback asyncCallback, object asyncState)
 {
     return(this.BeginContextWrapper("BeginQueryRows", asyncCallback, asyncState, contextHandle, (NspiContext context) => new NspiQueryRowsDispatchTask(asyncCallback, asyncState, protocolRequestInfo, context, flags, state, mids, rowCount, propTags)));
 }
 // Token: 0x0600009C RID: 156 RVA: 0x000045E1 File Offset: 0x000027E1
 public NspiBindDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, ClientBinding clientBinding, NspiContext context, NspiBindFlags flags, NspiState state, Guid?serverGuid) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.clientBinding = clientBinding;
     this.flags         = flags;
     this.serverGuid    = serverGuid;
 }
 // Token: 0x0600010C RID: 268 RVA: 0x00005DA4 File Offset: 0x00003FA4
 public NspiSeekEntriesDispatchTask(CancelableAsyncCallback asyncCallback, object asyncState, ProtocolRequestInfo protocolRequestInfo, NspiContext context, NspiSeekEntriesFlags flags, NspiState state, PropertyValue?target, int[] restriction, PropertyTag[] propertyTags) : base(asyncCallback, asyncState, protocolRequestInfo, context, state)
 {
     this.flags        = flags;
     this.target       = target;
     this.restriction  = restriction;
     this.propertyTags = propertyTags;
 }