예제 #1
0
		private ResultSet FindByDate(FindByDateMatcher.DateProperty property, MatchType matchType, DateTime value, Type principalType)
		{
			DirectoryEntries children = SDSUtils.BuildDirectoryEntry(this.ctxBase.Path, this.credentials, this.authTypes).Children;
			List<string> schemaFilter = this.GetSchemaFilter(principalType);
			SAMQuerySet sAMQuerySet = new SAMQuerySet(schemaFilter, children, this.ctxBase, -1, this, new FindByDateMatcher(property, matchType, value));
			return sAMQuerySet;
		}
예제 #2
0
        private ResultSet FindByDate(
                        FindByDateMatcher.DateProperty property,
                        MatchType matchType,
                        DateTime value,
                        Type principalType
                        )
        {
            // We use the same SAMQuery set that we use for query-by-example, but with a different
            // SAMMatcher class to perform the date-range filter.

            // Get the entries we'll iterate over.  Write access to Children is controlled through the
            // ctxBaseLock, but we don't want to have to hold that lock while we're iterating over all
            // the child entries.  So we have to clone the ctxBase --- not ideal, but it prevents
            // multithreading issues.
            DirectoryEntries entries = SDSUtils.BuildDirectoryEntry(_ctxBase.Path, _credentials, _authTypes).Children;
            Debug.Assert(entries != null);

            // The SAMQuerySet will use this to restrict the types of DirectoryEntry objects returned.
            List<string> schemaTypes = GetSchemaFilter(principalType);

            // Create the ResultSet that will perform the client-side filtering
            SAMQuerySet resultSet = new SAMQuerySet(
                                                schemaTypes,
                                                entries,
                                                _ctxBase,
                                                -1,             // no size limit 
                                                this,
                                                new FindByDateMatcher(property, matchType, value));

            return resultSet;
        }
예제 #3
0
		internal FindByDateMatcher(FindByDateMatcher.DateProperty property, MatchType matchType, DateTime value)
		{
			this.propertyToMatch = property;
			this.matchType = matchType;
			this.valueToMatch = value;
		}