C# 클래스 NUnit.Extensions.Asp.FormVariables

A collection of HTML form variables. These form variables are sent to the server when you submit or postback a form. They consist of a name/value pair and are not required to be unique. You may include duplicate names or even duplicate name/value pairs in this collection. When writing custom testers, ReplaceAll and RemoveAll are typically the most appropriate methods to use.
파일 보기 프로젝트 열기: vcsjones/NUnitAsp 1 사용 예제들

공개 메소드들

메소드 설명
Add ( string name, string value ) : void

Add a name/value pair. Add doesn't overwrite any existing pairs with the same name, so in most cases, ReplaceAll is more appropriate.

AllValuesOf ( string name ) : string[]

Returns all the values associated with the specified name. Returns an empty (zero-length) array if there aren't any. ValueOf is more convenient when there's exactly one name/value pair with the specified name.

Contains ( string name, string value ) : bool

Check if a name/value pair is in the collection. It could exist more than once.

ContainsAny ( string name ) : bool

Check if a particular name has any values. There could be more than one name/value pair with the specified name.

Remove ( string name, string value ) : void

Remove a specific name/value pair. If the pair is in the collection more than once, this method will only remove one of them.

RemoveAll ( string name ) : void

Remove all form variables with a particular name.

Replace ( string name, string oldValue, string newValue ) : void

Replace a specific name/value pair.

ReplaceAll ( string name, string newValue ) : void

Replace all form variables with a particular name. This is the same as calling RemoveAll and then Add.

ToString ( ) : string

Serializes all the name/value pairs into a string. The format of the string matches the HTTP protocol specification for transmitting form variables to a server. This can be handy for checking the form variables in your web page. Generally you won't be sending it to a server because HttpClient handles that for you.

ValueOf ( string name ) : string

Returns the value of the name/value pair with the specified name. Throws an exception if there aren't any pairs with that name or if there's more than one. Use AllValuesOf to handle cases where there isn't exactly one name/value pair with the requested name.

비공개 메소드들

메소드 설명
AllIndexesOf ( string name ) : ArrayList
IndexOf ( string name, string value ) : int

메소드 상세

Add() 공개 메소드

Add a name/value pair. Add doesn't overwrite any existing pairs with the same name, so in most cases, ReplaceAll is more appropriate.
public Add ( string name, string value ) : void
name string
value string
리턴 void

AllValuesOf() 공개 메소드

Returns all the values associated with the specified name. Returns an empty (zero-length) array if there aren't any. ValueOf is more convenient when there's exactly one name/value pair with the specified name.
public AllValuesOf ( string name ) : string[]
name string
리턴 string[]

Contains() 공개 메소드

Check if a name/value pair is in the collection. It could exist more than once.
public Contains ( string name, string value ) : bool
name string
value string
리턴 bool

ContainsAny() 공개 메소드

Check if a particular name has any values. There could be more than one name/value pair with the specified name.
public ContainsAny ( string name ) : bool
name string
리턴 bool

Remove() 공개 메소드

Remove a specific name/value pair. If the pair is in the collection more than once, this method will only remove one of them.
public Remove ( string name, string value ) : void
name string
value string
리턴 void

RemoveAll() 공개 메소드

Remove all form variables with a particular name.
public RemoveAll ( string name ) : void
name string
리턴 void

Replace() 공개 메소드

Replace a specific name/value pair.
public Replace ( string name, string oldValue, string newValue ) : void
name string
oldValue string
newValue string
리턴 void

ReplaceAll() 공개 메소드

Replace all form variables with a particular name. This is the same as calling RemoveAll and then Add.
public ReplaceAll ( string name, string newValue ) : void
name string
newValue string
리턴 void

ToString() 공개 메소드

Serializes all the name/value pairs into a string. The format of the string matches the HTTP protocol specification for transmitting form variables to a server. This can be handy for checking the form variables in your web page. Generally you won't be sending it to a server because HttpClient handles that for you.
public ToString ( ) : string
리턴 string

ValueOf() 공개 메소드

Returns the value of the name/value pair with the specified name. Throws an exception if there aren't any pairs with that name or if there's more than one. Use AllValuesOf to handle cases where there isn't exactly one name/value pair with the requested name.
public ValueOf ( string name ) : string
name string
리턴 string