C# Getmyorders() Returns Null

darkrealm

Active Member
Hi All,

I'm trying to read my own Market Orders but for some reason Me.GetMyOrders(); always returns null.

I even tried one of the example snippets I found:

Code:
EVE.ISXEVE.EVE eve = new EVE.ISXEVE.EVE();
			Me me = new Me();
			List<MyOrder> OrdersList = new List<MyOrder>();
			List<String> SellOrderItemNames = new List<string>();
			List<String> BuyOrderItemNames = new List<string>();
			using (new FrameLock(true))
			{
				eve.ClearMarketOrderCache();
			}
			Thread.Sleep(5000);
			using (new FrameLock(true))
			{
				me.UpdateMyOrders();
			}
			Thread.Sleep(5000);
			using (new FrameLock(true))
			{
				OrdersList = me.GetMyOrders();
			}
			if (OrdersList != null)
			{
				MessageBox.Show(OrdersList.Count.ToString());
			}
			else
			{
				MessageBox.Show("OrdersList is null");
			}
For some reason the message box always says its null.
Anybody have any idea?
 

Amadeus

The Maestro
Staff member
If you can duplicate the bug in lavishscript, and post that snippet, I'll look into it. But, I don't really support .NET as I just don't have enough control over how innerspace handles it. The wrapper, in theory, just translates the lavishscript to .NET ...but, that's really all I'm providing. If it's broken beyond that, then it's nothing I can fix.

By the way, the ISXEVE .NET wrapper is on github (it's open source), so you could always double-check there for any possible bugs, etc.
 
Ok, I manage to solve the issue but I don't really understand why.

Instead of using Me me = new Me();

use Extension Ext = new Extension(); and then replace me.XXXXX with Ext.Me.XXXXXXX

and it will work.

As I said, I don't really understand why. If we look at the Extension class, all it does is return the relevant new instance. For example Ext.Me is in fact return a new Me instance, I can't really see any difference between this Ext.Me. and new Me().....Amadeus, may be you could help me understand this?
 
Top Bottom