Skip to content

Commit

Permalink
[MDAPI-120] [.NET] Current target does not support the CPU features t…
Browse files Browse the repository at this point in the history
…hat are required by the image (#76)
  • Loading branch information
stdcion authored Aug 5, 2024
1 parent d6eab51 commit 2e74d77
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,42 @@ Then add the `DxFeed.Graal.Net` package to your project using the NuGet package
> If you are using .NET Framework and building for platform target `AnyCPU`, be sure to uncheck `Prefer 32-bit` in
> `Properties->Build `for the project. We only support 64-bit builds.
#### Using VSCode:

1. Create a new project: `dotnet new console --framework net6.0 --use-program-main`
2. Add the DxFeed.Graal.Net package to your project: `dotnet add package DxFeed.Graal.Net`
3. Copy and paste the following code into the `Program.cs` file:

```csharp
using DxFeed.Graal.Net.Api;
using DxFeed.Graal.Net.Events.Market;

namespace sandbox;

internal abstract class Program
{
public static async Task Main(string[] args)
{
var address = "demo.dxfeed.com:7300";
var symbol = "AAPL";
var sub = DXEndpoint.GetInstance().Connect(address).GetFeed().CreateSubscription(typeof(Quote));
sub.AddEventListener(events =>
{
foreach (var quote in events)
{
Console.WriteLine(quote);
}
});
sub.AddSymbols(symbol);
await Task.Delay(Timeout.Infinite);
}
}
```

4. Run project: `dotnet run`
5. Add C# support to VSCode by following the instructions [here](https://code.visualstudio.com/docs/languages/dotnet)
6. You can now open this directory in VSCode

## Usage

### How to connect to QD endpoint
Expand Down
2 changes: 2 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* [MDAPI-120] [.NET] Current target does not support the CPU features that are required by the image

## Version 2.4.0

* [MDAPI-118] [.NET] IndexedTxModel does not work with Regional and Composite sources
Expand Down
2 changes: 1 addition & 1 deletion src/DxFeed.Graal.Net/DxFeed.Graal.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0"/>
<PackageReference Include="System.Collections.Immutable" Version="8.0.0"/>
<PackageReference Include="DxFeed.Graal.Native" Version="1.1.22" />
<PackageReference Include="DxFeed.Graal.Native" Version="1.1.23" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 2e74d77

Please sign in to comment.