예제 #1
0
파일: MediaRange.cs 프로젝트: wasabii/rnet
        /// <summary>
        /// Initializes a new instance of the <see cref="MediaRange"/> class.
        /// </summary>
        MediaRange(MediaType type, MediaType subtype, MediaRangeParameters parameters)
        {
            Contract.Requires<ArgumentNullException>(type != null);
            Contract.Requires<ArgumentNullException>(subtype != null);
            Contract.Requires<ArgumentNullException>(parameters != null);

            this.type = type;
            this.subtype = subtype;
            this.parameters = parameters;
        }
예제 #2
0
파일: MediaType.cs 프로젝트: wasabii/rnet
 /// <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);
 }