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 6672329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:29:43+00:00 2026-05-26T03:29:43+00:00

Can somebody familiar with microsoft robotics studio please explain why the handler operations are

  • 0

Can somebody familiar with microsoft robotics studio please explain why the handler operations are virtual and some are set as non-virtual ?

[ServiceHandler(ServiceHandlerBehavior.Concurrent)]
public virtual IEnumerator<ITask> GetHandler(Get get)
{
    get.ResponsePort.Post(_state);
    yield break;
}

vs

[ServiceHandler(ServiceHandlerBehavior.Concurrent)]
public IEnumerator<ITask> SubscribeHandler(Subscribe subscribe)
{
    SubscribeRequestType request = subscribe.Body;
    LogInfo("Subscribe request from: " + request.Subscriber);

    // Use the Subscription Manager to handle the subscribers
    yield return Arbiter.Choice(
        SubscribeHelper(_submgrPort, request, subscribe.ResponsePort),
        delegate(SuccessResult success)
        {
            // Send a notification on successful subscription so that the
            // subscriber can initialize its own state
            base.SendNotificationToTarget<Replace>(request.Subscriber, _submgrPort, _state);
        },
        delegate(Exception e)
        {
            LogError(null, "Subscribe failed", e);
        }
    );

    yield break;
}

Thanks in advance.

  • 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-26T03:29:43+00:00Added an answer on May 26, 2026 at 3:29 am

    Virtual handlers are used in classes you expect to use as base for other classes. Handlers that are not virtual are either declared as overrides in derived classes, or in classes that will not be derived (as is often the case in sample code).

    Refer to the following articles:

    http://msdn.microsoft.com/en-us/library/9fkccyh4(v=VS.100).aspx

    What are Virtual Methods?

    C# virtual methods question

    WHy should virtual methods be explicitly overridden in C#?

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

Sidebar

Related Questions

Can somebody please explain how to use macros in x86 assembly coding
Can somebody please explain what does this warning mean: undefined reference to 'WinMain@16' ?
Can somebody please explain why a while statement like while (ch != '\n' ||
Can somebody explain the following code please? #if 1 // loop type #define FOR_IS_FASTER
Can somebody please explain me the difference between the terms high memory and high
Can somebody please explain this to me: I have a label and I want
Can somebody please explain to me what an activity, a context and an intent
Can somebody please give me an example of a unidirectional @OneToOne primary-key mapping in
Can somebody explain to me why the following works: template<class T> class MyTemplateClass {
can somebody recommend me good affordable IP KVM? Like Adder. Or some articles evaluating

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.