Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-approve-and-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.3.0
uses: dependabot/fetch-metadata@v2.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ This sample supports NativeAOT and standard CoreCLR deployments. The native meth

### NativeAOT

Build the Native AOT binaries by running `dotnet publish -r <RID>` where `<RID>` is the RuntimeIdentifier for your OS, for example `win-x64`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register `Server.dll` with COM by running run `regsvr.exe .\OutputFiles\Server\Server.dll`. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `Server.dll`.
Build the Native AOT binaries by running `dotnet publish -r <RID>` where `<RID>` is the RuntimeIdentifier for your OS, for example `win-x64`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register `Server.dll` with COM by running run `regsvr32.exe .\OutputFiles\Server\Server.dll`. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `Server.dll`. When you are finished, unregister the server by running `regsvr32.exe /u .\OutputFiles\Server\Server.dll`.

### CoreCLR

Build the projects by running `dotnet publish`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register the native binary produced by DNNE, `ServerNE.dll` by running `regsvr.exe .\OutputFiles\Server\ServerNE.dll`. `ServerNE.dll` will start the .NET runtime and call the exported methods in the managed `Server.dll` which register the server with COM. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `ServerNE.dll`.
Build the projects by running `dotnet publish`. The projects will copy the binaries to the `OutputFiles\` directory. After publishing, use `regsvr32.exe` to register the native binary produced by DNNE, `ServerNE.dll`, by running `regsvr32.exe .\OutputFiles\Server\ServerNE.dll`. `ServerNE.dll` will start the .NET runtime and call the exported methods in the managed `Server.dll` which register the server with COM. Then, run the client application `.\OutputFiles\Client\Client.exe` and observe the output as it activates and uses a COM instance from `ServerNE.dll`. When you are finished, unregister the server by running `regsvr32.exe /u .\OutputFiles\Server\ServerNE.dll`.

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<!-- Uncomment to publish as a native executable -->
<!-- Uncomment to publish the project as a single native .dll -->
<!-- <PublishAOT>true</PublishAOT> -->
</PropertyGroup>

Expand All @@ -15,10 +15,17 @@
<EnableDynamicLoading>true</EnableDynamicLoading>
<!-- Use our own .def file to export the COM methods as PRIVATE. The Windows native linker (Link.exe) warns when exported COM methods are not PRIVATE. -->
<DnneWindowsExportsDef>Server.def</DnneWindowsExportsDef>
<!-- Copy DNNE .dll and header files to the output directory -->
<DnneAddGeneratedBinaryToProject>true</DnneAddGeneratedBinaryToProject>
</PropertyGroup>

<PropertyGroup Condition="'$(PublishAOT)' == 'true'">
<!-- Don't build the DNNE .dll when publishing a native .dll with Native AOT. -->
<DnneBuildExports>false</DnneBuildExports>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DNNE" Version="2.0.7" Condition="'$(PublishAOT)' != 'true'"/>
<PackageReference Include="DNNE" Version="2.0.7" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<!-- When publishing AOT, use our own .def file to export the COM methods as PRIVATE. The Windows native linker (Link.exe) warns when exported COM methods are not PRIVATE. -->
<LinkerArg Include="/DEF:&quot;Server.def&quot;" Condition="'$(PublishAOT)' == 'true'"/>
Expand Down
2 changes: 1 addition & 1 deletion core/nativeaot/NativeLibrary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ After the native library is built, the above C# `Add` method will be exported as
* Exported methods cannot be called from regular managed C# code, an exception will be thrown.
* Exported methods cannot use regular C# exception handling, they should return error codes instead.

The sample [source code](Class1.cs) demonstrates common techniques used to stay within these limitations.
The sample [source code](LibraryFunctions.cs) demonstrates common techniques used to stay within these limitations.

## Building static libraries

Expand Down
13 changes: 6 additions & 7 deletions orleans/BankAccount/AccountTransfer.Grains/AccountGrain.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using AccountTransfer.Interfaces;
using Orleans.Concurrency;
using Orleans.Transactions.Abstractions;

namespace AccountTransfer.Grains;

[GenerateSerializer, Immutable]
public record class Balance
[GenerateSerializer]
public class Balance
{
public int Value { get; init; } = 1_000;
[Id(0)]
public int Value { get; set; } = 1_000;
}

[Reentrant]
public sealed class AccountGrain : Grain, IAccountGrain
{
private readonly ITransactionalState<Balance> _balance;
Expand All @@ -21,7 +20,7 @@ public AccountGrain(

public Task Deposit(int amount) =>
_balance.PerformUpdate(
balance => balance with { Value = balance.Value + amount });
balance => balance.Value += amount);

public Task Withdraw(int amount) =>
_balance.PerformUpdate(balance =>
Expand All @@ -34,7 +33,7 @@ public Task Withdraw(int amount) =>
$" This account has {balance.Value} credits.");
}

return balance with { Value = balance.Value + amount };
balance.Value -= amount;
});

public Task<int> GetBalance() =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationIcon>App.ico</ApplicationIcon>
<Company>GrapeCity, Inc.</Company>
<Copyright>(c) GrapeCity, Inc. All rights reserved.</Copyright>
<Company>MESCIUS inc.</Company>
<Copyright>©️ MESCIUS inc. All rights reserved.</Copyright>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="App.ico" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="C1.Win" Version="6.0.20231.596" />
<PackageReference Include="C1.Win.FlexGrid" Version="6.0.20231.596" />
<PackageReference Include="C1.Win.Ribbon" Version="6.0.20231.596" />
<PackageReference Include="C1.Win.RulesManager" Version="6.0.20231.596" />
<PackageReference Include="C1.Win.SuperTooltip" Version="6.0.20231.596" />
<PackageReference Include="C1.Win.Themes" Version="6.0.20231.596" />
<PackageReference Include="C1.Win" Version="8.0.20242.700" />
<PackageReference Include="C1.Win.FlexGrid" Version="8.0.20242.700" />
<PackageReference Include="C1.Win.Ribbon" Version="8.0.20242.700" />
<PackageReference Include="C1.Win.RulesManager" Version="8.0.20242.700" />
<PackageReference Include="C1.Win.SuperTooltip" Version="8.0.20242.700" />
<PackageReference Include="C1.Win.Themes" Version="8.0.20242.700" />
</ItemGroup>

<ItemGroup>
Expand Down
12 changes: 6 additions & 6 deletions windowsforms/FlexGridShowcaseDemo/cs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ products:
page_type: sample
name: "Windows Forms Datagrid Sample: FlexGrid Showcase (C#)"
urlFragment: "winforms-flexgridshowcase-cs"
description: ".NET 6.0 Windows Forms application that demonstrates how to use GrapeCity FlexGrid"
description: ".NET 8.0 Windows Forms application that demonstrates how to use ComponentOne FlexGrid"
---

# FlexGrid Showcase Demo

This sample is a .NET 6.0 Windows Forms application that demonstrates how to use GrapeCity [`FlexGrid`](https://www.grapecity.com/componentone/winforms-ui-controls/flexgrid-winforms-data-grid), a Windows Forms Datagrid control.
This sample is a .NET 8.0 Windows Forms application that demonstrates how to use ComponentOne [`FlexGrid`](https://developer.mescius.com/componentone/winforms-ui-controls/flexgrid-winforms-data-grid), a Windows Forms Datagrid control.

The sample shows different operations with `FlexGrid`:

Expand All @@ -23,25 +23,25 @@ The sample shows different operations with `FlexGrid`:

![Screenshot with grouped data](../images/screenshot2.png)

There are several GrapeCity packages used in the sample:
There are several ComponentOne packages used in the sample:

* [`FlexGrid`](https://www.nuget.org/packages/C1.Win.FlexGrid)
* [`Ribbon`](https://www.nuget.org/packages/C1.Win.Ribbon)
* [`RulesManager`](https://www.nuget.org/packages/C1.Win.RulesManager)
* [`SuperTooltip`](https://www.nuget.org/packages/C1.Win.SuperTooltip)
* [`Themes`](https://www.nuget.org/packages/C1.Win.Themes)

For more code examples and tutorials see the [documentation](https://www.grapecity.com/componentone/docs/win/online-flexgrid/overview.html).
For more code examples and tutorials see the [documentation](https://developer.mescius.com/componentone/docs/win/online-flexgrid/overview.html).

Mentioned controls and packages require a valid license for runtime testing and distribution.

Also there is 30-day trial for evaluation purposes.

For more licensing information visit [www.grapecity.com/componentone/licensing](https://www.grapecity.com/componentone/licensing).
For more licensing information visit [developer.mescius.com/componentone/licensing](https://developer.mescius.com/componentone/licensing).

## Sample prerequisites

This sample is written in C# and targets .NET 6.0 running on Windows. It requires the [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0).
This sample is written in C# and targets .NET 8.0 running on Windows. It requires the [.NET 8.0 SDK](https://dotnet.microsoft.com/download/dotnet/8.0).

## Building the sample

Expand Down