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

4 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 36af029204
Change all null checking expressions to use 'is' and 'is not'. (#18176)
Change all null checking expressions to use 'is null' and 'is not null'
instead of '== null' and '!= null'.

This was mostly done with sed, so code can probably be improved in many
other ways with manual inspection, but that will come over time.

Also add code to the autoformat script to automatically fix these issues in the future.
2023-05-05 17:52:19 +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 6a407b7989
[linker] Make the corlib name dynamic. (#8499)
Use the correct corlib name depending on whether we're targeting .NET or Mono,
since there's no mscorlib.dll anymore in .NET.
2020-05-04 18:31:48 +02:00
Sebastien Pouliot 54f2dae935
[mtouch] Add `force-rejected-types-removal` optimization (#8009)
This optimization can be enabled when it's not possible to use the
managed linker (e.g. **Don't link**) or when the managed linker cannot
remove references to deprecated types that would cause an application
to be rejected by Apple.

References to the existing types will be renamed, e.g. `UIWebView` to
`DeprecatedWebView`, in every assemblies.

The type definition is also renamed (for validity) and all custom
attributes on the types and their members will be removed.
Code inside the members will be replaced with a
`throw new NotSupportedException ();`.

The msbuild test app `MyReleaseBuild` has been updated to test that the
optimization is working as expected (device builds are slow so reusing
this test has little impact in test time).

Basically the test ensure that `UIWebView` is used and cannot be removed
by the compiler (optimization) or the managed linker (since it's
referenced). Since the optimization is enabled then we can `grep` then
final `.app` directory to ensure there's no mention of `UIWebView` inside
any of the files that would be submitted.

The application can be run, by itself, and will turn green if OK, red if
`DeprecatedWebView` can't be found (skeleton replacement for `UIWebView`)
or orange if a `NotSupportedException` is thrown.

Finally introspection tests have been updated to skip over the deprecated
(and renamed) types. It should not be an issue right now, since this
optimization is not enabled by default, but it made testing easier.
2020-03-02 09:20:29 -05:00