For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
5 1 0 3

using dynamic class resulting cannot convert from .InstrumentIdentifierList to SubjectIdentifierList

I'm using reflection to use the list of objects of extrationrequest but having issue setting the instrument list when using dynamic class.

for example - using the code

dynamic obj = new CommoditiesCorrectionsHistoryExtractionRequest();

this will work good

extractionRequest.IdentifierList = InstrumentIdentifierList.Create(

new[]

{

new InstrumentIdentifier { Identifier = "191216100", IdentifierType = IdentifierType.Cusip,UserDefinedIdentifier = "AA" }

}, null, false);


this way, error was raised

Type[] typelist = GetTypesInNamespace(myAssembly, "ThomsonReuters.Dss.Api.Extractions.ExtractionRequests");

Type tt = typelist[0] //CommoditiesCorrectionsHistoryExtractionRequest

dynamic obj = Activator.CreateInstance(tt);

error will be raised

extractionRequest.IdentifierList = InstrumentIdentifierList.Create(

new[]

{

new InstrumentIdentifier { Identifier = "191216100", IdentifierType = IdentifierType.Cusip,UserDefinedIdentifier = "AA" }

}, null, false);

dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
5 1 0 3

the issue was resolved by getting the correct assembly execution path -

Assembly.GetExecutingAssembly().Location

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea