Esempio n. 1
0
        /// <summary>
        /// Returns description of the next chunk.
        /// </summary>
        /// <returns>Chunk descriptor if there is a next chunk, else null.</returns>
        public ManagedChunk GetChunk()
        {
            // No GetValue() call pending from this point on.
            _pendingGetValue = false;

            //
            // Move to the next core property that exists and has a value
            // and create a chunk descriptor out of it.
            //

            if (!CorePropertyEnumerator.MoveNext())
            {
                // End of chunks.
                return(null);
            }

            ManagedChunk chunk = new PropertyChunk(
                AllocateChunkID(),
                CorePropertyEnumerator.CurrentGuid,
                CorePropertyEnumerator.CurrentPropId
                );

            // GetValue() call pending from this point on
            // for the current GetChunk call.
            _pendingGetValue = true;

            return(chunk);
        }
Esempio n. 2
0
        /// <summary>
        /// Initialzes the session for this filter.
        /// </summary>
        /// <param name="grfFlags">usage flags</param>
        /// <param name="aAttributes">array of Managed FULLPROPSPEC structs to restrict responses</param>
        /// <returns>IFILTER_FLAGS_NONE. Return value is effectively ignored by the caller.</returns>
        public IFILTER_FLAGS Init(IFILTER_INIT grfFlags, ManagedFullPropSpec[] aAttributes)
        {
            // NOTE: Methods parameters have already been validated by XpsFilter.

            _grfFlags    = grfFlags;
            _aAttributes = aAttributes;

            // Each call to Init() creates a new enumerator
            // with parameters corresponding to current Init() call.
            _corePropertyEnumerator = new CorePropertyEnumerator(
                _coreProperties, _grfFlags, _aAttributes);

            return(IFILTER_FLAGS.IFILTER_FLAGS_NONE);
        }
        /// <summary>
        /// Initialzes the session for this filter.
        /// </summary>
        /// <param name="grfFlags">usage flags</param>
        /// <param name="aAttributes">array of Managed FULLPROPSPEC structs to restrict responses</param>
        /// <returns>IFILTER_FLAGS_NONE. Return value is effectively ignored by the caller.</returns>
        public IFILTER_FLAGS Init(IFILTER_INIT grfFlags, ManagedFullPropSpec[] aAttributes)
        {
            // NOTE: Methods parameters have already been validated by XpsFilter.

            _grfFlags = grfFlags;
            _aAttributes = aAttributes;

            // Each call to Init() creates a new enumerator
            // with parameters corresponding to current Init() call.
            _corePropertyEnumerator = new CorePropertyEnumerator(
                _coreProperties, _grfFlags, _aAttributes);

            return IFILTER_FLAGS.IFILTER_FLAGS_NONE;
        }