I'm in the process of creating a custom adapter.
After adding the adapter to the connector and attempting to configure:
Code
var gc = new GainCapitalMessageAdapter(_connector.TransactionIdGenerator);
_connector.Adapter.InnerAdapters.Add(gc);
if (_connector.Configure(this))
new XmlSerializer<SettingsStorage>().Serialize(_connector.Save(), _connectFile);
The following error is produced:
Code
Message=Description of connection GainCapital.GainCapitalMessageAdapter not found. (Parameter 'adapter')
If added the following attributes to the custom MessageAdapter:
Code
[CategoryLoc("Forex")]
[DescriptionLoc("Str1770", LocalizedStrings.GainCapitalKey)]
[DisplayNameLoc(LocalizedStrings.GainCapitalKey)]
Also, while Unit Testing, the connect event is not firing but sending the ConnectMessage works:
Code
var gc = new GainCapitalMessageAdapter(_connector.TransactionIdGenerator);
_connector.Adapter.InnerAdapters.Add(gc);
_connector.Connect(); //-- does not work
gc.SendInMessage(new ConnectMessage { Adapter = gc }); //-- works
If this is included in a lesson, let me know. Otherwise, any advice is appreciated.
Thank you.