Skip to content

Commit c6a0b95

Browse files
committed
docs: Update migration and remove MIGRATION.md
1 parent 720d419 commit c6a0b95

File tree

3 files changed

+35
-109
lines changed

3 files changed

+35
-109
lines changed

MIGRATION.md

Lines changed: 0 additions & 107 deletions
This file was deleted.

bunit.slnx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
</Folder>
1212
<Folder Name="/.text/">
1313
<File Path="CHANGELOG.md" />
14-
<File Path="MIGRATION.md" />
1514
<File Path="README.md" />
1615
</Folder>
1716
<Folder Name="/.workflows/">

docs/site/docs/migrations/1to2.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,38 @@ cut.Find("button").Click(detail: 2, ctrlKey: true);
7878

7979
The last one was a method with all parameters of `MouseEventArgs` as optional parameters. This method has been removed in favor of using the `MouseEventArgs` directly.
8080

81-
Also `ClickAsync` - to align with its synchronous counterpart - doesn't take `MouseEventArgs` as mandatory parameter anymore. If not set, a default instance will be created.
81+
Also `ClickAsync` - to align with its synchronous counterpart - doesn't take `MouseEventArgs` as mandatory parameter anymore. If not set, a default instance will be created.
82+
83+
## `DisposeComponents` is now async and called `DisposeComponentsAsync`
84+
85+
The `DisposeComponents` method has been renamed to `DisposeComponentsAsync` and is now asynchronous. To migrate, simply rename the method and add `await`:
86+
87+
```diff
88+
- DisposeComponents();
89+
+ await DisposeComponentsAsync();
90+
```
91+
92+
## The `ComponentParameterFactory` and `ComponentParameter` has been removed
93+
The `ComponentParameterFactory` class has been removed (and therefore the usage of `ComponentParameter`).
94+
Instead, use the `Render` method (and its overloads) to pass parameters to components.
95+
96+
## `IRefreshableElementCollection` was removed
97+
The `IRefreshableElementCollection` interface has been removed. With that, the overload in `FindAll` doesn't accept a `bool refresh` parameter anymore. Instead, simply call `FindAll` again to get a refreshed collection.
98+
99+
```csharp
100+
var items = cut.FindAll("li", refresh: true);
101+
items.Count.ShouldBe(3);
102+
cut.Find("button").Click(); // This changes the list items
103+
104+
items.Count.ShouldBe(4);
105+
```
106+
107+
Should be changed to:
108+
109+
```csharp
110+
var items = cut.FindAll("li");
111+
items.Count.ShouldBe(3);
112+
cut.Find("button").Click(); // This changes the list items
113+
items = cut.FindAll("li"); // Call FindAll again to refresh
114+
items.Count.ShouldBe(4);
115+
```

0 commit comments

Comments
 (0)