C# Class APIWrapper, 3D-Repository

Overrides some of the functionality of the API_BASE to make compatible with serving from the web project Speciffically, skips HTTP Basic auth, and assumes that the website has delt with authorization. Takes a username in the constructor, in order to check permissions for later operations
Inheritance: vwar.service.host._3DRAPI_Imp
Mostrar archivo Open project: adlnet/3D-Repository Class Usage Examples

Public Methods

Method Description
APIWrapper ( string inusername, HttpContext incontext ) : System

constructor

DoValidate ( Security type, vwarDAL co ) : bool

Overrides API base class validate, uses website user rather than HTTP Basic

GetUsername ( ) : string
SetResponseHeaders ( string type, int length, string disposition ) : void

Writes the headers for this transaction. Overrides base, using current context rather than WebOperationContext NOTE: For some reason this fails under the build in dev server, but runs correctly under IIS. Requires App pool to be in integrated mode

Method Details

APIWrapper() public method

constructor
public APIWrapper ( string inusername, HttpContext incontext ) : System
inusername string The username of the currently authenticated user
incontext HttpContext The HTTP Context for this operation, used to write headers
return System

DoValidate() public method

Overrides API base class validate, uses website user rather than HTTP Basic
public DoValidate ( Security type, vwarDAL co ) : bool
type Security The transaction type to validate
co vwarDAL the content object to validate the operation on
return bool

GetUsername() public method

public GetUsername ( ) : string
return string

SetResponseHeaders() public method

Writes the headers for this transaction. Overrides base, using current context rather than WebOperationContext NOTE: For some reason this fails under the build in dev server, but runs correctly under IIS. Requires App pool to be in integrated mode
public SetResponseHeaders ( string type, int length, string disposition ) : void
type string Content Type
length int Content Lenght
disposition string Content Disposition
return void