services and console apps...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel Bass

    #1

    services and console apps...

    Forgive me if this is in the wrong place, I couldn't find a suitable .net
    services newsgroup to post in.

    I read in services that they are designed to have no UI, but I'd like to
    create one that can be run from the command line, and in doing so would act
    as a console application for debugging purposes.

    Is this concept legit, feasible, possible?
    How would i go about approaching it?

    Thanks for your time.
    Dan.


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: services and console apps...

    Hi Daniel,
    [color=blue]
    > I read in services that they are designed to have no UI, but I'd like to
    > create one that can be run from the command line, and in doing so would[/color]
    act[color=blue]
    > as a console application for debugging purposes.[/color]

    This is absolutely fine approach, if not even recommended one. You analyze
    the command line arguments and start as a console application or as a
    service depending on them.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "Daniel Bass" <I'm really @ sick of spam> wrote in message
    news:uWgq0KBsDH A.3436@tk2msftn gp13.phx.gbl...[color=blue]
    > Forgive me if this is in the wrong place, I couldn't find a suitable .net
    > services newsgroup to post in.
    >
    > I read in services that they are designed to have no UI, but I'd like to
    > create one that can be run from the command line, and in doing so would[/color]
    act[color=blue]
    > as a console application for debugging purposes.
    >
    > Is this concept legit, feasible, possible?
    > How would i go about approaching it?
    >
    > Thanks for your time.
    > Dan.
    >
    >[/color]

    Comment

    • Daniel Bass

      #3
      Re: services and console apps...

      Thanks for your reply.

      I've created all the application code as a .Net class library, which exposes
      Run, Stop, and a Refresh command which pauses the service while the
      configuration is changed.

      Is the idea to have the OnStart() OnEnd methods call these exposed
      functions, and then to create a console app which calls the same functions
      so that there's an output window for debug log data?

      Or is the .Net approach different to this?

      Thanks! =o)
      Dan.

      "Dmitriy Lapshin [C# / .NET MVP]" <x-code@no-spam-please.hotpop.c om> wrote
      in message news:Ol4EQsBsDH A.2224@TK2MSFTN GP09.phx.gbl...
      Hi Daniel,
      [color=blue]
      > I read in services that they are designed to have no UI, but I'd like to
      > create one that can be run from the command line, and in doing so would[/color]
      act[color=blue]
      > as a console application for debugging purposes.[/color]

      This is absolutely fine approach, if not even recommended one. You analyze
      the command line arguments and start as a console application or as a
      service depending on them.

      --
      Dmitriy Lapshin [C# / .NET MVP]
      X-Unity Test Studio

      Bring the power of unit testing to VS .NET IDE

      "Daniel Bass" <I'm really @ sick of spam> wrote in message
      news:uWgq0KBsDH A.3436@tk2msftn gp13.phx.gbl...[color=blue]
      > Forgive me if this is in the wrong place, I couldn't find a suitable .net
      > services newsgroup to post in.
      >
      > I read in services that they are designed to have no UI, but I'd like to
      > create one that can be run from the command line, and in doing so would[/color]
      act[color=blue]
      > as a console application for debugging purposes.
      >
      > Is this concept legit, feasible, possible?
      > How would i go about approaching it?
      >
      > Thanks for your time.
      > Dan.
      >
      >[/color]


      Comment

      Working...