Commit Graph

172 Commits

Author SHA1 Message Date
Pranav K fe782681b4 Make WASM packages stay preview releases in 3.1. (dotnet/extensions#2503)
Fixes https://github.com/aspnet/AspNetCore/issues/14623\n\nCommit migrated from b195e40af5
2019-10-14 15:36:50 -07:00
Doug Bunting 7364cfcc56 Regen Microsoft.AspNetCore.Testing ref/ code
- account for xUnit refactoring in 'release/3.1'
\n\nCommit migrated from c6cacd7161
2019-10-13 21:15:18 -07:00
Doug Bunting f706def408 Merge branch 'release/3.1' into merge/release/3.0-to-release/3.1\n\nCommit migrated from 5bd76469dc 2019-10-12 21:57:07 -07:00
John Luo e6cc170447 Compile using ref assemblies (dotnet/extensions#2483)
* Compile using ref assemblies

* Use updated ResolveReferences.target from AspNetCore

* Generate ref assemblies for .NET framework\n\nCommit migrated from e771c4205f
2019-10-11 03:41:09 -07:00
Chris Ross aae216ade2 Unify OS version xunit attributes (dotnet/extensions#2481)
\n\nCommit migrated from 65e70f58df
2019-10-09 17:59:08 -07:00
Chris Ross f31f20e70a Add OSMinVersionAttribute (dotnet/extensions#2449)
\n\nCommit migrated from ddc00c0f2f
2019-10-03 21:03:01 -07:00
wtgodbe fb73cc1d81 Merge branches
\n\nCommit migrated from 9356c2770b
2019-09-27 13:13:49 -07:00
wtgodbe afa62186c6 Add icon metadata to manually generated .nuspecs
\n\nCommit migrated from 224e1104ac
2019-09-24 13:15:12 -07:00
wtgodbe b67cfeab49 Switch to embedded PackageIcon
\n\nCommit migrated from 6acbcb1e6d
2019-09-24 13:15:06 -07:00
Pranav K 5114f2f1a2 Add null check for DotNetObjectReference (dotnet/extensions#2372)
\n\nCommit migrated from 45776ac25c
2019-09-23 09:42:48 -07:00
Ryan Nowak ddde4faf4f Refactor xUnit extensibility
Adds our own hook for before/after logic that's more usable, called
`ITestMethodLifecycle`. This provides access to a context object
including the information about the test and the output helper. This can
be implemented by attributes or by the class itself.

The goal (and result) of this, is that we have a single *test executor*
extensibility point that provides all of the features we need. We should
use this everywhere we need features xUnit doesn't have.

Adding a new extensibility point (`ITestMethodLifecycle`) allows us to
do this without turning all of these features into a giant monolith.

---

Also updated our existing extensibility to use this new hook.

I did as much cleanup as a could to remove duplication from logging and
keep it loosly coupled. I didn't want to tease this apart completely
because the scope of this PR is already pretty large.
\n\nCommit migrated from 1b10284a47
2019-09-23 07:37:33 -07:00
Ryan Nowak aadc979baf Add AssemblyFixture to our test infra
This is a feature that we're using in Templates and Blazor E2E tests to manage selenium.

It's a general purpose kind of thing, so it makes sense to make it more general. This requires using the
`[assembly: TestFramework()]`.
Also fixed a bug here where this feature broke collection fixtures.
\n\nCommit migrated from 208d44a985
2019-09-23 07:37:33 -07:00
Ryan Nowak b1987c75cb Add a workaround for xUnit bug
We're currently experiencing a bug where conditional skips aren't working in VS.
This is caused by https://github.com/xunit/xunit/issues/1782
\n\nCommit migrated from cbe90b8492
2019-09-23 07:37:33 -07:00
Ryan Nowak ed97d344c5 Rename file to make class
\n\nCommit migrated from b6a290771f
2019-09-23 07:37:33 -07:00
Pranav K ef2dc5024f Add support for JSInvokable methods on generic types (dotnet/extensions#2342)
* Add support for JSInvokable methods on generic types

Prior to this change, DotNetDispatcher cached the MethodInfo on the
generic type definition. Using this would have required MethodInfo.MakeGenericMethod before the method was invoked.
We could separately cache the result of this to avoid the reflection cost per invocation.

Alternatively we could cache static and non-static MethodInfo instances separately which is what this change attempts to do.
The big difference in the outcome is that this requires instance (non-static) JSInvokable methods to be only unique named within
the type hierarchy as opposed to across all static and instance JSInvokable methods in an assembly.

Fixes https://github.com/aspnet/Extensions/issues/1360
Fixes https://github.com/aspnet/AspNetCore/issues/9061
\n\nCommit migrated from 659b604fb2
2019-09-19 10:48:09 -07:00
John Luo 6371d93d18 Update ref assembly generation to use DefaultNetCoreTargetFramework property (dotnet/extensions#2359)
\n\nCommit migrated from 1f41bdc386
2019-09-17 11:17:34 -07:00
John Luo 68f3765e6d Fix packing on *nix systems (dotnet/extensions#2344)
- Without this fix, the nupkg will be missing files if packed on *nix systems\n\nCommit migrated from 51e8af72d5
2019-09-16 15:17:32 -07:00
John Luo fd2033e5d5 Support netcoreapp3.1 TFM (dotnet/extensions#2336)
* Support netcoreapp3.1 TFM

* Unpin SDK for source build

* Update to preview1 branding
\n\nCommit migrated from 32cc8162ff
2019-09-12 22:34:52 -07:00
Brennan 4643c8f350 Fix FlakyAttribute (dotnet/extensions#2245)
\n\nCommit migrated from 1983ee879c
2019-08-28 09:10:43 -07:00
Brennan 72dc1409d6 Fix ConditionalFact and ConditionalTheory (dotnet/extensions#2241)
\n\nCommit migrated from ae9d51ffeb
2019-08-27 19:41:44 -07:00
Kevin Pilch e1974283f0 Add XML Docs for pubternal types
\n\nCommit migrated from 033ea04bab
2019-08-27 13:43:50 -07:00
Doug Bunting 1153f0d1de Add switch to enable expected and unexpected arguments in any order (dotnet/extensions#2210)
- unblocks work on aspnet/AspNetCoredotnet/extensions#4923
  - arguments for inside and outside men of service reference doc gen tool are mixed by default
  - users may add either argument type to the end of the outside man's command line
- e.g. "command --unexpected unexpectedValue --expected" can now set the "expected" option
  - only "--unexpected" and "unexpectedValue" are added to RemainingArguments in that case

- default behaviour of the command-line parser is unchanged to avoid breaking existing applications
- new switch is supported only when calling `CommandLineApplication` constructor for top-level commands
  - `dotnet-getdocument` (the outside man) has no (sub)commands and expanding scope would increase churn

nits: take VS suggestions in changed files\n\nCommit migrated from e4433979b6
2019-08-22 14:25:13 -07:00
Pranav K d46d569b81 Simplify JSRuntime method signature (dotnet/extensions#2188)
\n\nCommit migrated from 9c392a92ef
2019-08-16 16:19:23 -07:00
Pranav K ef83e3359d Change JSInterop to avoid using async locals (dotnet/extensions#2163)
* Remove the use of async local JSRuntime

* Update DotNetDispatcher to accept a JSRuntime instance rather than use a ambient value.
* Modify DotNetObjectReference to start tracking it's value during serialization.
\n\nCommit migrated from ae9878bb99
2019-08-15 17:14:03 -07:00
Justin Kotalik c717230b13 Cleanup to skip/flaky attributes (dotnet/extensions#2186)
\n\nCommit migrated from cfef5e07fb
2019-08-15 09:12:53 -07:00
Pranav K 9372816b7c API Review: JSRuntime (dotnet/extensions#2166)
* API Review: JSRuntime

* Rename JSRuntimeBase -> JSRuntime
* Rename JSInProcessRuntimeBase -> JSInProcessRuntime
* Rename DotNetObjectRef -> DotNetObjectReference
* Update JSRuntime to return ValueTask
* Make InvokeAsync APIs that explicitly cancels and API that default cancels more crisp
* Introduce void invoking APIs
* Fixup method names on DotNetDispatcher

\n\nCommit migrated from 93d3ae4485
2019-08-14 12:24:35 -07:00
Pranav K edd5f54bc3 Special case Disposing DotNetObjectReferences (dotnet/extensions#2176)
* Special case Disposing DotNetObjectReferences

This removes a public JSInvokable method required for disposing DotNetObjectReferences


\n\nCommit migrated from d6bfc28e21
2019-08-14 09:44:33 -07:00
Doug Bunting 60778e8dc7 Fix unintended breaking change
- blocking aspnet/AspNetCoredotnet/extensions#1293 dependency update PR
- commit 3ec8c35e450c lost `AssemblyName` substitution
  - tasks assembly in package incorrectly named ".Manifest.Task.dll"
\n\nCommit migrated from 77403f35be
2019-08-11 14:12:42 -07:00
John Luo 42eec2cbfa Fix build break by using API that's available across net472 and netcoreapp3.0 (dotnet/extensions#2157)
\n\nCommit migrated from 6e96af8eba
2019-08-07 15:44:03 -07:00
John Luo 95746c596e Multitarget extensions packages to remove dependencies for source build (dotnet/extensions#2090)
\n\nCommit migrated from 3ec8c35e45
2019-08-07 13:26:14 -07:00
Pranav K 557bd8e011 Use Utf8JsonReader in DotNetDispatcher (dotnet/extensions#2061)
* Use Utf8JsonReader in DotNetDispatcher

Fixes https://github.com/aspnet/AspNetCore/issues/10988
\n\nCommit migrated from c24711c84d
2019-08-07 09:44:42 -07:00
Pranav K 39c052b8bc More
\n\nCommit migrated from 0cf3c01afc
2019-07-23 19:36:16 -07:00
Pranav K 950b3873b1 PR comments
\n\nCommit migrated from 791c96b143
2019-07-23 18:39:17 -07:00
Pranav K 2d2400e7fa Use JsonConverter for DotNetObjectRef
\n\nCommit migrated from 0389bf44d4
2019-07-23 18:39:17 -07:00
Javier Calvarro Nelson b4bcb1fd15 [JSInterop] Updates the JSInterop abstractions to better support logging and diagnostics. (dotnet/extensions#2043)
* Add an overload to handle .NET completion calls without going through JS interop.
* Add endInvokeHook on the client-side.
* Replace OnDotNetInvocationException with EndInvokeDotNet.\n\nCommit migrated from 4312b9a050
2019-07-17 17:12:37 +02:00
Andrew Stanton-Nurse 4c0a9d9a6b update version of SqlClient used by sql cache (dotnet/extensions#2006)
\n\nCommit migrated from b1ff0d9dc8
2019-07-16 14:42:37 -07:00
Pranav K d0a69f9860 Json Options (dotnet/extensions#1993)
\n\nCommit migrated from 912ab18694
2019-07-10 07:54:15 -07:00
Steve Sanderson 3c42f4436f Bring back required export jsCallDispatcher.findJSFunction (dotnet/extensions#2002)
\n\nCommit migrated from 5350efd2f4
2019-07-10 12:12:11 +01:00
Steve Sanderson 86b55046c9 In JSInterop calls, use expected value for 'this'. Fixes dotnet/extensions#1477 (dotnet/extensions#1990)
\n\nCommit migrated from a664ecb5b3
2019-07-09 12:40:20 +01:00
Ryan Brandenburg 97a039f154 PR feedback
\n\nCommit migrated from d656c4f7e2
2019-07-08 14:37:20 -07:00
Ryan Brandenburg f8b525f02d PR feedback
\n\nCommit migrated from 2e1cfcd1f9
2019-07-08 14:37:20 -07:00
Ryan Brandenburg 25cad453f4 More doc comment additions
\n\nCommit migrated from 551e7c269a
2019-07-08 14:37:20 -07:00
Ryan Brandenburg 109d388e5e More doc comments
\n\nCommit migrated from d3cad4c787
2019-07-08 14:37:20 -07:00
Ryan Brandenburg bd0623bf72 Fix generic <see references
\n\nCommit migrated from 72d4e3ad79
2019-07-08 14:37:20 -07:00
Ryan Brandenburg a61d9b6921 Add some missing doc comments
\n\nCommit migrated from 238b272238
2019-07-08 14:37:20 -07:00
Javier Calvarro Nelson 919734cbb2 Invoking a method with an invalid dotnetobjectref bubbles up through the wrong path (dotnet/extensions#1940)
* Handle non existing dotnet object references and returns the error through JSInterop instead of bubbling it up to the caller.
* Every other error in JSInterop is returned that way.
* It makes sure that the error gets to the client and is sanitized appropriately if necessary.\n\nCommit migrated from a30f2cbb27
2019-07-05 10:16:39 +02:00
Javier Calvarro Nelson 6069a89758 Add InvokeAsync with cancellation token overload to IJSRuntime (dotnet/extensions#1915)
Adds the InvokeAsync with cancellation token overload to IJSRuntime\n\nCommit migrated from 55f0b77464
2019-07-02 19:21:16 +02:00
Javier Calvarro Nelson 5e4f1f5fb2 Adds an opt-in default timeout for async JS calls (dotnet/extensions#1880)
* Adds the ability to configure a default timeout for JavaScript interop calls.
* Adds the ability to pass in a cancellation token to InvokeAsync that will be used instead of the default timeout.
  * A default cancellation token can be passed to signal no cancellation, but it is not recommended in remote interop scenarios.\n\nCommit migrated from e04faac7e4
2019-07-02 13:24:29 +02:00
Javier Calvarro Nelson 244ed54764 Allow sanitization of dotnet interop exceptions (dotnet/extensions#1879)
Adds the ability to sanitize exceptions during JS to .NET interop calls by overriding OnDotNetInvocationException method and returning an object to be returned to JavaScript that describes the exception.\n\nCommit migrated from d7eab7c083
2019-07-02 12:40:50 +02:00
Brennan b39ec06467 Update corefx dependencies (dotnet/extensions#1898)
\n\nCommit migrated from b398a5db3d
2019-06-27 10:21:07 -07:00