Click or drag to resize

TestHttpHandlerBase Class

A base class for implementing simple test pages as HTTP handlers.
Inheritance Hierarchy
SystemObject
  PDTec.IceNet.WebIceNetHttpHandler
    PDTec.IceNet.Web.UtilsTestHttpHandlerBase

Namespace:  PDTec.IceNet.Web.Utils
Assembly:  PDTec.IceNet.Web (in PDTec.IceNet.Web.dll) Version: 7.2.0.0 (7.2.7583.15464)
Syntax
C#
public abstract class TestHttpHandlerBase : IceNetHttpHandler

The TestHttpHandlerBase type exposes the following members.

Constructors
  NameDescription
Protected methodTestHttpHandlerBase
Initializes a new instance of the TestHttpHandlerBase class
Top
Properties
  NameDescription
Public propertyIceNetApplication Obsolete. (Inherited from IceNetHttpHandler.)
Public propertyIceNetHttpApplicationInstance (Inherited from IceNetHttpHandler.)
Public propertyIceNetUserName (Inherited from IceNetHttpHandler.)
Public propertyIsReusable
Indicates whether another request can reuse the HTTP handler instance. This property is used internally.
(Overrides IceNetHttpHandlerIsReusable.)
Public propertyRepository (Inherited from IceNetHttpHandler.)
Top
Methods
  NameDescription
Public methodCheckAuthorization(String, Int32) (Inherited from IceNetHttpHandler.)
Public methodCheckAuthorization(IFolder, Int32) (Inherited from IceNetHttpHandler.)
Public methodCheckAuthorization(IObject, Int32) (Inherited from IceNetHttpHandler.)
Public methodCheckAuthorization(IPackage, Int32) (Inherited from IceNetHttpHandler.)
Public methodCheckAuthorization(IParty, Int32) (Inherited from IceNetHttpHandler.)
Public methodCheckAuthorization(AuthorizedItemType, String, Int32) (Inherited from IceNetHttpHandler.)
Public methodCheckQualification(IFolder, String) (Inherited from IceNetHttpHandler.)
Public methodCheckQualification(IObject, String) (Inherited from IceNetHttpHandler.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHasAuthorization(String, Int32) (Inherited from IceNetHttpHandler.)
Public methodHasAuthorization(IFolder, Int32) (Inherited from IceNetHttpHandler.)
Public methodHasAuthorization(IObject, Int32) (Inherited from IceNetHttpHandler.)
Public methodHasAuthorization(IPackage, Int32) (Inherited from IceNetHttpHandler.)
Public methodHasAuthorization(IParty, Int32) (Inherited from IceNetHttpHandler.)
Public methodHasAuthorization(AuthorizedItemType, String, Int32) (Inherited from IceNetHttpHandler.)
Public methodHasQualification(IFolder, String) (Inherited from IceNetHttpHandler.)
Public methodHasQualification(IObject, String) (Inherited from IceNetHttpHandler.)
Protected methodHtml (Inherited from IceNetHttpHandler.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodProcessRequest
Implements processing of HTTP Web requests. This method is used internally.
(Overrides IceNetHttpHandlerProcessRequest(HttpContext).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples

This example shows how to implement a test page HTTP handler based on TestHttpHandlerBase. The following code is stored in a test.ashx file.

<%@ WebHandler Language="C#" Class="test" %>

using System;
using System.Collections;
using System.ComponentModel;
using System.Web;

using PDTec.IceNet.Web.Utils;

public class test : TestHttpHandlerBase
{
    [Action(UrlParam="env")]
    [Description("Lists the serverside environment.")]
    public void ActionEnv(HttpContext context) 
    {
        context.Response.ContentType = "text/plain";

        IDictionary dcEnv = Environment.GetEnvironmentVariables();
        foreach (string key in dcEnv.Keys)
        {
            context.Response.Write(string.Format("Env[{0}] = [{1}]\n", key, dcEnv[key]));      
        }
    }
}
See Also