Skip to content

Commit

Permalink
Add editor config to solutions (#113)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
josesimoes authored Oct 20, 2020
1 parent e732655 commit 055d164
Show file tree
Hide file tree
Showing 37 changed files with 9 additions and 316 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[*.cs]

# S4200: Native methods should be wrapped
# It's OK to have native methods unwrapped in nanoFramework
dotnet_diagnostic.S4200.severity = none
5 changes: 3 additions & 2 deletions nanoFramework.CoreLibrary.sln
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27130.2010
# Visual Studio Version 16
VisualStudioVersion = 16.0.30503.244
MinimumVisualStudioVersion = 10.0.40219.1
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "CoreLibrary", "nanoFramework.CoreLibrary\CoreLibrary.nfproj", "{BE7B95D5-087C-45F8-8197-4B438BEDFE11}"
EndProject
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "CoreLibrary.NoReflection", "nanoFramework.CoreLibrary.NoReflection\CoreLibrary.NoReflection.nfproj", "{D1DAD305-BC77-4BDC-BCDA-ADAEF1D93455}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{05E83B20-2648-4807-8F3E-D656497E3481}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
nanoFramework.CoreLibrary.NoReflection.nuspec = nanoFramework.CoreLibrary.NoReflection.nuspec
nanoFramework.CoreLibrary.nuspec = nanoFramework.CoreLibrary.nuspec
NuGet.Config = NuGet.Config
Expand Down
1 change: 1 addition & 0 deletions nanoFramework.CoreLibrary/CoreLibrary.nfproj
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
</NFMDP_PE_ExcludeClassByName>
</ItemGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
<None Include="key.snk" />
<None Include="packages.config" />
</ItemGroup>
Expand Down
6 changes: 0 additions & 6 deletions nanoFramework.CoreLibrary/System/AppDomain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ private AppDomain()
/// <param name="friendlyName">The friendly name of the domain.</param>
/// <returns>The newly created application domain.</returns>
[MethodImpl(MethodImplOptions.InternalCall)]
#pragma warning disable S4200 // Native methods should be wrapped
public static extern AppDomain CreateDomain(String friendlyName);
#pragma warning restore S4200 // Native methods should be wrapped

#if NANOCLR_REFLECTION
/// <summary>
Expand Down Expand Up @@ -121,9 +119,7 @@ public Assembly Load(String assemblyString)
/// </summary>
/// <returns>An array of assemblies in this application domain.</returns>
[MethodImpl(MethodImplOptions.InternalCall)]
#pragma warning disable S4200 // Native methods should be wrapped
public extern Assembly[] GetAssemblies();
#pragma warning restore S4200 // Native methods should be wrapped

[MethodImpl(MethodImplOptions.InternalCall)]
private extern Assembly LoadInternal(String assemblyString, bool fVersion, int maj, int min, int build, int rev);
Expand All @@ -136,9 +132,7 @@ public Assembly Load(String assemblyString)
/// <param name="domain">An application domain to unload.</param>
/// <remarks>Available only in mscorlib build with support for System.Reflection.</remarks>
[MethodImpl(MethodImplOptions.InternalCall)]
#pragma warning disable S4200 // Native methods should be wrapped
public static extern void Unload(AppDomain domain);
#pragma warning restore S4200 // Native methods should be wrapped
}
}
#endif // #if (NANOCLR_APPDOMAINS)
8 changes: 0 additions & 8 deletions nanoFramework.CoreLibrary/System/Array.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,17 @@ public abstract class Array : IList
/// <para>This method is an O(n) operation, where n is length.</para>
/// Available only in mscorlib build with support for System.Reflection.</remarks>
[MethodImpl(MethodImplOptions.InternalCall)]
#pragma warning disable S4200 // Native methods should be wrapped
public static extern Array CreateInstance(Type elementType, int length);
#pragma warning restore S4200 // Native methods should be wrapped

#endif // NANOCLR_REFLECTION

#pragma warning disable S4200 // Native methods should be wrapped
/// <summary>
/// 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.
/// </summary>
/// <param name="sourceArray">The Array that contains the data to copy.</param>
/// <param name="destinationArray">The Array that receives the data.</param>
/// <param name="length">A 32-bit integer that represents the number of elements to copy.</param>
public static void Copy(Array sourceArray, Array destinationArray, int length)
#pragma warning restore S4200 // Native methods should be wrapped
{
Copy(sourceArray, 0, destinationArray, 0, length);
}
Expand All @@ -60,9 +56,7 @@ public static void Copy(Array sourceArray, Array destinationArray, int length)
/// <param name="destinationIndex">A 32-bit integer that represents the index in the destinationArray at which storing begins.</param>
/// <param name="length">A 32-bit integer that represents the number of elements to copy.</param>
[MethodImpl(MethodImplOptions.InternalCall)]
#pragma warning disable S4200 // Native methods should be wrapped
public static extern void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// 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.
Expand All @@ -71,9 +65,7 @@ public static void Copy(Array sourceArray, Array destinationArray, int length)
/// <param name="index">The starting index of the range of elements to clear.</param>
/// <param name="length">The number of elements to clear.</param>
[MethodImpl(MethodImplOptions.InternalCall)]
#pragma warning disable S4200 // Native methods should be wrapped
public static extern void Clear(Array array, int index, int length);
#pragma warning restore S4200 // Native methods should be wrapped

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

0 comments on commit 055d164

Please sign in to comment.