Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MediaRange"/> class.
        /// </summary>
        MediaRange(MediaType type, MediaType subtype, MediaRangeParameters parameters)
        {
            Contract.Requires<ArgumentNullException>(parameters != null);

            this.type = type;
            this.subtype = subtype;
            this.parameters = parameters;
        }
Пример #2
0
 /// <summary>
 /// Matched the media type with another media type.
 /// </summary>
 /// <param name="other">The media type that should be matched against.</param>
 /// <returns><see langword="true" /> if the media types match, otherwise <see langword="false" />.</returns>
 public bool Matches(MediaType other)
 {
     return IsWildcard || other.IsWildcard || value.Equals(other.value, StringComparison.InvariantCultureIgnoreCase);
 }