C# 클래스 Tp.Utils.Mime.MimeType

Defines a Mime Content Type
파일 보기 프로젝트 열기: TargetProcess/Target-Process-Plugins 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddExtension void
AddMagic void
HasCtrlOrSpecials bool
HasMagic bool
Init void
IsValid bool
Matches bool

공개 메소드들

메소드 설명
Clean ( string type ) : string

Cleans a content-type. This method cleans a content-type by removing its optional parameters and returning only its primary-type/sub-type.

parsing/cleaning of the specified type.

Equals ( Object obj ) : bool

Indicates if an object is equal to this mime-type. The specified object is equal to this mime-type if it is not null, and it is an instance of MimeType and its name is equals to this mime-type.

GetHashCode ( ) : int

Matches ( string url ) : bool
MimeType ( string name ) : System

Creates a MimeType from a string.

MimeType ( string primary, string sub ) : System

Creates a MimeType with the given primary type and sub type.

ToString ( ) : string

비공개 메소드들

메소드 설명
AddExtension ( string ext ) : void

Add a supported extension.

AddMagic ( int offset, string type, string magic ) : void
HasCtrlOrSpecials ( string type ) : bool

Checks if the specified string contains some special characters.

HasMagic ( ) : bool
Init ( string primary, string sub ) : void

Init method used by constructors.

IsValid ( string type ) : bool

Checks if the specified primary or sub type is valid.

Matches ( byte data ) : bool

메소드 상세

Clean() 공개 정적인 메소드

Cleans a content-type. This method cleans a content-type by removing its optional parameters and returning only its primary-type/sub-type. parsing/cleaning of the specified type.
public static Clean ( string type ) : string
type string is the content-type to clean. ///
리턴 string

Equals() 공개 메소드

Indicates if an object is equal to this mime-type. The specified object is equal to this mime-type if it is not null, and it is an instance of MimeType and its name is equals to this mime-type.
public Equals ( Object obj ) : bool
obj Object the reference object with which to compare. ///
리턴 bool

GetHashCode() 공개 메소드

public GetHashCode ( ) : int
리턴 int

Matches() 공개 메소드

public Matches ( string url ) : bool
url string
리턴 bool

MimeType() 공개 메소드

Creates a MimeType from a string.
public MimeType ( string name ) : System
name string the MIME content type string. ///
리턴 System

MimeType() 공개 메소드

Creates a MimeType with the given primary type and sub type.
public MimeType ( string primary, string sub ) : System
primary string the content type primary type. ///
sub string the content type sub type. ///
리턴 System

ToString() 공개 메소드

public ToString ( ) : string
리턴 string