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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:40:06+00:00 2026-05-30T02:40:06+00:00

Of curiosity, I would like to know, how anyone would implement a custom mongo

  • 0

Of curiosity, I would like to know, how anyone would implement a custom mongo shell in .Net. allowing the user to do the exact same things as you can in the mongo shell, but implemented in .Net with the option of enhancing the user experience.

I have found this thread which tells me, that I cannot use the official 10gen driver to archieve this: Using MongoDB shell commands on MongoDB 10Gen's driver

What is the appropriate way of doing this? I guess the ultimate custom solution would be to convert the source code for the mongo shell into .Net by hand?

Any suggestions are very much appreciated as I have been googling for answers in quite some time. Thankyou 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-30T02:40:08+00:00Added an answer on May 30, 2026 at 2:40 am

    The best answer to your request to “do the exact same things as you can in the mongo shell” depends on what you are thinking of as “exact same things”.

    At the lowest level, the mongo shell just sends messages using the documented “wire protocol”, which is a bit of wrapping around BSON data, the documented binary version/extension of JSON. So, at a low level (by sending messages over TCP/IP) you can do anything you want.

    At a slightly higher level, the mongo shell includes a JavaScript “engine”, which in currently released versions is SpiderMonkey version 1.7 from the Mozilla Foundation, also open source. A future version will use Google’s V8 JavaScript engine, again open source and available for download. The shell provides some native code functions for those engines to use: see engine_spidermonkey.cpp and engine_v8.cpp in the MongoDB source code.

    At a still higher level, the shell includes some “helper functions” written in JavaScript that simplify typing some commands. You can see these functions from the shell’s prompt by typing the name of a function call and leaving off the parentheses: typing “sleep(500)” will sleep for 500 milliseconds, typing “sleep” will show that “sleep” calls “nativeHelper.apply(sleep_, arguments)”. All of these helper functions are in .js files in the “shell” directory in the MongoDB source code, which you can download.

    Beyond that, there is a command line loop that provides command line editing and recall, code for processing arguments on the invoking command line and code to read and write BSON-formatted data for communication with the server, very similar to what the C# driver provides.

    So, you can use any of this code that is helpful to you or write similar or different code yourself. There isn’t really any magic hidden away, it’s all open source.

    If you know what you want to accomplish and get stuck on the details of how to do something, ask your specific question and hopefully you’ll get less general answers than this one.

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

Sidebar

Related Questions

Out of curiosity i would like to know how to best implement a class
i know how to write MSIL code but out of curiosity i would like
Mostly out of curiosity, I would like to know if there are any edge
I'm using sqlite3 and would like to know, if there is a fast way
Hello everybody. I would like to know how to download and save a file
I would like to build my own custom DI framework based on Java annotations
I'm fascinated by the CAPTCHA system used on SO... I would like to know
Apparently, the following is the valid syntax: b'The string' I would like to know:
Just because of curiosity, I'd like to get to know better, how the Internet
Just out of curiosity: I know I can tell the compiler if I want

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.