C# Class ThoughtWorksMingleLib.MingleServer

Inheritance: IMingleServer
显示文件 Open project: ThoughtWorksStudios/mingle.net Class Usage Examples

Public Methods

Method Description
FullyQualifiedMingleUrl ( string project, string urlSegment ) : string

Adds "/api/v2" to the front of a URL segment

Get ( string project, string url ) : string

Performs a GET on the url with optional query paramaters and returns HttpWebResponse

Get ( string project, string url, IEnumerable data ) : string

Performs a GET on the url with optional query paramaters and returns HttpWebResponse

GetProject ( string projectId ) : MingleProject

Returns the MingleProject for the project Id on this MingleServer (instance)

GetProjectList ( ) : string>.SortedList

Returns a Sorted list of project names and identifiers

GetSecureStringFromString ( string value ) : SecureString

Converts a String into a read-only SecureString

MingleServer ( string hostUrl, string loginName, SecureString password ) : System

Constructs a new MingleServer

MingleServer ( string hostUrl, string loginName, string password ) : System

Constructs a new MingleServer

Post ( string project, string url, IEnumerable data ) : IResponse

Performs a POST on the Mingle url with optional post data and returns HttpWebResponse

Put ( string project, string url, IEnumerable data ) : IResponse

Performs a PUT on the Mingle url with optional post data and returns IResponse

Private Methods

Method Description
AcceptAllCertifications ( object sender, X509Certificate certification, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Allows all certificates to be considered acceptable.

EnablePreAuthentication ( Uri uri, string authenticationType ) : void

Enables pre-wuthentication on web requests. Improves performance.

See MSDN Library documentation for AuthenticaionManager: http://msdn.microsoft.com/en-us/library/3dx32b0y.aspx

Get ( string url ) : string
GetResponse ( string method, string project, string urlSegment, IEnumerable data ) : IResponse

Returns the body of a web response from Mingle

GetStringFromSecureString ( SecureString secureString ) : string

Converts a SecureString to String

NormalizeUrlSegment ( string url ) : object

Ensures a URL segment, passed as a string, begins and does not end with "/"

Method Details

FullyQualifiedMingleUrl() public method

Adds "/api/v2" to the front of a URL segment
public FullyQualifiedMingleUrl ( string project, string urlSegment ) : string
project string Mingle project id (not name)
urlSegment string URL segment string
return string

Get() public method

Performs a GET on the url with optional query paramaters and returns HttpWebResponse
public Get ( string project, string url ) : string
project string
url string
return string

Get() public method

Performs a GET on the url with optional query paramaters and returns HttpWebResponse
public Get ( string project, string url, IEnumerable data ) : string
project string
url string
data IEnumerable
return string

GetProject() public method

Returns the MingleProject for the project Id on this MingleServer (instance)
public GetProject ( string projectId ) : MingleProject
projectId string
return MingleProject

GetProjectList() public method

Returns a Sorted list of project names and identifiers
public GetProjectList ( ) : string>.SortedList
return string>.SortedList

GetSecureStringFromString() public static method

Converts a String into a read-only SecureString
public static GetSecureStringFromString ( string value ) : SecureString
value string
return System.Security.SecureString

MingleServer() public method

Constructs a new MingleServer
public MingleServer ( string hostUrl, string loginName, SecureString password ) : System
hostUrl string Host url
loginName string Login name of the user
password System.Security.SecureString password
return System

MingleServer() public method

Constructs a new MingleServer
public MingleServer ( string hostUrl, string loginName, string password ) : System
hostUrl string Host url
loginName string Login name of the user
password string password
return System

Post() public method

Performs a POST on the Mingle url with optional post data and returns HttpWebResponse
public Post ( string project, string url, IEnumerable data ) : IResponse
project string
url string
data IEnumerable
return IResponse

Put() public method

Performs a PUT on the Mingle url with optional post data and returns IResponse
public Put ( string project, string url, IEnumerable data ) : IResponse
project string
url string
data IEnumerable
return IResponse