C# 클래스 StompNet.Models.Frames.Frame

Class representing a STOMP FRAME. No validation is done here except a command string is required. All validations must be done in inheritors. This object is not immutable, BUT should be used as if it were.
파일 보기 프로젝트 열기: krlito/StompNet 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
EmptyBody byte[]
HeartbeatFrame Frame

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Frame ( string command, string>.IEnumerable headers, byte body = null ) : System

Constructor.

GetAllHeaderValues ( string name ) : IEnumerable

Gets all the values of the specified header.

GetBodyAsString ( ) : string

Get body as a string using UTF-8 encoding.

GetBodyAsString ( Encoding encoding ) : string

Get body as a string using the specified encoding.

GetHeader ( string name ) : string

Gets the value of the first ocurrence of the specified header.

ToString ( ) : string

String representation of the Frame.

보호된 메소드들

메소드 설명
ThrowMandatoryHeaderException ( string headerName ) : void

Create and throws the exception used when a mandatory header is not included.

메소드 상세

Frame() 공개 메소드

Constructor.
public Frame ( string command, string>.IEnumerable headers, byte body = null ) : System
command string Frame command.
headers string>.IEnumerable Frame headers.
body byte Frame body.
리턴 System

GetAllHeaderValues() 공개 메소드

Gets all the values of the specified header.
public GetAllHeaderValues ( string name ) : IEnumerable
name string Name of the header.
리턴 IEnumerable

GetBodyAsString() 공개 메소드

Get body as a string using UTF-8 encoding.
public GetBodyAsString ( ) : string
리턴 string

GetBodyAsString() 공개 메소드

Get body as a string using the specified encoding.
public GetBodyAsString ( Encoding encoding ) : string
encoding System.Text.Encoding Encoding to be used to decode the message body.
리턴 string

GetHeader() 공개 메소드

Gets the value of the first ocurrence of the specified header.
public GetHeader ( string name ) : string
name string Name of the header.
리턴 string

ThrowMandatoryHeaderException() 보호된 정적인 메소드

Create and throws the exception used when a mandatory header is not included.
protected static ThrowMandatoryHeaderException ( string headerName ) : void
headerName string Name of the mandatory header.
리턴 void

ToString() 공개 메소드

String representation of the Frame.
public ToString ( ) : string
리턴 string

프로퍼티 상세

EmptyBody 공개적으로 정적으로 프로퍼티

Value used when the body is empty.
public static byte[] EmptyBody
리턴 byte[]

HeartbeatFrame 공개적으로 정적으로 프로퍼티

Value to be used when a heartbeat is received.
public static Frame,StompNet.Models.Frames HeartbeatFrame
리턴 Frame