Skip to content

Commit

Permalink
Fix warnings for all fields required/used in the native end (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes authored Aug 2, 2018
1 parent 8deae82 commit ddd69d0
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/System/AppDomain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ namespace System
/// </summary>
public sealed class AppDomain : MarshalByRefObject
{
// these fields are required in the native end
#pragma warning disable 0649, 0169
[FieldNoReflection]
private object _appDomain;
private string _friendlyName;
#pragma warning restore 0649
#pragma warning restore 0169

private AppDomain()
{
Expand Down
3 changes: 3 additions & 0 deletions source/System/Boolean.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public struct Boolean
/// </summary>
public static readonly string TrueString = "True";

// this field is required in the native end
#pragma warning disable 0649
private bool _value;
#pragma warning restore 0649

/// <summary>
/// Converts the value of this instance to its equivalent string representation (either "True" or "False").
Expand Down
3 changes: 3 additions & 0 deletions source/System/Byte.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace System
[Serializable]
public struct Byte
{
// this field is required in the native end
#pragma warning disable 0649
private byte _value;
#pragma warning restore 0649

/// <summary>
/// Represents the largest possible value of a Byte. This field is constant.
Expand Down
3 changes: 3 additions & 0 deletions source/System/Char.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ namespace System
[Serializable]
public struct Char
{
// this field is required in the native end
#pragma warning disable 0649
private char _value;
#pragma warning restore 0649

/// <summary>
/// Represents the largest possible value of a Char. This field is constant.
Expand Down
3 changes: 3 additions & 0 deletions source/System/Double.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ namespace System
[Serializable]
public struct Double
{
// this field is required in the native end
#pragma warning disable 0649
internal double _value;
#pragma warning restore 0649

/// <summary>
/// Represents the smallest possible value of a Double. This field is constant.
Expand Down
3 changes: 3 additions & 0 deletions source/System/Exception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ public class Exception
private readonly string _message;
private readonly Exception _innerException;

// this field is required in the native end
#pragma warning disable 0169
private object _stackTrace;
#pragma warning restore 0169

/// <summary>
/// Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.
Expand Down
3 changes: 3 additions & 0 deletions source/System/Int16.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace System
[Serializable]
public struct Int16
{
// this field is required in the native end
#pragma warning disable 0649
internal short _value;
#pragma warning restore 0649

/// <summary>
/// Represents the largest possible value of an Int16. This field is constant.
Expand Down
3 changes: 3 additions & 0 deletions source/System/SByte.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace System
[Serializable, CLSCompliant(false)]
public struct SByte
{
// this field is required in the native end
#pragma warning disable 0649
private sbyte _value;
#pragma warning restore 0649

/// <summary>
/// Represents the largest possible value of SByte. This field is constant.
Expand Down
3 changes: 3 additions & 0 deletions source/System/Threading/Thread.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ namespace System.Threading
/// </summary>
public sealed class Thread
{
// these fields are required in the native end
#pragma warning disable 0169
private Delegate _delegate;
private int _priority;
[Reflection.FieldNoReflection]
private object _thread;
[Reflection.FieldNoReflection]
private object _appDomain;
private int _id;
#pragma warning restore 0169

/// <summary>
/// Initializes a new instance of the Thread class.
Expand Down
3 changes: 3 additions & 0 deletions source/System/Threading/Timer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ namespace System.Threading
/// </summary>
public sealed class Timer : MarshalByRefObject, IDisposable
{
// these fields are required in the native end
#pragma warning disable 0169
[Reflection.FieldNoReflection]
private object _timer;
private object _state;
private TimerCallback _callback;
#pragma warning restore 0169

/// <summary>
/// Initializes a new instance of the Timer class, using a 32-bit signed integer to specify the time interval.
Expand Down
3 changes: 3 additions & 0 deletions source/System/UInt16.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace System
[Serializable, CLSCompliant(false)]
public struct UInt16
{
// this field is required in the native end
#pragma warning disable 0649
private ushort _value;
#pragma warning restore 0649

/// <summary>
/// Represents the largest possible value of UInt16. This field is constant.
Expand Down
3 changes: 3 additions & 0 deletions source/System/UInt32.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ namespace System
[Serializable, CLSCompliant(false)]
public struct UInt32
{
// this field is required in the native end
#pragma warning disable 0649
private uint _value;
#pragma warning restore 0649

/// <summary>
/// Represents the largest possible value of UInt32. This field is constant.
Expand Down

0 comments on commit ddd69d0

Please sign in to comment.