Maui/.editorconfig

145 строки
5.6 KiB
INI
Исходник Постоянная ссылка Обычный вид История

# Suppress: EC112
# top-most EditorConfig file
root = true
# Default settings:
# A newline ending every file
# Use 4 spaces as indentation
[*]
insert_final_newline = false
indent_style = space
indent_size = 4
# Code files
[*.{cs,csx,vb,vbx}]
indent_style = tab
indent_size = 4
# Code files
[*.sln]
indent_size = 4
# Xml project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# Xml config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
# JSON files
[*.json]
indent_size = 2
# XML files
[*.xml]
indent_size = 2
[*.cs]
# Organize usings
dotnet_sort_system_directives_first = true
# IDE0160: Use file scoped namespace
2021-10-20 01:16:17 +03:00
csharp_style_namespace_declarations = file_scoped:error
# CS4014: Because this call is not awaited, execution of the current method continues before the call is completed
dotnet_diagnostic.CS4014.severity = error
Add TouchBehavior (#1673) * init * code style * android bits * code style * dumb sample to test * added a11y and initialization * code style * improved sample * code style * protect against NRE * windows implementation * code style * Added comments to all public methods to enable builds without errors * Missed some docs required for building * Touch effect maui (#1326) * Fixed some issues in Android implementation * Added iOS implementation for TouchBehavior * Reformatted code * Removed duplicated extension methods --------- Co-authored-by: Christian Rendl <cr@mutor.at> * Bringing touch-effect up to date with main (#1383) * Popup v6 windows (#1086) Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com> * ♻️ [Housekeeping] Fixed GravatarImageSourceTests.TestDefaultStream (#1335) * [housekeeping] Automated PR to fix formatting errors (#1327) * Fix popup margin on iOS (#1329) * Bump NuGet.Protocol from 6.6.1 to 6.7.0 in /samples (#1330) * Use fully qualified namespace for Color reference in TextToColorGenerator (#1332) * Use fully qualified namespace for Color reference in TextToColorGenerator to prevent collisions This change should prevent "ambiguous reference" error to occur when other packages are included in a MAUI project that provide their own Color objects * added global prefix to be safer --------- Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> * Code cleanup and preparation for the next release (breaking changes) (#1324) * Code cleanup and preparation for .net 8 * Update CompareConverter.shared.cs * Revert global.json * More CleanUps * Remove redundant TrySetCanceled and rely on speech recognition result * Update Formatting --------- Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> * Fix Gestures on Popup on ios (#1342) * Fix Gestures on Popup on ios * don't query type cast directly * Code for AddLogicalChild (.NET 8) * reduce changes * setting the parent fixes the BindingContext of the view * Revert "setting the parent fixes the BindingContext of the view" This reverts commit 0a64b56ca51948bd0596408a14cfadf60c3dde41. * reduce changes * simplify code * fixing build * assigned Element to contentPage.Parent --------- Co-authored-by: pedrojesus <pedrojesus.cefet@gmail.com> * `global.json`: Change `"rollForward": "latestMajor",` -> `"rollForward": "latestFeature"`. (#1338) Update global.json * Bump Microsoft.NET.Test.Sdk from 17.7.0 to 17.7.1 in /samples (#1348) Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.7.0 to 17.7.1. - [Release notes](https://github.com/microsoft/vstest/releases) - [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md) - [Commits](https://github.com/microsoft/vstest/compare/v17.7.0...v17.7.1) --- updated-dependencies: - dependency-name: Microsoft.NET.Test.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * 632 bug avatar view clipping on windows (#1344) * Resolves issue on Windows where the splash screen icon is not found. * Resolves an issue with the 'Ratings' sample for AvatarView. * Spaces and not tabs * Spaces and not tabs * Changed MauiImage to point to Images folder. * Changed splash for Windows to be Resize=False * Typo in name of MauiImage * Try to prevent locking. * Bump Microsoft.CodeAnalysis from 4.6.0 to 4.7.0 in /samples (#1355) * Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.6.0 to 4.7.0 in /samples (#1357) * Bump FluentAssertions from 6.11.0 to 6.12.0 in /samples (#1365) * fix IconTintColorBehavior for Windows (#1370) fix IconTintColorBehavior for windows Co-authored-by: Oleksii <sokol@managed-code.com> * Add `MemoryAnalyzer` roslyn analyzer (#1371) * Add NuGet Package + Update `WarningsAsErrors` * Fix MA0002 * Fix `MauiDrawingView` * Fix `MauiPopup` * Fix Naming * return `null` for nullable references * Use Ternary Operator * `dotnet format` * iOS popup fix with Shell or TabbedPage (#1343) * Fix Issue #1256 Better fix * Fixed Popup on Multiple Level Pages (#822) --------- Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> * [housekeeping] Automated PR to fix formatting errors (#1373) * Bump Microsoft.NET.Test.Sdk from 17.7.1 to 17.7.2 in /samples (#1378) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: cat0363 <125236133+cat0363@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Wolf <132034537+wolfgang-ironsoftware@users.noreply.github.com> Co-authored-by: Thomas Stocker <thomas.stocker@gmail.com> Co-authored-by: George Leithead <github@internetwideworld.com> Co-authored-by: Sokol2001 <53799292+Sokol2001@users.noreply.github.com> Co-authored-by: Oleksii <sokol@managed-code.com> Co-authored-by: Andrey Onishchenko <100789522+cucumber-sp@users.noreply.github.com> * Added MacOS and brought across the sample page style from XCT * Added TouchBehavior Unit Tests * Fixed issue with hover * Fix Rebase Issues Git didnt pick up all the changes and the rebase left some files in a wierd way. I have restored broken files to their state on main * Manual fixes for rebase collisions Some changes from the rebase had to be manually backed out by hand, I've restored the file from main which should be enough to revert the changes. * Moved sample page to gallery The sample page is now in the proper location, all of the shell wiring has been done. I have refactored the command code to live in the viewmodel and use the source generators. The sample isn't binding at this current time, I will have to investigate. * Fixed behavior binding The binding context wasnt being set on the platform behavior. We will need to understand the impact of this going forwards, see https://github.com/CommunityToolkit/Maui/issues/795 * Fixed binding in sample Updated to remove the binding context from the platform behavior, we use a relative binding to talk to the viewmodel now * Added input transparency test case There is now an example of the control design that fails to register inputs, even when transparency is opted into * Fix issue with input transparency The issue I discovered where iOS would not set input transparency if the first child was a layout has now been resolved. * Fixed Parent Child Taps There was an issue in the sample where when tapping the parent/child view inside the child, both commands would execute. I have fixed this aswell as making sure the other behaviors arent affected * Fixed Hover The hovering now works correctly, we missed one area to force the ui to update * Fixed Ripple View Positioning The ripple view now positions correctly when there are child views in a layout. * Code styling Removing private & internal everywhere it can be removed. Removed some unused properties and cleaned up some nullable bits * Dotnet format Ran dotnet format, only checked in files related to touch behavior * Replaced Console with Trace As requested in the code review * Update GestureManager.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> * Code review changes Updating null checks to pattern matching, some tweaks & implementing suggestions from Pedro * Code Review - Use `static` when possible - Use `TimeSpan` for Duration - Properly Implement Async/Await - Properly Dispose - Use PatternMatching for Enum - Move Primatives to CommunityToolkit.Maui.Core * Remove duplicate `ColorTo` extension * Fix Windows The touch behavior was token by the cancellation token changes. I'm not sure if passing none is the best idea, we possibly need to generate a real one? * Fixed unit tests * Use `uint` for Duration * Use `int` for Duration * Add TouchBehaviorDefaults * Update Unit Tests * Remove duplicate calls to `ConfigureAwaitOptions.ForceYielding` * `dotnet format` * Add nullability to `PressedBackgroundColor` * Remove Unused Internal Properties * Resolve Windows Compiler Errors * `dotnet format` * Remove duplicate `splash.svg` * Update formatting * Update Formatting * Fix Find + Replace Error * Use Primary Constructors * Fix find + replace error * Update StatusBarBehavior.shared.cs * Fix Splash Screen * Fix LongPress Gesture * Update Unit Tests * Fix Build Errors on Windows * `dotnet format` * Fix duplicate SplashScreen * Revert splashscreen svg * Update CommunityToolkit.Maui.Sample.csproj * Add Unit Tests for CurrentStateChanged * Add `CanExecuteTest` * Add Unit Tests * Update src/CommunityToolkit.Maui/Behaviors/PlatformBehaviors/Touch/TouchBehavior.android.cs Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> * remove the ShouldUseNativeAnimation check in order to make it work * throw ObjectDisposedException * Big Fixes + Performance Improvements * Remove `IsToggled` * Update GestureManager.cs * Rename `PulseCount` -> `RepeatAnimationCount` * Prevent animations from happening immediately when the TouchBehavior is attached * Rename `Normal` -> `Default` * Cerate `ImageTouchBehavior` * Move `SafeFireAndForgotExtensions` * Update XML Documentation * Fix Windows Build Errors * Remove White Box * `Normal` -> `Default` * Fix Touch + Hover logic for ImageSource * Remove `RepeatAnimationCount` * Remove `RepeatAnimationCount` * Fix `SetImageSource` * `ContentVIew` -> `BoxView` * Indicate Pressed and Released are Handled Set e.Handled on PointerPressed and PointerReleased to stop passing to child controls on windows. * Remove BoxView * FIx Hover / Touch Logic in SetImageSource * Refactor GestureManager, Add StateMachine tests * Remove Unused + Duplicate Code * Rename TouchBeahavior.methods.shared.cs * Remove NativeAnimation Logic * Remove NativeAnimation from Sample * Fix Windows Build Errors * Rename file * Update ImageTouchBehaviorTests.cs * Update ImageTouchBehaviorTests.cs * Update ImageTouchBehaviorTests.cs * Update ImageTouchBehaviorTests.cs * Update ImageTouchBehaviorTests.cs * Fix merge conflicts * Fix build error --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Kym Phillpotts <kphillpotts@gmail.com> Co-authored-by: Christian Rendl <10274479+christianrr@users.noreply.github.com> Co-authored-by: Christian Rendl <cr@mutor.at> Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: cat0363 <125236133+cat0363@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Wolf <132034537+wolfgang-ironsoftware@users.noreply.github.com> Co-authored-by: Thomas Stocker <thomas.stocker@gmail.com> Co-authored-by: George Leithead <github@internetwideworld.com> Co-authored-by: Sokol2001 <53799292+Sokol2001@users.noreply.github.com> Co-authored-by: Oleksii <sokol@managed-code.com> Co-authored-by: Andrey Onishchenko <100789522+cucumber-sp@users.noreply.github.com> Co-authored-by: Gerald Versluis <gerald@verslu.is>
2024-03-28 02:38:23 +03:00
# CS2012: ValueTask instances returned from member invocations are intended to be directly awaited. Attempts to consume a ValueTask multiple times or to directly access one's result before it's known to be completed may result in an exception or corruption. Ignoring such a ValueTask is likely an indication of a functional bug and may degrade performance.
dotnet_diagnostic.CS2012.severity = error
# CS1998 : This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
dotnet_diagnostic.CS1998.severity = error
# Remove explicit default access modifiers
SnackBar (#5) * SnackBar/Toast * Fix DisplaySnackBarAsync Task never completes if another SnackBar appears, and completes before SnackBar action * Add samples * Update src/CommunityToolkit.Maui/Views/Snackbar/Options/SnackBarActionOptions.shared.cs Co-authored-by: Maksym Koshovyi <maximkoshevoi61@gmail.com> * Apply suggestions from code review Co-authored-by: Maksym Koshovyi <maximkoshevoi61@gmail.com> * Base Toast and Snackbar * Remove toast, update sample, remove ios * Add border, padding, fix tests, call events * remove base popup, fix anchor view * rebase on main, ios, macos snackbar * implement ITextStyle * documentation * set android action button font * Fix font * base tests * Add tests, IPlatformPopupExtensions * Remove unused tasks from pipeline * Add Windows * fix styles * Add padding, fix ios font size * Unsubscribe from events * Minor code style tweaks * Update azure-pipelines.yml * Update CommunityToolkit.Maui.Sample.csproj * `dotnet format` * Implement `IDisposable` Per .NET Guidelines https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose * `dotnet format` * `SnackBar` -> `Snackbar` * `SnackBar` -> `Snackbar`, Windows * Update Snackbar Architecture * `dotnet format` * Refactor Snackbar Namespace to Alert` * Update SnackBar.shared.cs * Fix CR comments Update class names, fix padding on apple, attempt to fix winui * Fix behavior on Windows and ios * Add tests Co-authored-by: Maksym Koshovyi <maximkoshevoi61@gmail.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
2021-11-27 21:16:45 +03:00
dotnet_style_require_accessibility_modifiers = omit_if_default:error
# CA1063: Implement IDisposable Correctly
dotnet_diagnostic.CA1063.severity = error
# CA1001: Type owns disposable field(s) but is not disposable
dotnet_diagnostic.CA1001.severity = error
# Add braces (IDE0011)
csharp_prefer_braces = true
dotnet_diagnostic.IDE0011.severity = error
# Pattern matching
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method=true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
Add `CancellationToken` Parameter to Methods Returning `Task` and `ValueTask` (#1503) * Update .editorconfig * Update DrawingViewService.windows.cs * Add `CancellationToken` to IDrawingView, IAlert, AnimationBehavior * Update AvatarViewGesturesPage * Update SpeechToTextImplementation.windows.cs * Update SpeechToTextImplementation.windows.cs * Add CancellationToken * Update Unit Tests * Fix Failing Unit Tests * Remove Duplicative `ThrowIfCancellationRequested()` * Remove Duplicate `ThrowIfCancellationRequested()` * Add Timeout to `async Task` Unit Tests * Fix Unit Test Timeouts * Update `AnimateCommand` (`ICommand` -> `Command<CancellationToken> `) * `dotnet format` * Fix typo * Fix compiler bug * Update DrawingViewService.tizen.cs * Fix Unit Test Timeout * Fix BaseTest Inheritance * Refactor using TaskCompletionSource * Add CancellationToken * Increase `TestDuration.Short` * Increase to TestDuration.Long * Increase to TestDuration.Medium * Revert to `ICommand ForceValidateCommand` * Update ValidationBehavior.shared.cs * Update `void SeekTo(TimeSpan)` -> `Task SeekTo(TimeSpan, CancellationToken)` * Implement `IDisposable` pattern * Update `PlatformSeek()` * Promote PlatformSeek to `Task` * Fix Floating Point Comparison Bug * Update Windows + Tizen MediaElement * Update MauiMediaElement.windows.cs * Refactor + Optimize Code * Add CancellationToken Unit Tests for `Alerts`, `Animations` and `Behaviors` * Add CancellationToken Unit Tests for Converters * Ad Unit Tests for Extensions * Add Unit Tests for Layouts * Add CancellationToken for PopupService * Add Views CancellationToken Unit Tests * Add Default Value to CancellationToken Parameter on Public APIs * Update CONTRIBUTING.md * `dotnet format` * `dotnet format` * Update src/CommunityToolkit.Maui/Behaviors/AnimationBehavior.shared.cs * Update src/CommunityToolkit.Maui/Behaviors/AnimationBehavior.shared.cs
2023-11-11 02:38:49 +03:00
csharp_style_conditional_delegate_call = true:suggestion
# Collection Expressions
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
Added fix to support spaces between the method name and its `()` to prevent a false positive MCTME001 error (#1477) * Added fix to support spaces between the method name and its `()` to prevent a false positive MCTME001 error * Fixes #1476 * Update UseCommunityToolkitInitializationAnalyzer.cs * Update Analyzers * Use `string.Concat` * Update MauiProgram.cs * Update CommunityToolkit.Maui.csproj * Fix Naming * Add `FileContainsCommunityToolkitMauiNamespace` * Remove whitespace when verifying method syntax * Update CommunityToolkit.Maui.csproj * Refactor Analyzers * Add `GetAllMethodDelcarationsWithoutWhiteSpace` * Update CommunityToolkit.Maui.csproj * Add Verifiers * Add UseCommunityToolkitCameraInitializationAnalyzerTests * Remove Unnecessary Usings * Add `VerifyNoErrorsWhenUseMauiCommunityToolkit` * Add `VerifyNoErrorsWhenUseMauiCommunityToolkitCamera` + `VerifyNoErrorsWhenUseMauiCommunityToolkitMediaElement` * Remove `BaseTest` * Refactor Analyzers * Add Helper Methods * Add Tests With Additional Whitespace * `dotnet format` * Use `ReadOnlySpan<char>` * Merge`if` statements * Refactor `GetInvocationExpressionSyntax(SyntaxNode)` * Enable analyzer release tracking * Optimize Analyzer * Implement Collection Expressions * Optimize `UseCommunityToolkitInitializationAnalyzer` * Allow `params Type[] assembliesUnderTest` for Tests * Update Camera + MediaElement Analyzers and Tests * Fix SyntaxKind --------- Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
2024-09-18 22:16:11 +03:00
dotnet_diagnostic.IDE0303.severity = suggestion
# Naming rules
dotnet_diagnostic.IDE1006.severity = error
## Public Fields are kept Pascal Case
dotnet_naming_symbols.public_symbols.applicable_kinds = field
110 gravatar image source (#531) * Initial implementation. * Added handler implementation and AppBuilder extension. * Removed unnecessary csproj additions made by VS * Moved default image enum to Primatives folder. * removed unnecessary create and await task. * Use Math.Clamp instead of Switch. * Return Stream.Null instead of Null. * Removed pragma * Made SourceService use base or UriImageSourceService. * Added unit tests * Removed GravatarImageSourceService Mapped to use UriImageSourceService Use IUriImageSource instead of IStreamImageSource Request Gravatars image if no EmailProperty Updated and added unit tests to handle gravatars image * Wording change for samples. * Moved enum to seperate class. * Fixed spelling mistake * Removed unnecessary interfaces from core. * Removed comment * Static singleton HttpClient * ReadOnlySpan<char> instead of string?. * Removed unnecessary configuring of image sources. * Reorganised to follow Style.Cop rules. * Get size of parent without being control type specific. Unit tests for ALL controls that support ImageSource * Fix for formatting errors (an extra SPACE!?!?!) * Eliminate multiple calls with Delay and ContinueWith. * Using debug instead of ImageSourceService logger. * Replaced reflection with is VisualElement. Allow smaller than default size. * Improved accessibility for sample. * Cancellation token source timeout constant added. Tried to improve efficiency. * Moved to ImageSources folder. Moved tests to mirror folder. Added XamlNameSpace alias. * Move sample out to ImageSources section * Moved samples to ImageSources. Added ImageSources gallery. * Improved test code coverage. * Push to get a rebuild * Added tests to cover DefaultStream. * Changes IsEmpty to check email instead of Uri. Improved unit test code coverage. * Improved unit test code coverage. Added parent size invalidation, to help get size. * Initial play with parental bindings * Binding to parent Width/Height. Better size handling. Removed redundant code. * Removed nullable from BindableProperty as not required. * Test cater for parent sizing. * Improved code coverage. Removed redundant code. * Removed debug for debounce sanity checks. * Renamed tests * Swapped to Pascal case * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Fixed naming rules * Removed variable and used directly in IF * Added cryptography string extension. * Updated comments to make clear size restrictions. * Changed to use unset value of -1 instead of 0. * Removed HTTP call verification debug output. * Use IsEmpty property. * Unified spaces after semicolons. * Moved conversion to after if, for efficiency. * Updated test for string with spaces after semicolons. * Added HttpClient extensions. * Update src/CommunityToolkit.Maui/Extensions/HttpClientExtensions.shares.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui/Extensions/HttpClientExtensions.shares.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui/Extensions/HttpClientExtensions.shares.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Fix of bad formatted param. * Updated summary for internal GETs. * Only dispatch HTTP request if not matching previous. * Added IDisposable * Added disposable to test that disposable types are behaving as expected. * Improved code coverage testing. Renamed to IsDisposed to match standard. * Resolved issue where size to small, then to larger didn't result in the larger size being requested. * Fix for breaking merge differences AddTransient-> AddTransientWithShellRoute * Refactor async/await * Change `public` to `internal` * Ensure `SingletonHttpClient` is thread-safe * Update `ToString()` test * Update Sample App * Add `ArgumentNullException.ThrowIfNull(uri)` * `dotnet format` Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>
2022-09-16 07:31:52 +03:00
dotnet_naming_symbols.public_symbols.applicable_accessibilities = public, internal
dotnet_naming_style.first_word_upper_case_style.capitalization = first_word_upper
dotnet_naming_rule.public_members_must_be_capitalized.symbols = public_symbols
dotnet_naming_rule.public_members_must_be_capitalized.style = first_word_upper_case_style
dotnet_naming_rule.public_members_must_be_capitalized.severity = suggestion
## Instance fields are camelCase
dotnet_naming_rule.instance_fields_should_be_camel_case.severity = error
dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style
dotnet_naming_symbols.instance_fields.applicable_kinds = field
dotnet_naming_style.instance_field_style.capitalization = camel_case
dotnet_naming_style.instance_field_style.required_prefix =
## Static fields are camelCase
dotnet_naming_rule.static_fields_should_be_camel_case.severity = error
dotnet_naming_rule.static_fields_should_be_camel_case.symbols = static_fields
dotnet_naming_rule.static_fields_should_be_camel_case.style = static_field_style
dotnet_naming_symbols.static_fields.applicable_kinds = field
dotnet_naming_symbols.static_fields.required_modifiers = static
110 gravatar image source (#531) * Initial implementation. * Added handler implementation and AppBuilder extension. * Removed unnecessary csproj additions made by VS * Moved default image enum to Primatives folder. * removed unnecessary create and await task. * Use Math.Clamp instead of Switch. * Return Stream.Null instead of Null. * Removed pragma * Made SourceService use base or UriImageSourceService. * Added unit tests * Removed GravatarImageSourceService Mapped to use UriImageSourceService Use IUriImageSource instead of IStreamImageSource Request Gravatars image if no EmailProperty Updated and added unit tests to handle gravatars image * Wording change for samples. * Moved enum to seperate class. * Fixed spelling mistake * Removed unnecessary interfaces from core. * Removed comment * Static singleton HttpClient * ReadOnlySpan<char> instead of string?. * Removed unnecessary configuring of image sources. * Reorganised to follow Style.Cop rules. * Get size of parent without being control type specific. Unit tests for ALL controls that support ImageSource * Fix for formatting errors (an extra SPACE!?!?!) * Eliminate multiple calls with Delay and ContinueWith. * Using debug instead of ImageSourceService logger. * Replaced reflection with is VisualElement. Allow smaller than default size. * Improved accessibility for sample. * Cancellation token source timeout constant added. Tried to improve efficiency. * Moved to ImageSources folder. Moved tests to mirror folder. Added XamlNameSpace alias. * Move sample out to ImageSources section * Moved samples to ImageSources. Added ImageSources gallery. * Improved test code coverage. * Push to get a rebuild * Added tests to cover DefaultStream. * Changes IsEmpty to check email instead of Uri. Improved unit test code coverage. * Improved unit test code coverage. Added parent size invalidation, to help get size. * Initial play with parental bindings * Binding to parent Width/Height. Better size handling. Removed redundant code. * Removed nullable from BindableProperty as not required. * Test cater for parent sizing. * Improved code coverage. Removed redundant code. * Removed debug for debounce sanity checks. * Renamed tests * Swapped to Pascal case * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Update src/CommunityToolkit.Maui/ImageSources/GravatarImageSource.shared.cs * Fixed naming rules * Removed variable and used directly in IF * Added cryptography string extension. * Updated comments to make clear size restrictions. * Changed to use unset value of -1 instead of 0. * Removed HTTP call verification debug output. * Use IsEmpty property. * Unified spaces after semicolons. * Moved conversion to after if, for efficiency. * Updated test for string with spaces after semicolons. * Added HttpClient extensions. * Update src/CommunityToolkit.Maui/Extensions/HttpClientExtensions.shares.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui/Extensions/HttpClientExtensions.shares.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Update src/CommunityToolkit.Maui/Extensions/HttpClientExtensions.shares.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Fix of bad formatted param. * Updated summary for internal GETs. * Only dispatch HTTP request if not matching previous. * Added IDisposable * Added disposable to test that disposable types are behaving as expected. * Improved code coverage testing. Renamed to IsDisposed to match standard. * Resolved issue where size to small, then to larger didn't result in the larger size being requested. * Fix for breaking merge differences AddTransient-> AddTransientWithShellRoute * Refactor async/await * Change `public` to `internal` * Ensure `SingletonHttpClient` is thread-safe * Update `ToString()` test * Update Sample App * Add `ArgumentNullException.ThrowIfNull(uri)` * `dotnet format` Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com> Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com> Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>
2022-09-16 07:31:52 +03:00
dotnet_naming_symbols.static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
dotnet_naming_style.static_field_style.capitalization = camel_case
dotnet_naming_style.static_field_style.required_prefix =
# Modifier preferences
csharp_prefer_static_local_function = true:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
# CA1822: Member does not access instance data and can be marked as static
CommunityToolkit.Maui.Options (#616) * MauiCommunityToolkitOptions * CODE RUB: Simple Exception Syntax Error. (#613) CODE RUB: simple exception syntax error * Add tests * Apply to validations * Update style to invalid * Add tests * Use `Action<Options> options` for `Core.AppBuilderExtensions` * Rename `bool` to be a true/false question * Don't convert `Options` * Update src/CommunityToolkit.Maui/Behaviors/BaseBehavior.shared.cs Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com> * Rename to ShouldSuppress * fix build * Add Comments * `dotnet format` * Use Exception Filters * Add `ICommunityToolkitValueConverter.DefaultReturnType` * Reduce static methods to `try/catch` blocks * Fix Naming, `DefaultReturnType` -> `DefaultReturnValue` * [CommunityToolkit.Maui.Options] Change `DefaultReturnValue` to `abstract` (#623) * Change `DefaultReturnValue` to `abstract` * Update StringToListConverter.shared.cs * Change `DefaultReturnValue { get; }` to `DefaultReturnValue { get; set; } * `dotnet format` * Fix bad formatted summary * [CommunityToolkit.Maui.Options] Add `DefaultConvertReturnValue` and `DefaultConvertBackReturnValue` (#624) * Change `DefaultReturnValue` to `abstract` * Update StringToListConverter.shared.cs * Change `DefaultReturnValue { get; }` to `DefaultReturnValue { get; set; } * `dotnet format` * Update BaseConverter * Update Converters * FIx Merge Conflicts * Update BaseConverter.shared.cs * Update BaseConverter.shared.cs * Update EnumToIntConverter.shared.cs * Update BaseConverterOneWay.shared.cs Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com> * Fix Missing XML Comments * Use `IValueConverter` instead of `ICommunityToolkitValueConverter` * Add `DefaultEnum` * Add default return value tests * Fix build * [CommunityToolkit.Maui.Options] Add `BaseConverterTest` (#625) * Add `BaseConverterTests` * Rename to `BaseConverterTest` * BaseOneWayConverter * Remove `Xunit.SkippableFact` * Rename Files to Match Class Co-authored-by: Vladislav Antonyuk <vladislav.antonyuk@dataart.com> * Update Sample * Add Missing Namespace causing the Unit Tests to fail in CI Pipeline * `dotnet format` * Add missing using declaration * `dotnet format` * Add `Debug.WriteLine` * Add `sealed` * Add `NotSupportedException` Tests * Add `ConvertBack_ShouldThrowNotSupportedException` Test, Fix base class for `ColorToHexRgbaStringConverterTestsTests` and `ColorToHexRgbaStringConverterTestsTests` * Specify Exception Type Co-authored-by: Botirali <105649270+Rashidovicc@users.noreply.github.com> Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
2022-09-14 22:49:02 +03:00
dotnet_diagnostic.CA1822.severity = suggestion
# CA1050: Declare types in namespaces
dotnet_diagnostic.CA1050.severity = error
# CA2016: Forward the 'cancellationToken' parameter methods that take one
dotnet_diagnostic.CA2016.severity = error
Add `CancellationToken` Parameter to Methods Returning `Task` and `ValueTask` (#1503) * Update .editorconfig * Update DrawingViewService.windows.cs * Add `CancellationToken` to IDrawingView, IAlert, AnimationBehavior * Update AvatarViewGesturesPage * Update SpeechToTextImplementation.windows.cs * Update SpeechToTextImplementation.windows.cs * Add CancellationToken * Update Unit Tests * Fix Failing Unit Tests * Remove Duplicative `ThrowIfCancellationRequested()` * Remove Duplicate `ThrowIfCancellationRequested()` * Add Timeout to `async Task` Unit Tests * Fix Unit Test Timeouts * Update `AnimateCommand` (`ICommand` -> `Command<CancellationToken> `) * `dotnet format` * Fix typo * Fix compiler bug * Update DrawingViewService.tizen.cs * Fix Unit Test Timeout * Fix BaseTest Inheritance * Refactor using TaskCompletionSource * Add CancellationToken * Increase `TestDuration.Short` * Increase to TestDuration.Long * Increase to TestDuration.Medium * Revert to `ICommand ForceValidateCommand` * Update ValidationBehavior.shared.cs * Update `void SeekTo(TimeSpan)` -> `Task SeekTo(TimeSpan, CancellationToken)` * Implement `IDisposable` pattern * Update `PlatformSeek()` * Promote PlatformSeek to `Task` * Fix Floating Point Comparison Bug * Update Windows + Tizen MediaElement * Update MauiMediaElement.windows.cs * Refactor + Optimize Code * Add CancellationToken Unit Tests for `Alerts`, `Animations` and `Behaviors` * Add CancellationToken Unit Tests for Converters * Ad Unit Tests for Extensions * Add Unit Tests for Layouts * Add CancellationToken for PopupService * Add Views CancellationToken Unit Tests * Add Default Value to CancellationToken Parameter on Public APIs * Update CONTRIBUTING.md * `dotnet format` * `dotnet format` * Update src/CommunityToolkit.Maui/Behaviors/AnimationBehavior.shared.cs * Update src/CommunityToolkit.Maui/Behaviors/AnimationBehavior.shared.cs
2023-11-11 02:38:49 +03:00
# CA1068: CancellationToken parameters must come last
dotnet_diagnostic.CA1068.severity = error
# CA2208: Method passes parameter as the paramName argument to a ArgumentNullException constructor. Replace this argument with one of the method's parameter names. Note that the provided parameter name should have the exact casing as declared on the method.
dotnet_diagnostic.CA2208.severity = error
# CA1834: Use 'StringBuilder.Append(char)' instead of 'StringBuilder.Append(string)' when the input is a constant unit string
dotnet_diagnostic.CA1834.severity = error
# IDE0220: Add explicit cast
dotnet_diagnostic.IDE0220.severity = error