C# Namespace

Jan 22, 2015 at 3:50 PM
Edited Jan 22, 2015 at 3:52 PM
In this discussion: https://bemu.codeplex.com/discussions/535926 you mention using conditional compilation to switch between the emulator and the real API. I don't think this is possible as you use the same namespaces as the real API.

Just a thought but if you changed the namespace we could do something like this in C#, which would be handy:
#if DEBUG
// Emulator
using Bloomberglp.BlpapiEmu;
#else
// Real thing
using Bloomberglp.Blpapi;
#endif
P.S Thanks for this project, be a nightmare without it!
Coordinator
Jan 27, 2015 at 1:19 PM
John,

Please see the discussion here: https://bemu.codeplex.com/discussions/544608

I've moved away from this type of preprocessor use in the C# version. Another user had a large number of files that would need to be renamed in order to switch between the actual BB API and my BEmu. This user suggested that if I renamed the BEmu namespaces to be the same as the actual BB API namespaces, this switching process would be more painless. A user would simply have to replace a DLL file.

This should help explain why I use the same namespace. Thanks for your interest in my project.

-Jordan
Jan 27, 2015 at 2:34 PM
Edited Jan 27, 2015 at 2:34 PM
Hi Jordan,

Thanks for looking into it, it's no biggie and I can see that there are two sides to the argument.

Regards,
LJ