﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.ru/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">Custom MessageAdapter</title>
  <id>~/topic/12026/custom-messageadapter/</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-06-11T07:05:43Z</updated>
  <logo>https://stocksharp.ru/images/logo.png</logo>
  <link href="https://stocksharp.ru/handlers/atom.ashx?category=topic&amp;id=12026" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.ru/posts/m/50921/</id>
    <title type="text">Hello, Thank you for the response. The current one only provides market data, does this connector en...</title>
    <published>2020-08-11T16:48:07Z</published>
    <updated>2020-08-11T18:27:36Z</updated>
    <author>
      <name>Rob</name>
      <uri>https://stocksharp.ru/users/130250/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you for the response. The current one only provides market data, does this connector enable account transactions trading? If so, if you could publish it, I can use the .NET 4.8 version while I work through the course and will then try to finish a dotcore version later when I move to a cloud Linux server for 24/7 strategy execution.&lt;/p&gt;
&lt;p&gt;Thanks again!
-Rob&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/50914/</id>
    <title type="text">Hello We have GainCapital connector and it is already passed the certification. Unfortunately, it is...</title>
    <published>2020-08-11T13:58:55Z</published>
    <updated>2020-08-11T13:58:55Z</updated>
    <author>
      <name>Support</name>
      <uri>https://stocksharp.ru/users/97869/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;We have GainCapital connector and it is already passed the certification. Unfortunately, it is not compatible with .NET Core and not available on cross-platform mode. We can publish it for .NET 4.8 version if it necessary for you.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
  <entry>
    <id>https://stocksharp.ru/posts/m/50903/</id>
    <title type="text">I&amp;apos;m in the process of creating a custom adapter. After adding the adapter to the connector and attem...</title>
    <published>2020-08-11T06:01:01Z</published>
    <updated>2020-08-11T11:39:32Z</updated>
    <author>
      <name>Rob</name>
      <uri>https://stocksharp.ru/users/130250/</uri>
      <email>info@stocksharp.ru</email>
    </author>
    <content type="html">&lt;p&gt;I'm in the process of creating a custom adapter.
After adding the adapter to the connector and attempting to configure:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; 
    var gc = new GainCapitalMessageAdapter(_connector.TransactionIdGenerator);
    _connector.Adapter.InnerAdapters.Add(gc);

      if (_connector.Configure(this))
        new XmlSerializer&amp;lt;SettingsStorage&amp;gt;().Serialize(_connector.Save(), _connectFile);

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The following error is produced:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
  Message=Description of connection GainCapital.GainCapitalMessageAdapter not found. (Parameter 'adapter')

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If added the following attributes to the custom MessageAdapter:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
  [CategoryLoc(&amp;quot;Forex&amp;quot;)]
  [DescriptionLoc(&amp;quot;Str1770&amp;quot;, LocalizedStrings.GainCapitalKey)]
  [DisplayNameLoc(LocalizedStrings.GainCapitalKey)]

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also, while Unit Testing, the connect event is not firing but sending the ConnectMessage works:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
      var gc = new GainCapitalMessageAdapter(_connector.TransactionIdGenerator);
      _connector.Adapter.InnerAdapters.Add(gc);    
      _connector.Connect();  //-- does not work
      gc.SendInMessage(new ConnectMessage { Adapter = gc });  //-- works

&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If this is included in a lesson, let me know. Otherwise, any advice is appreciated.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
</content>
    <rights type="html">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  </entry>
</feed>