Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6733153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:44:06+00:00 2026-05-26T10:44:06+00:00

When writing a custom IPipelineContributor it isn’t clear how to get a reference to

  • 0

When writing a custom IPipelineContributor it isn’t clear how to get a reference to the selected Handler. The purpose of the custom contributor is to dispose any handlers that implement IDisposable once they have returned a result.

Given the following code sample:

public class DisposerPipelineContributor : IPipelineContributor
{
    public void Initialize(IPipeline pipelineRunner)
    {
        pipelineRunner.Notify(MyMethod).After<KnownStages.IOperationExecution>();
    }

    PipelineContinuation MyMethod(ICommunicationContext arg)
    {
        return PipelineContinuation.Continue;
    }
}

The ICommunicationContext gives us access to OpenRasta’s own type system and reveals the type of selected handler: [OpenRasta.TypeSystem.ReflectionBased.ReflectionBasedType] = {CLR Type: MySelectedHandler}. However, it isn’t clear how to get the instance of the handler that was actually used to satisfy the request.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:44:07+00:00Added an answer on May 26, 2026 at 10:44 am

    Iain,

    first tings first, if you want features such as disposing of objects, you should use your own IoC container, most of those frameworks implement that functionality.

    We’re going to add disposing to the contract we have with containers in the next major version, as it is now more or less ok to do this, it wasn’t when we built 2.0.

    If you want to call IDisposable on a handler yourself and you cannot switch to a full-fledged IoC container, you’ll find the handler instance in ICommunicationContext.PipelineData.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

while writing a custom attribute in C# i was wondering if there are any
When writing a custom channel how can I get the name of the service
I am writing a custom session handler in PHP and trying to make the
I am seeing a lot of help writing custom jQuery validation for any type
I am constantly writing custom WebParts but after I deploy them, they always get
Aside from writing custom code are there any existing features in .NET which allows
I'm aware of writing custom attributes that decorate a method and get evaluated before
Recently I've decided to get some knowledge about writing custom tags. And there is
When it comes to writing custom MySQL database-driven PHP session management for a VERY
When writing a custom server, what are the best practices or techniques to determine

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.