Граф коммитов

9 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge fa2173e5ef
[CFNetwork] Move the CFHost and CFHTTP* types to the CFNetwork namespace in .NET. (#13761)
These types come from the CFNetwork.framework, but for some reason they were bound inside CoreServices many years ago.

This resolves a potential issue where we might end up linking with the
CoreServices framework instead of CFNetwork framework (because we use the
namespace of types to determine which framework they belong to).
2022-01-19 08:07:06 +01:00
Rolf Bjarne Kvinge a8bf64b053
[CoreServices] Fix FSEventStream to properly pass the managed context to the FSEventStreamCreate method. Fixes #13325. (#13329)
The FSEventStreamCreate method takes a pointer to a structure with context information,
which contains a user-defined pointer value in addition to a few callbacks. Previously
we were passing the GCHandle as a pointer to this structure, which is obviously quite
wrong (as evidenced by a native crash when calling FSEventStreamCreate).

Changes:

* Modify the code to provide the expected context structure instead with the GCHandle
  as a field in that structure.
* Add a release callback to the context structure to release the GCHandle.
    * This avoids the need for storing the GCHandle as a field in the FSEventStream instance.
    * It also avoids also the need for overriding Dispose to release said GCHandle.
* Modify the callback code to use the [UnmanagedCallersOnly] attribute for .NET
  (ref: #10470).

This was a regression introduced in 8c99bdc9ad.

Fixes https://github.com/xamarin/xamarin-macios/issues/13325.
2021-11-10 11:13:28 -05:00
Rolf Bjarne Kvinge e2eed27a1f
[monotouch-test] Ignore several HttpMessageTest test cases in CI in case of network failures. (#12509)
Fixes https://github.com/xamarin/maccore/issues/2160.
Fixes https://github.com/xamarin/maccore/issues/2491.
Fixes https://github.com/xamarin/maccore/issues/2493.
Fixes https://github.com/xamarin/maccore/issues/2304.
2021-08-23 15:37:02 +02:00
Rolf Bjarne Kvinge 2972e1b715
Fix some whitespace issues in various files. (#12399)
* Remove BOM
* Add EOL at end of file.
2021-08-11 10:06:46 +02:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Marius Ungureanu 38a3c4ed87 [CFNetwork] Fix ownership rules of CFHTTPAuthentication (#6088)
`Create` methods give ownership of the object, so in this case, owns=true. Prevents leak of CFHTTPAuthentication

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-Authored-By: Manuel de la Pena <mandel@microsoft.com>
2019-11-26 16:28:41 -05:00
Rolf Bjarne Kvinge a2e9b599fe
[CoreFoundation] Fix ownership of objects returned from CFHTTPMessageCreate* P/Invokes. (#6091)
* [CoreFoundation] Fix ownership of objects returned from CFHTTPMessageCreate* P/Invokes.

* [Tests] Fix 'nint' 32 bits build

* [tests] Fix XM/Classic build.
2019-05-22 22:52:46 -07:00
Timothy Risi 687aa6f25f Port monotouch-test suite to Xamarin.Mac (#1445)
* Port the Monotouch-test suite to run on Xamarin.Mac

Adds over 1300 new API tests for XM
2017-01-12 09:13:56 -09:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00