示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="QueryIndex" /> class.
        /// </summary>
        /// <param name="isDescending">Sort direction.</param>
        /// <param name="indexType">Type of the index.</param>
        /// <param name="fieldNames">Names of the fields to index.</param>
        public QueryIndex(bool isDescending, QueryIndexType indexType, params string[] fieldNames)
        {
            if (fieldNames != null)
            {
                Fields = fieldNames.Select(f => new QueryIndexField(f, isDescending)).ToArray();
            }

            IndexType = indexType;
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryIndexEx"/> class.
 /// </summary>
 /// <param name="fieldName">Name of the field.</param>
 /// <param name="isDescending">if set to <c>true</c> [is descending].</param>
 /// <param name="indexType">Type of the index.</param>
 /// <param name="groups">The groups.</param>
 public QueryIndexEx(string fieldName, bool isDescending, QueryIndexType indexType,
                     ICollection <string> groups)
     : base(isDescending, indexType, fieldName)
 {
     IndexGroups = groups;
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryIndex" /> class.
 /// </summary>
 /// <param name="isDescending">Sort direction.</param>
 /// <param name="indexType">Type of the index.</param>
 /// <param name="fieldNames">Names of the fields to index.</param>
 public QueryIndex(bool isDescending, QueryIndexType indexType, params string[] fieldNames)
     : this(isDescending, fieldNames)
 {
     IndexType = indexType;
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryIndexEx"/> class.
 /// </summary>
 /// <param name="fieldName">Name of the field.</param>
 /// <param name="isDescending">if set to <c>true</c> [is descending].</param>
 /// <param name="indexType">Type of the index.</param>
 /// <param name="groups">The groups.</param>
 public QueryIndexEx(string fieldName, bool isDescending, QueryIndexType indexType, 
     ICollection<string> groups)
     : base(isDescending, indexType, fieldName)
 {
     IndexGroups = groups;
 }
示例#5
0
文件: Native.cs 项目: skykying/traces
 /// <summary>
 /// This method opens a new read handle to the specified stream. The
 /// handle can be used with StGetNextEntryFast() and
 /// StGetPreviousEntryFast() to read entries.
 /// </summary>
 /// <param name="session">The id of the session that holds the
 ///     stream of interest.</param>
 /// <param name="stream">The id of the stream to open a
 ///     handle for.</param>
 /// <param name="type">Type of property value that indicates which
 ///     position in the stream should be opened. For further
 ///     information on the possible query types
 ///     see QueryIndexType.</param>
 /// <param name="value">A value used in the query specified by type.
 ///     See QueryIndexType for more details.</param>
 /// <param name="flags">Supplies information on how the caller intends
 ///     to access the stream with the requested handle. For more
 ///     information see StreamAccessFlags.</param>
 /// <returns>A read handle to the specified stream if successful,
 ///     0 otherwise. For a more detailed error description call
 ///     StGetLastError().</returns>
 public static IntPtr StStreamOpen(uint session, uint stream,
                                   QueryIndexType type, ulong value, StreamAccessFlags flags)
 {
     return(NativeMethods.StStreamOpen(session, stream, type, value,
                                       flags, IntPtr.Zero));
 }
示例#6
0
 public static extern IntPtr StStreamOpen(uint session, uint stream,
                                          QueryIndexType type, ulong value, StreamAccessFlags flags,
                                          IntPtr handle);
示例#7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryIndex" /> class.
 /// </summary>
 /// <param name="isDescending">Sort direction.</param>
 /// <param name="indexType">Type of the index.</param>
 /// <param name="fieldNames">Names of the fields to index.</param>
 public QueryIndex(bool isDescending, QueryIndexType indexType, params string[] fieldNames)
     : this(isDescending, fieldNames)
 {
     IndexType = indexType;
 }