encog/encog-dotnet-core — pull request #58 by anders9ustafsson (2014-05-23 14:20:55+00:00)
Title: Code cleanup to facilitate transfer to PCL

Dear Jeff (and others involved in .NET Encog development),

I am examining the possibility of creating a Portable Class Library of this impressive machine learning project. In this investigation, I have found some "low-hanging" fruits that will facilitate the PCL transfer, while keeping the main .NET implementation intact. (At least this is my impression...)

Therefore, I would appreciate it if you could take this pull request into consideration. Below you'll find a description of the changes I have made.

The most intrusive might be the change of type for the *Bar.color* property from `System.Drawing.Color` to `int`. My impression is that this change should have very low impact, since it would be a straightforward task to convert the 32-bit integer into any ARGB color wherever this property is used. Furthermore, the property is `protected` in the current implementation, so it should only be visible to inheriting classes anyway.

I have also changed the *DataArray* class to be a generic `IDataObject` collection rather than a non-generic collection. To make everything cling together, I made the *Bar* class implement `IDataObject`. As far as I could tell from the code this seemed to be the intention anyway, it just hadn't been performed yet?

I have of course verified that my changes does not break the build. I have not provided any unit tests to verify the modifications, though.

Many thanks in advance for taking this pull request under consideration!

Best regards,
Anders @ Cureos

**Change details**

*Bar.cs* :
* Change type of color property to int, to prevent dependency on
System.Drawing
* Make class Bar implement IDataObject, to enable DataArray implementing
IEnumerable
* Make ProviderId property public to comply with IDataObject interface

*BarSeries.cs* :
* Change fList type to List (non-generic ArrayList class
not available in PCL)
* Make DataArray implement IEnumerable instead of
non-generic IEnumerable (requires implementation of generic
GetEnumerator() method and explicit implementation of non-generic
GetEnumerator() )

*FormUtility.cs* :
* Remove redundant "using System.Web"