Class MimeType
public class MimeType : IComparable<MimeType>
- Inheritance
-
MimeType
- Implements
- Inherited Members
Constructors
MimeType(MimeType, IDictionary<string, string>)
public MimeType(MimeType other, IDictionary<string, string> parameters = null)
Parameters
otherMimeTypeparametersIDictionary<string, string>
MimeType(MimeType, Encoding)
public MimeType(MimeType other, Encoding charset)
Parameters
MimeType(string)
public MimeType(string type)
Parameters
typestring
MimeType(string, string)
public MimeType(string type, string subtype)
Parameters
MimeType(string, string, IDictionary<string, string>)
public MimeType(string type, string subtype, IDictionary<string, string> parameters)
Parameters
typestringsubtypestringparametersIDictionary<string, string>
MimeType(string, string, Encoding)
public MimeType(string type, string subtype, Encoding charset)
Parameters
Fields
WILDCARD_TYPE
public const string WILDCARD_TYPE = "*"
Field Value
Properties
Encoding
public Encoding Encoding { get; }
Property Value
IsConcrete
public bool IsConcrete { get; }
Property Value
IsWildcardSubtype
public bool IsWildcardSubtype { get; }
Property Value
IsWildcardType
public bool IsWildcardType { get; }
Property Value
Parameters
public IDictionary<string, string> Parameters { get; }
Property Value
Subtype
public string Subtype { get; }
Property Value
Type
public string Type { get; }
Property Value
Methods
CheckParameters(string, string)
protected void CheckParameters(string attribute, string value)
Parameters
CompareTo(MimeType)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public int CompareTo(MimeType other)
Parameters
otherMimeTypeAn object to compare with this instance.
Returns
- int
A value that indicates the relative order of the objects being compared. The return value has these meanings:
Value Meaning Less than zero This instance precedes otherin the sort order.Zero This instance occurs in the same position in the sort order as other.Greater than zero This instance follows otherin the sort order.
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object other)
Parameters
otherobject
Returns
EqualsTypeAndSubtype(MimeType)
public bool EqualsTypeAndSubtype(MimeType other)
Parameters
otherMimeType
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetParameter(string)
public string GetParameter(string name)
Parameters
namestring
Returns
Includes(MimeType)
public bool Includes(MimeType other)
Parameters
otherMimeType
Returns
IsCompatibleWith(MimeType)
public bool IsCompatibleWith(MimeType other)
Parameters
otherMimeType
Returns
IsPresentIn<T>(ICollection<T>)
public bool IsPresentIn<T>(ICollection<T> mimeTypes) where T : MimeType
Parameters
mimeTypesICollection<T>
Returns
Type Parameters
T
ToMimeType(string)
public static MimeType ToMimeType(string value)
Parameters
valuestring
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Unquote(string)
protected string Unquote(string s)
Parameters
sstring