コード例 #1
0
        /// <summary>
        ///     Add a Query.
        /// </summary>
        /// <param name="value">
        ///     A <see cref="FullHashQuery" /> indicating a <see cref="ThreatList" /> to query.
        /// </param>
        /// <returns>
        ///     This full hash request builder.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">
        ///     Thrown if <paramref name="value" /> is a null reference.
        /// </exception>
        public FullHashRequestBuilder AddQuery(FullHashQuery value)
        {
            Guard.ThrowIf(nameof(value), value).Null();

            this.Queries.Add(value);
            return(this);
        }
コード例 #2
0
        /// <summary>
        ///     Add a Query.
        /// </summary>
        /// <param name="threatListDescriptor">
        ///     A <see cref="ThreatListDescriptor" /> identifying the <see cref="ThreatList" /> to query.
        /// </param>
        /// <param name="threatListState">
        ///     The state, formatted as a hexadecimal encoded string, of the <see cref="ThreatList" /> identified by
        ///     <paramref name="threatListDescriptor" />.
        /// </param>
        /// <returns>
        ///     This full hash request builder.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">
        ///     Thrown if <paramref name="threatListDescriptor" /> is a null reference, or if
        ///     <paramref name="threatListState" /> is a null reference.
        /// </exception>
        /// <exception cref="System.FormatException">
        ///     Thrown if <paramref name="threatListState" /> is not hexadecimal encoded.
        /// </exception>
        public FullHashRequestBuilder AddQuery(ThreatListDescriptor threatListDescriptor, string threatListState)
        {
            // ...
            //
            // Throws an exception if the operation fails.
            var query = new FullHashQuery(threatListDescriptor, threatListState);

            this.Queries.Add(query);
            return(this);
        }
コード例 #3
0
        /// <summary>
        ///     Add Query.
        /// </summary>
        /// <param name="threatType">
        ///     A <see cref="ThreatType" /> identifying the <see cref="ThreatList" /> to query.
        /// </param>
        /// <param name="platformType">
        ///     A <see cref="PlatformType" /> identifying the <see cref="ThreatList" /> to query.
        /// </param>
        /// <param name="threatEntryType">
        ///     A <see cref="ThreatEntryType" /> identifying the <see cref="ThreatList" /> to query.
        /// </param>
        /// <param name="threatListState">
        ///     The state, formatted as a hexadecimal encoded string, of the <see cref="ThreatList" /> identified by
        ///     <paramref name="threatType" />, <paramref name="platformType" />, and
        ///     <paramref name="threatEntryType" />.
        /// </param>
        /// <returns>
        ///     This full hash request builder.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">
        ///     Thrown if <paramref name="threatListState" /> is a null reference.
        /// </exception>
        /// <exception cref="System.FormatException">
        ///     Thrown if <paramref name="threatListState" /> is not hexadecimal encoded.
        /// </exception>
        public FullHashRequestBuilder AddQuery(ThreatType threatType, PlatformType platformType, ThreatEntryType threatEntryType, string threatListState)
        {
            // ...
            //
            // Throws an exception if the operation fails.
            var query = new FullHashQuery(threatType, platformType, threatEntryType, threatListState);

            this.Queries.Add(query);
            return(this);
        }