Class MimeMediaTypeAttribute
Associates IANA MIME media type information with a target element. This class cannot be inherited.
Inheritance
Implements
Inherited Members
Namespace: Argotic.Common
Assembly: Argotic.Common.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
[Serializable]
public sealed class MimeMediaTypeAttribute : Attribute, IComparable
Remarks
See http://www.iana.org/assignments/media-types for a listing of the registered IANA MIME media types and sub-types.
Constructors
| Improve this Doc View SourceMimeMediaTypeAttribute()
Initializes a new instance of the MimeMediaTypeAttribute class.
Declaration
public MimeMediaTypeAttribute()
Properties
| Improve this Doc View SourceDocumentation
Gets or sets a URI that points to the documentation the describes the MIME media type for the attributed field.
Declaration
public string Documentation { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.Uri that points to the documentation the describes the MIME media type for the attributed field. |
Name
Gets or sets the MIME media type name for the attributed field.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The MIME media type name for the attributed field. |
SubName
Gets or sets the MIME media sub-type name for the attributed field.
Declaration
public string SubName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The MIME media sub-type name for the attributed field. |
Methods
| Improve this Doc View SourceCompareTo(Object)
Compares the current instance with another object of the same type.
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | An object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that indicates the relative order of the objects being compared. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The |
Equals(Object)
Determines whether the specified System.Object is equal to the current instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified System.Object is equal to the current instance; otherwise, false. |
Overrides
GetHashCode()
Returns a hash code for the current instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer hash code. |
Overrides
ToString()
Returns a System.String that represents the current MimeMediaTypeAttribute.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current MimeMediaTypeAttribute. |
Overrides
Remarks
This method returns a human-readable string for the current instance.
Operators
| Improve this Doc View SourceEquality(MimeMediaTypeAttribute, MimeMediaTypeAttribute)
Determines if operands are equal.
Declaration
public static bool operator ==(MimeMediaTypeAttribute first, MimeMediaTypeAttribute second)
Parameters
Type | Name | Description |
---|---|---|
MimeMediaTypeAttribute | first | Operand to be compared. |
MimeMediaTypeAttribute | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | true if the values of its operands are equal, otherwise; false. |
GreaterThan(MimeMediaTypeAttribute, MimeMediaTypeAttribute)
Determines if first operand is greater than second operand.
Declaration
public static bool operator>(MimeMediaTypeAttribute first, MimeMediaTypeAttribute second)
Parameters
Type | Name | Description |
---|---|---|
MimeMediaTypeAttribute | first | Operand to be compared. |
MimeMediaTypeAttribute | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | true if the first operand is greater than the second, otherwise; false. |
Inequality(MimeMediaTypeAttribute, MimeMediaTypeAttribute)
Determines if operands are not equal.
Declaration
public static bool operator !=(MimeMediaTypeAttribute first, MimeMediaTypeAttribute second)
Parameters
Type | Name | Description |
---|---|---|
MimeMediaTypeAttribute | first | Operand to be compared. |
MimeMediaTypeAttribute | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | false if its operands are equal, otherwise; true. |
LessThan(MimeMediaTypeAttribute, MimeMediaTypeAttribute)
Determines if first operand is less than second operand.
Declaration
public static bool operator <(MimeMediaTypeAttribute first, MimeMediaTypeAttribute second)
Parameters
Type | Name | Description |
---|---|---|
MimeMediaTypeAttribute | first | Operand to be compared. |
MimeMediaTypeAttribute | second | Operand to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | true if the first operand is less than the second, otherwise; false. |