Skip to content

Commit 28ccc3a

Browse files
authored
Merge pull request #89 from nanoframework/release-v1.2.6
Release v1.2.6
2 parents 1f992c3 + 491e22c commit 28ccc3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1035
-175
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,3 +249,9 @@ paket-files/
249249
# JetBrains Rider
250250
.idea/
251251
*.sln.iml
252+
253+
#sonarcloud
254+
.sonarqube
255+
256+
#SoundCloud
257+
*.sonarqube/

CHANGELOG.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,86 @@
11
# Change Log
22

3+
## [v1.2.6-preview.16](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.6-preview.16) (2019-07-17)
4+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.6-preview.14...v1.2.6-preview.16)
5+
6+
## [v1.2.6-preview.14](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.6-preview.14) (2019-07-17)
7+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.6-preview.12...v1.2.6-preview.14)
8+
9+
## [v1.2.6-preview.12](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.6-preview.12) (2019-07-15)
10+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.6-preview.10...v1.2.6-preview.12)
11+
12+
**Documentation and other chores:**
13+
14+
- Update readme.txt [\#87](https://github.com/nanoframework/lib-CoreLibrary/pull/87)
15+
16+
## [v1.2.6-preview.10](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.6-preview.10) (2019-07-11)
17+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.6-preview.7...v1.2.6-preview.10)
18+
19+
**Documentation and other chores:**
20+
21+
- Added GetInvocationList to System.Delegate [\#85](https://github.com/nanoframework/lib-CoreLibrary/pull/85)
22+
23+
## [v1.2.6-preview.7](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.6-preview.7) (2019-06-23)
24+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.6-preview.1...v1.2.6-preview.7)
25+
26+
**Documentation and other chores:**
27+
28+
- Work on native assembly declaration [\#83](https://github.com/nanoframework/lib-CoreLibrary/pull/83) [[Breaking-Change](https://github.com/nanoframework/lib-CoreLibrary/labels/Breaking-Change)]
29+
30+
## [v1.2.6-preview.1](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.6-preview.1) (2019-06-20)
31+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.5-preview.1...v1.2.6-preview.1)
32+
33+
**Implemented enhancements:**
34+
35+
- Add support for Unix Epoch [\#82](https://github.com/nanoframework/lib-CoreLibrary/pull/82)
36+
- Rework DateTime [\#81](https://github.com/nanoframework/lib-CoreLibrary/pull/81) [[Breaking-Change](https://github.com/nanoframework/lib-CoreLibrary/labels/Breaking-Change)]
37+
38+
**Fixed bugs:**
39+
40+
- Rework DateTime [\#81](https://github.com/nanoframework/lib-CoreLibrary/pull/81) [[Breaking-Change](https://github.com/nanoframework/lib-CoreLibrary/labels/Breaking-Change)]
41+
42+
## [v1.2.5-preview.1](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.5-preview.1) (2019-06-12)
43+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.4-preview.1...v1.2.5-preview.1)
44+
45+
**Fixed bugs:**
46+
47+
- Fix DateTime ticks discrepancy from full .NET [\#80](https://github.com/nanoframework/lib-CoreLibrary/pull/80) [[Breaking-Change](https://github.com/nanoframework/lib-CoreLibrary/labels/Breaking-Change)]
48+
49+
**Documentation and other chores:**
50+
51+
- Update AssemblyNativeVersion to 1.2.0.0 [\#79](https://github.com/nanoframework/lib-CoreLibrary/pull/79)
52+
53+
## [v1.2.4-preview.1](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.4-preview.1) (2019-06-12)
54+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.2-preview.5...v1.2.4-preview.1)
55+
56+
## [v1.2.2-preview.5](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.2-preview.5) (2019-06-12)
57+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.2-preview.20...v1.2.2-preview.5)
58+
59+
**Fixed bugs:**
60+
61+
- Remove DebuggerBrowsable from excluded classes [\#78](https://github.com/nanoframework/lib-CoreLibrary/pull/78)
62+
63+
**Documentation and other chores:**
64+
65+
- Update Nerdbank.GitVersioning to 3.0.19-beta [\#77](https://github.com/nanoframework/lib-CoreLibrary/pull/77)
66+
67+
## [v1.2.2-preview.20](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.2-preview.20) (2019-06-11)
68+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.1-preview-013...v1.2.2-preview.20)
69+
70+
## [v1.2.1-preview-013](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.1-preview-013) (2019-06-11)
71+
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.2.0...v1.2.1-preview-013)
72+
73+
**Implemented enhancements:**
74+
75+
- Fixes in ArrayList [\#76](https://github.com/nanoframework/lib-CoreLibrary/pull/76)
76+
- Fix debugger attributes [\#75](https://github.com/nanoframework/lib-CoreLibrary/pull/75)
77+
- Several fixes throughout the code base [\#74](https://github.com/nanoframework/lib-CoreLibrary/pull/74)
78+
- Remove CultureInfo unused field [\#72](https://github.com/nanoframework/lib-CoreLibrary/pull/72)
79+
80+
**Fixed bugs:**
81+
82+
- Fix SortableDateTimePattern [\#73](https://github.com/nanoframework/lib-CoreLibrary/pull/73)
83+
384
## [v1.2.0](https://github.com/nanoframework/lib-CoreLibrary/tree/v1.2.0) (2019-04-23)
485
[Full Changelog](https://github.com/nanoframework/lib-CoreLibrary/compare/v1.1.2...v1.2.0)
586

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,34 @@
1-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/nanoframework/Home/blob/master/LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.CoreLibrary.svg)]() [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md)
2-
[![Discord](https://img.shields.io/discord/478725473862549535.svg)](https://discord.gg/gCyBu8T)
3-
1+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_lib-CoreLibrary&metric=alert_status)](https://sonarcloud.io/dashboard?id=nanoframework_lib-CoreLibrary) [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=nanoframework_lib-CoreLibrary&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=nanoframework_lib-CoreLibrary) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/nanoframework/Home/blob/master/LICENSE) [![NuGet](https://img.shields.io/nuget/dt/nanoFramework.CoreLibrary.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.CoreLibrary/) [![#yourfirstpr](https://img.shields.io/badge/first--timers--only-friendly-blue.svg)](https://github.com/nanoframework/Home/blob/master/CONTRIBUTING.md)
2+
[![Discord](https://img.shields.io/discord/478725473862549535.svg?logo=discord&logoColor=white&label=Discord&color=7289DA)](https://discord.gg/gCyBu8T)
43

54
![nanoFramework logo](https://github.com/nanoframework/Home/blob/master/resources/logo/nanoFramework-repo-logo.png)
65

76
-----
87

98
### Welcome to the **nanoFramework** Core Library repository!
109

11-
1210
## Build status
1311

1412
| Component | Build Status | NuGet Package |
1513
|:-|---|---|
16-
| Core Library | [![Build Status](https://dev.azure.com/nanoframework/CoreLibrary/_apis/build/status/nanoframework.lib-CoreLibrary?branchName=develop)](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=master) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.CoreLibrary.svg)](https://www.nuget.org/packages/nanoFramework.CoreLibrary/) |
17-
| Core Library (preview) | [![Build Status](https://dev.azure.com/nanoframework/CoreLibrary/_apis/build/status/nanoframework.lib-CoreLibrary?branchName=develop)](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=develop) | [![MyGet Pre Release](https://img.shields.io/myget/nanoframework-dev/vpre/nanoFramework.CoreLibrary.svg)](https://www.myget.org/feed/nanoframework-dev/package/nuget/nanoFramework.CoreLibrary) |
18-
14+
| Core Library | [![Build Status](https://dev.azure.com/nanoframework/CoreLibrary/_apis/build/status/nanoframework.lib-CoreLibrary?branchName=develop)](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=master) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.CoreLibrary.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.CoreLibrary/) |
15+
| Core Library (preview) | [![Build Status](https://dev.azure.com/nanoframework/CoreLibrary/_apis/build/status/nanoframework.lib-CoreLibrary?branchName=develop)](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=develop) | [![](https://badgen.net/badge/NuGet/preview/D7B023?icon=https://simpleicons.now.sh/azuredevops/fff)](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&package=nanoFramework.CoreLibrary&protocolType=NuGet&view=overview) |
1916

2017
## Feedback and documentation
2118

2219
For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).
2320

2421
Join our Discord community [here](https://discord.gg/gCyBu8T).
2522

26-
2723
## Credits
2824

2925
The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/master/CONTRIBUTORS.md).
3026

31-
3227
## License
3328

3429
The **nanoFramework** Class Libraries are licensed under the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0).
3530

36-
3731
## Code of Conduct
32+
3833
This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/)
3934
to clarify expected behavior in our community.

azure-pipelines.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ steps:
3939
# step from template @ nf-tools repo
4040
# all build, update and publish steps
4141
- template: azure-pipelines-templates/class-lib-build.yml@templates
42+
parameters:
43+
sonarCloudProject: 'nanoframework_lib-CoreLibrary'
4244

4345
# update dependencies
4446
- task: UpdatenFDependencies@1
@@ -56,7 +58,8 @@ steps:
5658
lib-nanoFramework.Networking.Sntp
5759
lib-nanoFramework.Hardware.Stm32
5860
lib-nanoFramework.System.Math
59-
condition: and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') )
61+
Json.nanoFramework
62+
condition: or( and( succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v') ), and( succeeded(), contains(variables['getCommitMessage.COMMIT_MESSAGE'], '***UPDATE_DEPENDENTS***') ), eq(variables['UPDATE_DEPENDENTS'], 'true') )
6063
displayName: Update dependent class libs
6164

6265
# step from template @ nf-tools repo

source/nanoFramework.CoreLibrary.nuspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
<authors>nanoFramework project contributors</authors>
88
<owners>nanoFramework project contributors</owners>
99
<requireLicenseAcceptance>false</requireLicenseAcceptance>
10+
<license type="expression">Apache-2.0</license>
1011
<releaseNotes></releaseNotes>
1112
<developmentDependency>false</developmentDependency>
1213
<projectUrl>https://github.com/nanoframework/lib-CoreLibrary</projectUrl>
1314
<iconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</iconUrl>
15+
<repository type="git" url="https://github.com/nanoframework/lib-CoreLibrary" commit="$commit$" />
1416
<copyright>Copyright (c) 2018 The nanoFramework project contributors</copyright>
15-
<description>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects.</description>
17+
<description>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects.&#10;This package requires a target with mscorlib v$nativeVersion$.</description>
1618
<summary>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects.</summary>
1719
<tags>nanoFramework C# csharp netmf netnf nanoFramework.CoreLibrary</tags>
1820
</metadata>
@@ -22,5 +24,8 @@
2224
<file src="nanoFramework.CoreLibrary\bin\Release\mscorlib.pdbx" target="lib\mscorlib.pdbx" />
2325
<file src="nanoFramework.CoreLibrary\bin\Release\mscorlib.pe" target="lib\mscorlib.pe" />
2426
<file src="nanoFramework.CoreLibrary\bin\Release\mscorlib.xml" target="lib\mscorlib.xml" />
27+
28+
<!-- readme -->
29+
<file src="readme.txt" target="readme.txt" />
2530
</files>
2631
</package>

source/nanoFramework.CoreLibrary/CoreLibrary.nfproj

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<SignAssembly>true</SignAssembly>
3030
</PropertyGroup>
3131
<PropertyGroup>
32-
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
32+
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
3333
</PropertyGroup>
3434
<PropertyGroup>
3535
<DelaySign>false</DelaySign>
@@ -53,7 +53,7 @@
5353
<Compile Include="System\ArgumentNullException.cs" />
5454
<Compile Include="System\ArgumentOutOfRangeException.cs" />
5555
<Compile Include="System\Array.cs" />
56-
<Compile Include="System\AssemblyInfo2.cs" />
56+
<Compile Include="System\AssemblyInfo.cs" />
5757
<Compile Include="System\AsyncCallback.cs" />
5858
<Compile Include="System\Attribute.cs" />
5959
<Compile Include="System\AttributeTargets.cs" />
@@ -226,12 +226,6 @@
226226
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.DebuggableAttribute">
227227
<InProject>false</InProject>
228228
</NFMDP_PE_ExcludeClassByName>
229-
<!--<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.DebuggerBrowsableAttribute">
230-
<InProject>false</InProject>
231-
</NFMDP_PE_ExcludeClassByName>-->
232-
<!--<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.DebuggerBrowsableState">
233-
<InProject>false</InProject>
234-
</NFMDP_PE_ExcludeClassByName>-->
235229
<NFMDP_PE_ExcludeClassByName Include="System.Diagnostics.DebuggerDisplayAttribute">
236230
<InProject>false</InProject>
237231
</NFMDP_PE_ExcludeClassByName>
@@ -373,9 +367,12 @@
373367
<NFMDP_PE_ExcludeClassByName Include="System.UIntPtr">
374368
<InProject>false</InProject>
375369
</NFMDP_PE_ExcludeClassByName>
370+
<NFMDP_PE_ExcludeClassByName Include="ThisAssembly">
371+
<InProject>false</InProject>
372+
</NFMDP_PE_ExcludeClassByName>
376373
</ItemGroup>
377374
<ItemGroup>
378-
<None Include="..\key.snk" />
375+
<None Include="key.snk" />
379376
<None Include="packages.config" />
380377
</ItemGroup>
381378
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
@@ -384,11 +381,11 @@
384381
<ProjectConfigurationsDeclaredAsItems />
385382
</ProjectCapabilities>
386383
</ProjectExtensions>
387-
<Import Project="..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets')" />
384+
<Import Project="..\packages\Nerdbank.GitVersioning.3.0.19-beta\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\packages\Nerdbank.GitVersioning.3.0.19-beta\build\Nerdbank.GitVersioning.targets')" />
388385
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
389386
<PropertyGroup>
390387
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
391388
</PropertyGroup>
392-
<Error Condition="!Exists('..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Nerdbank.GitVersioning.3.0.6-beta\build\Nerdbank.GitVersioning.targets'))" />
389+
<Error Condition="!Exists('..\packages\Nerdbank.GitVersioning.3.0.19-beta\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Nerdbank.GitVersioning.3.0.19-beta\build\Nerdbank.GitVersioning.targets'))" />
393390
</Target>
394391
</Project>

source/nanoFramework.CoreLibrary/System/AppDomain.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public sealed class AppDomain : MarshalByRefObject
3131

3232
private AppDomain()
3333
{
34+
#pragma warning disable S112 // General exceptions should never be thrown
3435
throw new Exception();
36+
#pragma warning restore S112 // General exceptions should never be thrown
3537
}
3638

3739
/// <summary>
@@ -40,7 +42,9 @@ private AppDomain()
4042
/// <param name="friendlyName">The friendly name of the domain.</param>
4143
/// <returns>The newly created application domain.</returns>
4244
[MethodImpl(MethodImplOptions.InternalCall)]
45+
#pragma warning disable S4200 // Native methods should be wrapped
4346
public static extern AppDomain CreateDomain(String friendlyName);
47+
#pragma warning restore S4200 // Native methods should be wrapped
4448

4549
/// <summary>
4650
/// Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, and the name of the type.
@@ -106,7 +110,9 @@ public Assembly Load(String assemblyString)
106110
/// </summary>
107111
/// <returns>An array of assemblies in this application domain.</returns>
108112
[MethodImpl(MethodImplOptions.InternalCall)]
113+
#pragma warning disable S4200 // Native methods should be wrapped
109114
public extern Assembly[] GetAssemblies();
115+
#pragma warning restore S4200 // Native methods should be wrapped
110116

111117
[MethodImpl(MethodImplOptions.InternalCall)]
112118
private extern Assembly LoadInternal(String assemblyString, bool fVersion, int maj, int min, int build, int rev);
@@ -116,7 +122,9 @@ public Assembly Load(String assemblyString)
116122
/// </summary>
117123
/// <param name="domain">An application domain to unload.</param>
118124
[MethodImpl(MethodImplOptions.InternalCall)]
125+
#pragma warning disable S4200 // Native methods should be wrapped
119126
public static extern void Unload(AppDomain domain);
127+
#pragma warning restore S4200 // Native methods should be wrapped
120128
}
121129
}
122130
#endif // #if (NANOCLR_APPDOMAINS)

source/nanoFramework.CoreLibrary/System/Array.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,19 @@ public abstract class Array : ICloneable, IList
2626
/// <para>Reference-type elements are initialized to nullNothingnullptrunit a null reference(Nothing in Visual Basic). Value-type elements are initialized to zero.</para>
2727
/// <para>This method is an O(n) operation, where n is length.</para></remarks>
2828
[MethodImpl(MethodImplOptions.InternalCall)]
29+
#pragma warning disable S4200 // Native methods should be wrapped
2930
public static extern Array CreateInstance(Type elementType, int length);
31+
#pragma warning restore S4200 // Native methods should be wrapped
3032

33+
#pragma warning disable S4200 // Native methods should be wrapped
3134
/// <summary>
3235
/// Copies a range of elements from an Array starting at the first element and pastes them into another Array starting at the first element. The length is specified as a 32-bit integer.
3336
/// </summary>
3437
/// <param name="sourceArray">The Array that contains the data to copy.</param>
3538
/// <param name="destinationArray">The Array that receives the data.</param>
3639
/// <param name="length">A 32-bit integer that represents the number of elements to copy.</param>
3740
public static void Copy(Array sourceArray, Array destinationArray, int length)
41+
#pragma warning restore S4200 // Native methods should be wrapped
3842
{
3943
Copy(sourceArray, 0, destinationArray, 0, length);
4044
}
@@ -48,7 +52,9 @@ public static void Copy(Array sourceArray, Array destinationArray, int length)
4852
/// <param name="destinationIndex">A 32-bit integer that represents the index in the destinationArray at which storing begins.</param>
4953
/// <param name="length">A 32-bit integer that represents the number of elements to copy.</param>
5054
[MethodImpl(MethodImplOptions.InternalCall)]
55+
#pragma warning disable S4200 // Native methods should be wrapped
5156
public static extern void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length);
57+
#pragma warning restore S4200 // Native methods should be wrapped
5258

5359
/// <summary>
5460
/// Sets a range of elements in the Array to zero, to false, or to null reference (Nothing in Visual Basic), depending on the element type.
@@ -57,7 +63,9 @@ public static void Copy(Array sourceArray, Array destinationArray, int length)
5763
/// <param name="index">The starting index of the range of elements to clear.</param>
5864
/// <param name="length">The number of elements to clear.</param>
5965
[MethodImpl(MethodImplOptions.InternalCall)]
66+
#pragma warning disable S4200 // Native methods should be wrapped
6067
public static extern void Clear(Array array, int index, int length);
68+
#pragma warning restore S4200 // Native methods should be wrapped
6169

6270
/// <summary>
6371
/// Gets the value at the specified position in the one-dimensional Array. The index is specified as a 32-bit integer.

0 commit comments

Comments
 (0)