Hello everybody,
I saw here :
that the method GetAllInstruments, of object InstrumentList, should allow to get the list of instruments associated with an InstrumentList.
So, I typed this code :
instrumentList = new InstrumentList { Name = strInstrumentListName }; List<InstrumentIdentifier> lii = instrumentList.GetAllInstruments();
But, I then obtained this exception at compile time :
Error CS1061 'InstrumentList' does not contain a definition for 'GetAllInstruments' and no extension method 'GetAllInstruments' accepting a first argument of type 'InstrumentList' could be found (are you missing a using directive or an assembly reference?)
Where is the problem ? Does the documentation refer to another context ? Am I supposed to declare another reference ?
Or is it better to do it like this ?
var fromInstrumentList = extractionsContext.InstrumentListOperations.GetAllInstruments(listId);
Hello @Hubert CANEVET,
In the usage as you describe first, your call is missing the argument, listId:
GetAllInstruments(string listId)
As per our example in .Net REST Example Application, please pass listId
var instruments = extractionsContext.InstrumentListOperations.GetAllInstruments(instrumentList.ListId);
And if prior to this the list that is referenced has been created, and appended with instruments, this call should return all instruments.
OK thank you, that is what I see in the example application.
Maybe the documentation can be seen a little ambiguous about that.