Skip to content
main
Switch branches/tags
Code

Latest commit

#4294)

## Fixes #4293

## PR Type

What kind of change does this PR introduce?

Bugfix

## What is the current behavior?

The debounce extension was incorrectly updating the action in the ConcurrentList.

According to documentation the value passed in the `updateValueFactory` function, of the `AddOrUpdate` method, is the current value in the dictionary.

https://docs.microsoft.com/en-us/dotnet/api/system.collections.concurrent.concurrentdictionary-2.addorupdate?view=net-5.0

![image](https://user-images.githubusercontent.com/29243277/135733394-f7c4d682-9c24-45cd-af4d-69721a7c6383.png)

Therefore the current behavior is maintaining the old action and not updating with the new passed action.

```csharp
_debounceInstances.AddOrUpdate(timer, action, (k, v) => v);
```

## What is the new behavior?

Changed so that the action in the `_ debounceInstances` Dictionary is updated with the latest version.

## PR Checklist

Please check if your PR fulfills the following requirements: <!-- and remove the ones that are not applicable to the current PR -->

- [x] Tested code with current [supported SDKs](../#supported)
- [x] Contains **NO** breaking changes
- [x]  Tests for the changes have been added
- [x]  Header has been added to all new source files (run build/UpdateHeaders.bat)

## Other information

PS: The debuonce extension is referenced in the `CanvasPathGeometryPage` class (although this changes does not seem to break it).
84adf91

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Sep 16, 2021

🧰 Windows Community Toolkit

The Windows Community Toolkit is a collection of helper functions, custom controls, and app services. It simplifies and demonstrates common developer patterns when building experiences for Windows 10.

Target Branch Status Recommended package version
Production rel/7.0.2 Build Status NuGet
Previews main Build Status DevOps

πŸ™Œ Getting Started

Please read the Getting Started with the Windows Community Toolkit page for more detailed information about using the toolkit.

πŸ“ƒ Documentation

All documentation for the toolkit is hosted on Microsoft Docs. All API documentation can be found at the .NET API Browser.

πŸ“± Windows Community Toolkit Sample App

Want to see the toolkit in action before jumping into the code? Download and play with the Windows Community Toolkit Sample App from the Store.

πŸš€ Contribution

Do you want to contribute? Check out our Windows Community Toolkit Wiki page to learn more about contribution and guidelines.

πŸ“¦ NuGet Packages

NuGet is a standard package manager for .NET applications which is built into Visual Studio. When you open solution in Visual Studio, choose the Tools menu > NuGet Package Manager > Manage NuGet packages for solution… Enter one of the package names mentioned in Windows Community Toolkit NuGet Packages table to search for it online.

πŸ“« Features

The Features list refers to all the currently available features that can be found in the Windows Community Toolkit. Most features should work with the October 2018 Update (1809) SDK 17763 and above; however, refer to specific documentation on each feature for more information.

πŸ’  Principles

  1. The toolkit will be kept simple.
  2. As soon as a comparable feature is available in the Windows SDK for Windows 10, it will be marked as deprecated.
  3. All features will be supported for two Windows SDK for Windows 10 release cycles or until another principle supersedes it.

🌍 Roadmap

Read what we plan for next iterations, and feel free to ask questions.

Check out our Preview Packages Wiki Page to learn more about updating your NuGet sources in Visual Studio, then you can also get pre-release packages of upcoming versions to try.

πŸ“„ Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

🏒 .NET Foundation

This project is supported by the .NET Foundation.

About

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building UWP and .NET apps for Windows 10. The toolkit is part of the .NET Foundation.

Topics

Resources

License

Packages

No packages published

Languages