You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Base Class Library |[](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=master)|[](https://www.nuget.org/packages/nanoFramework.CoreLibrary/)|
15
+
| Base Class Library w/o reflection |[](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=master)|[](https://www.nuget.org/packages/nanoFramework.CoreLibrary/)|
16
+
| Base Class Library (preview) |[](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=develop)|[](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&package=nanoFramework.CoreLibrary&protocolType=NuGet&view=overview)|
17
+
| Base Class Library w/o reflection (preview) |[](https://dev.azure.com/nanoframework/CoreLibrary/_build/latest?definitionId=24?branchName=develop)|[](https://dev.azure.com/nanoframework/feed/_packaging?_a=package&feed=sandbox&package=nanoFramework.CoreLibrary.NoReflection&protocolType=NuGet&view=overview)|
18
+
19
+
## BCL Flavours
20
+
21
+
The **nanoFramework** Base Class Library is provided in two flavours: with or without support for System.Reflection namespace. The reason for this is that the reflection API adds up a significant size to the DLL and image size. For targets with smaller flash this can be prohibitive.
<copyright>Copyright (c) 2019 The nanoFramework project contributors</copyright>
17
+
<description>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects **WITHOUT** the System.Reflection API. This package requires a target with mscorlib v$nativeVersion$. There is another version that includes the System.Reflection API.</description>
18
+
<summary>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects **WITHOUT** the System.Reflection API.</summary>
<copyright>Copyright (c) 2018 The nanoFramework project contributors</copyright>
17
-
<description>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects. This package requires a target with mscorlib v$nativeVersion$.</description>
17
+
<description>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects. This package requires a target with mscorlib v$nativeVersion$. In case you don't need the System.Reflection API there is another NuGet package without this API.</description>
18
18
<summary>This package includes the nanoFramework.CoreLibrary assembly for nanoFramework C# projects.</summary>
#pragma warning restore S4200// Native methods should be wrapped
48
53
54
+
#if NANOCLR_REFLECTION
49
55
/// <summary>
50
56
/// Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, and the name of the type.
51
57
/// </summary>
52
58
/// <param name="assemblyName">The display name of the assembly. See Assembly.FullName.</param>
53
59
/// <param name="typeName">The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the Type.FullName property.</param>
54
60
/// <returns>An instance of the object specified by typeName.</returns>
61
+
/// <remarks>Available only in mscorlib build with support for System.Reflection.</remarks>
Copy file name to clipboardExpand all lines: source/nanoFramework.CoreLibrary/System/Array.cs
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,14 @@ namespace System
13
13
/// Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime.
14
14
/// </summary>
15
15
[Serializable]
16
+
#if NANOCLR_REFLECTION
16
17
publicabstractclassArray:ICloneable,IList
18
+
#else
19
+
public abstract class Array :IList
20
+
#endif // NANOCLR_REFLECTION
17
21
{
18
22
23
+
#if NANOCLR_REFLECTION
19
24
/// <summary>
20
25
/// Creates a one-dimensional Array of the specified Type and length, with zero-based indexing.
21
26
/// </summary>
@@ -24,12 +29,15 @@ public abstract class Array : ICloneable, IList
24
29
/// <returns>A new one-dimensional Array of the specified Type with the specified length, using zero-based indexing.</returns>
25
30
/// <remarks><para>Unlike most classes, Array provides the CreateInstance method, instead of public constructors, to allow for late bound access.</para>
26
31
/// <para>Reference-type elements are initialized to nullNothingnullptrunit a null reference(Nothing in Visual Basic). Value-type elements are initialized to zero.</para>
27
-
/// <para>This method is an O(n) operation, where n is length.</para></remarks>
32
+
/// <para>This method is an O(n) operation, where n is length.</para>
33
+
/// Available only in mscorlib build with support for System.Reflection.</remarks>
28
34
[MethodImpl(MethodImplOptions.InternalCall)]
29
35
#pragma warning disable S4200// Native methods should be wrapped
#pragma warning restore S4200// Native methods should be wrapped
32
38
39
+
#endif // NANOCLR_REFLECTION
40
+
33
41
#pragma warning disable S4200// Native methods should be wrapped
34
42
/// <summary>
35
43
/// 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.
0 commit comments