control_structures) {
+ return control_structures.Contains(controlStructure);
+ }
+
+ [Test]
+ public void Should_it_return_the_pinvoke_result_code() {
+ result.Should().Be(IOCTL_PINVOKE_RESULT_CODE);
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Properties/AssemblyInfo.cs b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..306c84b
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Allgemeine Informationen über eine Assembly werden über die folgenden
+// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+// die mit einer Assembly verknüpft sind.
+[assembly: AssemblyTitle("Tests.Raspberry.IO.SerialPeripheralInterface")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tests.Raspberry.IO.SerialPeripheralInterface")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
+// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
+// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
+[assembly: ComVisible(false)]
+
+// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
+[assembly: Guid("904914b3-5dcc-4874-9f74-e6ac2d836716")]
+
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+//
+// Hauptversion
+// Nebenversion
+// Buildnummer
+// Revision
+//
+// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
+// übernehmen, indem Sie "*" eingeben:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/SpiTransferBufferSpecs.cs b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/SpiTransferBufferSpecs.cs
new file mode 100644
index 0000000..fec7fea
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/SpiTransferBufferSpecs.cs
@@ -0,0 +1,247 @@
+using System;
+using FluentAssertions;
+using NUnit.Framework;
+using Raspberry.IO.SerialPeripheralInterface;
+
+// ReSharper disable once CheckNamespace
+// ReSharper disable InconsistentNaming
+namespace Tests.Raspberry.IO.SerialPeripheralInterface.SpiTransferBufferSpecs
+{
+ [TestFixture]
+ public class If_the_user_creates_an_spi_transfer_buffer_for_transmission_only : Spec {
+ private const int REQUESTED_SIZE = 500;
+ private ISpiTransferBuffer buffer;
+
+ protected override void BecauseOf() {
+ buffer = new SpiTransferBuffer(REQUESTED_SIZE, SpiTransferMode.Write);
+ }
+
+ [Test]
+ public void Should_the_structure_contain_a_memory_buffer_for_transmission_data() {
+ buffer.Tx.Should().NotBeNull();
+ }
+
+ [Test]
+ public void Should_the_structure_contain_no_memory_buffer_to_receive_data() {
+ buffer.Rx.Should().BeNull();
+ }
+
+ [Test]
+ public void Should_the_buffer_size_be_equal_to_the_requested_size() {
+ buffer.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ [Test]
+ public void Should_the_transmission_data_buffer_size_be_equal_to_the_requested_size() {
+ buffer.Tx.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ [Test]
+ public void Should_the_transfer_mode_be_write_only() {
+ buffer.TransferMode.Should().Be(SpiTransferMode.Write);
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_address_for_TX() {
+ buffer.ControlStructure.Tx.Should().Be(unchecked((UInt64) buffer.Tx.Pointer.ToInt64()));
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_address_for_RX() {
+ buffer.ControlStructure.Rx.Should().Be(0L);
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_length() {
+ buffer.ControlStructure.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ protected override void Cleanup() {
+ if (!ReferenceEquals(buffer, null)) {
+ buffer.Dispose();
+ buffer = null;
+ }
+ }
+ }
+
+ [TestFixture]
+ public class If_the_user_creates_an_spi_transfer_buffer_for_receive_only : Spec
+ {
+ private const int REQUESTED_SIZE = 500;
+ private ISpiTransferBuffer buffer;
+
+ protected override void BecauseOf() {
+ buffer = new SpiTransferBuffer(REQUESTED_SIZE, SpiTransferMode.Read);
+ }
+
+ [Test]
+ public void Should_the_structure_contain_no_memory_buffer_for_transmission_data() {
+ buffer.Tx.Should().BeNull();
+ }
+
+ [Test]
+ public void Should_the_structure_contain_a_memory_buffer_to_receive_data() {
+ buffer.Rx.Should().NotBeNull();
+ }
+
+ [Test]
+ public void Should_the_buffer_size_be_equal_to_the_requested_size() {
+ buffer.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ [Test]
+ public void Should_the_receive_data_buffer_size_be_equal_to_the_requested_size() {
+ buffer.Rx.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ [Test]
+ public void Should_the_transfer_mode_be_read_only() {
+ buffer.TransferMode.Should().Be(SpiTransferMode.Read);
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_address_for_RX() {
+ buffer.ControlStructure.Rx.Should().Be(unchecked((UInt64)buffer.Rx.Pointer.ToInt64()));
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_address_for_TX() {
+ buffer.ControlStructure.Tx.Should().Be(0L);
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_length() {
+ buffer.ControlStructure.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ protected override void Cleanup() {
+ if (!ReferenceEquals(buffer, null)) {
+ buffer.Dispose();
+ buffer = null;
+ }
+ }
+ }
+
+ [TestFixture]
+ public class If_the_user_creates_an_spi_transfer_buffer_for_transmission_and_receive : Spec
+ {
+ private const int REQUESTED_SIZE = 500;
+ private ISpiTransferBuffer buffer;
+
+ protected override void BecauseOf() {
+ buffer = new SpiTransferBuffer(REQUESTED_SIZE, SpiTransferMode.ReadWrite);
+ }
+
+ [Test]
+ public void Should_the_structure_contain_a_memory_buffer_for_transmission_data() {
+ buffer.Tx.Should().NotBeNull();
+ }
+
+ [Test]
+ public void Should_the_structure_contain_a_memory_buffer_to_receive_data() {
+ buffer.Rx.Should().NotBeNull();
+ }
+
+ [Test]
+ public void Should_the_buffer_size_be_equal_to_the_requested_size() {
+ buffer.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ [Test]
+ public void Should_the_transmission_data_buffer_size_be_equal_to_the_requested_size() {
+ buffer.Tx.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ [Test]
+ public void Should_the_receive_data_buffer_size_be_equal_to_the_requested_size() {
+ buffer.Rx.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ [Test]
+ public void Should_the_data_buffers_not_have_the_same_memory_address() {
+ buffer.Rx.Pointer.Should().NotBe(buffer.Tx.Pointer);
+ }
+
+ [Test]
+ public void Should_the_transfer_mode_have_set_the_READ_flag() {
+ buffer.TransferMode.HasFlag(SpiTransferMode.Read).Should().BeTrue();
+ }
+
+ [Test]
+ public void Should_the_transfer_mode_have_set_the_WRITE_flag() {
+ buffer.TransferMode.HasFlag(SpiTransferMode.Write).Should().BeTrue();
+ }
+
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_address_for_RX() {
+ buffer.ControlStructure.Rx.Should().Be(unchecked((UInt64)buffer.Rx.Pointer.ToInt64()));
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_address_for_TX() {
+ buffer.ControlStructure.Tx.Should().Be(unchecked((UInt64)buffer.Tx.Pointer.ToInt64()));
+ }
+
+ [Test]
+ public void Should_the_transfer_structure_have_the_correct_memory_length() {
+ buffer.ControlStructure.Length.Should().Be(REQUESTED_SIZE);
+ }
+
+ protected override void Cleanup() {
+ if (!ReferenceEquals(buffer, null)) {
+ buffer.Dispose();
+ buffer = null;
+ }
+ }
+ }
+
+ [TestFixture]
+ public class If_the_user_changes_various_transfer_settings : Spec {
+ private const int REQUESTED_SIZE = 100;
+ private const int REQUESTED_BITS_PER_WORD = 16;
+ private const bool REQUESTED_CHIP_SELECT_CHANGE = true;
+ private const int REQUESTED_DELAY_IN_USEC = 100;
+ private const int REQUESTED_SPEED_IN_HZ = 1000000;
+ private SpiTransferBuffer buffer;
+
+ protected override void EstablishContext() {
+ buffer = new SpiTransferBuffer(REQUESTED_SIZE, SpiTransferMode.Write);
+ }
+
+ protected override void BecauseOf() {
+ buffer.BitsPerWord = REQUESTED_BITS_PER_WORD;
+ buffer.ChipSelectChange = REQUESTED_CHIP_SELECT_CHANGE;
+ buffer.Delay = REQUESTED_DELAY_IN_USEC;
+ buffer.Speed = REQUESTED_SPEED_IN_HZ;
+ }
+
+ [Test]
+ public void Should_the_control_structure_have_the_requested_wordsize() {
+ buffer.ControlStructure.BitsPerWord.Should().Be(REQUESTED_BITS_PER_WORD);
+ }
+
+ [Test]
+ public void Should_the_control_structure_have_the_requested_chip_select_change_value() {
+ // ReSharper disable once UnreachableCode
+ buffer.ControlStructure.ChipSelectChange.Should().Be(REQUESTED_CHIP_SELECT_CHANGE ? (byte)1 : (byte)0);
+ }
+
+ [Test]
+ public void Should_the_control_structure_have_the_requested_delay() {
+ buffer.ControlStructure.Delay.Should().Be(REQUESTED_DELAY_IN_USEC);
+ }
+
+ [Test]
+ public void Should_the_control_structure_have_the_requested_speed() {
+ buffer.ControlStructure.Speed.Should().Be(REQUESTED_SPEED_IN_HZ);
+ }
+
+ protected override void Cleanup() {
+ if (!ReferenceEquals(buffer, null)) {
+ buffer.Dispose();
+ buffer = null;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Tests.Raspberry.IO.SerialPeripheralInterface.csproj b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Tests.Raspberry.IO.SerialPeripheralInterface.csproj
new file mode 100644
index 0000000..12ff3b6
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Tests.Raspberry.IO.SerialPeripheralInterface.csproj
@@ -0,0 +1,92 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {17A2A965-36FA-4CDB-B2D6-AC69C9E9857F}
+ Library
+ Properties
+ Tests.Raspberry.IO.SerialPeripheralInterface
+ Tests.Raspberry.IO.SerialPeripheralInterface
+ v4.0
+ 512
+ ..\..\
+
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+ false
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ false
+
+
+
+ $(SolutionDir)packages\FakeItEasy.1.25.3\lib\net40\FakeItEasy.dll
+ True
+
+
+ $(SolutionDir)packages\FluentAssertions.4.6.3\lib\net40\FluentAssertions.dll
+ True
+
+
+ $(SolutionDir)packages\FluentAssertions.4.6.3\lib\net40\FluentAssertions.Core.dll
+ True
+
+
+ $(SolutionDir)packages\NUnit.2.6.4\lib\nunit.framework.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {689CB6C4-3D23-45DA-8E00-87C28AEA32D0}
+ Raspberry.IO.Interop
+
+
+ {326342E5-0411-40E8-9F2D-563D6B192568}
+ Raspberry.IO.SerialPeripheralInterface
+
+
+ {0BB6C3CE-422E-49F2-9165-DEC06AFE1B1A}
+ Tests.Raspberry.IO
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Tests.Raspberry.IO.SerialPeripheralInterface.csproj.DotSettings b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Tests.Raspberry.IO.SerialPeripheralInterface.csproj.DotSettings
new file mode 100644
index 0000000..65668e8
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/Tests.Raspberry.IO.SerialPeripheralInterface.csproj.DotSettings
@@ -0,0 +1,3 @@
+
+ True
+ True
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/packages.config b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/packages.config
new file mode 100644
index 0000000..3c2106d
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO.SerialPeripheralInterface/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO/Properties/AssemblyInfo.cs b/UnitTests/Tests.Raspberry.IO/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5af4fa3
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Allgemeine Informationen über eine Assembly werden über die folgenden
+// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+// die mit einer Assembly verknüpft sind.
+[assembly: AssemblyTitle("Tests.Raspberry.IO")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Tests.Raspberry.IO")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
+// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
+// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
+[assembly: ComVisible(false)]
+
+// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
+[assembly: Guid("e0f37de3-8576-49c3-aae9-9578d7612264")]
+
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+//
+// Hauptversion
+// Nebenversion
+// Buildnummer
+// Revision
+//
+// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
+// übernehmen, indem Sie "*" eingeben:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/UnitTests/Tests.Raspberry.IO/Spec.cs b/UnitTests/Tests.Raspberry.IO/Spec.cs
new file mode 100644
index 0000000..4c35d07
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO/Spec.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Diagnostics;
+using NUnit.Framework;
+
+namespace Tests.Raspberry.IO
+{
+ ///
+ /// Abstract helper class to make nunit tests more readable.
+ ///
+ [DebuggerStepThrough, DebuggerNonUserCode]
+ public class Spec
+ {
+ [DebuggerStepThrough]
+ [TestFixtureSetUp]
+ public void SetUp() {
+ EstablishContext();
+ BecauseOf();
+ }
+
+ [DebuggerStepThrough]
+ [TestFixtureTearDown]
+ public void TearDown() {
+ Cleanup();
+ }
+
+ ///
+ /// Test setup. Place your initialization code here.
+ ///
+ [DebuggerStepThrough]
+ protected virtual void EstablishContext() {}
+
+ ///
+ /// Test run. Place the tested method / action here.
+ ///
+ [DebuggerStepThrough]
+ protected virtual void BecauseOf() {}
+
+ ///
+ /// Test clean. Close/delete files, close database connections ..
+ ///
+ [DebuggerStepThrough]
+ protected virtual void Cleanup() {}
+
+ ///
+ /// Creates an Action delegate.
+ ///
+ /// Method the shall be created as delegate.
+ /// A delegate of type
+ protected Action Invoking(Action func) {
+ return func;
+ }
+ }
+}
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO/Tests.Raspberry.IO.csproj b/UnitTests/Tests.Raspberry.IO/Tests.Raspberry.IO.csproj
new file mode 100644
index 0000000..e213af9
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO/Tests.Raspberry.IO.csproj
@@ -0,0 +1,75 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {0BB6C3CE-422E-49F2-9165-DEC06AFE1B1A}
+ Library
+ Properties
+ Tests.Raspberry.IO
+ Tests.Raspberry.IO
+ v4.0
+ 512
+
+ ..\..\
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ $(SolutionDir)packages\FakeItEasy.1.25.3\lib\net40\FakeItEasy.dll
+ True
+
+
+ $(SolutionDir)packages\FluentAssertions.4.6.3\lib\net40\FluentAssertions.dll
+ True
+
+
+ $(SolutionDir)packages\FluentAssertions.4.6.3\lib\net40\FluentAssertions.Core.dll
+ True
+
+
+ $(SolutionDir)packages\NUnit.2.6.4\lib\nunit.framework.dll
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO/Tests.Raspberry.IO.csproj.DotSettings b/UnitTests/Tests.Raspberry.IO/Tests.Raspberry.IO.csproj.DotSettings
new file mode 100644
index 0000000..95561ee
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO/Tests.Raspberry.IO.csproj.DotSettings
@@ -0,0 +1,2 @@
+
+ True
\ No newline at end of file
diff --git a/UnitTests/Tests.Raspberry.IO/packages.config b/UnitTests/Tests.Raspberry.IO/packages.config
new file mode 100644
index 0000000..3c2106d
--- /dev/null
+++ b/UnitTests/Tests.Raspberry.IO/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build.cmd b/build.cmd
new file mode 100644
index 0000000..76266c2
--- /dev/null
+++ b/build.cmd
@@ -0,0 +1,2 @@
+powershell -f build.ps1 -configuration release
+powershell -f build.ps1 -configuration debug
\ No newline at end of file
diff --git a/build.common.ps1 b/build.common.ps1
new file mode 100644
index 0000000..fd47175
--- /dev/null
+++ b/build.common.ps1
@@ -0,0 +1,90 @@
+$Script:UseWriteHost = $true
+
+if(!$Global:ColorScheme) {
+ $Global:ColorScheme = @{
+ "Banner"=[ConsoleColor]::Cyan
+ "RuntimeName"=[ConsoleColor]::Yellow
+ "Help_Header"=[ConsoleColor]::Yellow
+ "Help_Switch"=[ConsoleColor]::Green
+ "Help_Argument"=[ConsoleColor]::Cyan
+ "Help_Optional"=[ConsoleColor]::Gray
+ "Help_Command"=[ConsoleColor]::DarkYellow
+ "Help_Executable"=[ConsoleColor]::DarkYellow
+ "ParameterName"=[ConsoleColor]::Cyan
+ "Warning" = [ConsoleColor]::Yellow
+ }
+}
+
+function _WriteOut {
+ param(
+ [Parameter(Mandatory=$false, Position=0, ValueFromPipeline=$true)][string]$msg,
+ [Parameter(Mandatory=$false)][ConsoleColor]$ForegroundColor,
+ [Parameter(Mandatory=$false)][ConsoleColor]$BackgroundColor,
+ [Parameter(Mandatory=$false)][switch]$NoNewLine)
+
+ if($__TestWriteTo) {
+ $cur = Get-Variable -Name $__TestWriteTo -ValueOnly -Scope Global -ErrorAction SilentlyContinue
+ $val = $cur + "$msg"
+ if(!$NoNewLine) {
+ $val += [Environment]::NewLine
+ }
+ Set-Variable -Name $__TestWriteTo -Value $val -Scope Global -Force
+ return
+ }
+
+ if(!$Script:UseWriteHost) {
+ if(!$msg) {
+ $msg = ""
+ }
+ if($NoNewLine) {
+ [Console]::Write($msg)
+ } else {
+ [Console]::WriteLine($msg)
+ }
+ }
+ else {
+ try {
+ if(!$ForegroundColor) {
+ $ForegroundColor = $host.UI.RawUI.ForegroundColor
+ }
+ if(!$BackgroundColor) {
+ $BackgroundColor = $host.UI.RawUI.BackgroundColor
+ }
+
+ Write-Host $msg -ForegroundColor:$ForegroundColor -BackgroundColor:$BackgroundColor -NoNewLine:$NoNewLine
+ } catch {
+ $Script:UseWriteHost = $false
+ _WriteOut $msg
+ }
+ }
+}
+
+function _WriteConfig{
+param(
+ [Parameter(Mandatory=$true,Position=0)]$name,
+ [Parameter(Mandatory=$true,Position=1)]$value)
+
+ _WriteOut -NoNewline -ForegroundColor $Global:ColorScheme.ParameterName "${name}: "
+ _WriteOut "$value"
+
+}
+
+function _DownloadNuget{
+param(
+ [Parameter(Mandatory=$true,Position=0)]$rootPath)
+
+$sourceNugetExe = "http://nuget.org/nuget.exe"
+$targetNugetExe = "$rootPath\nuget.exe"
+
+
+if(!(Test-Path $targetNugetExe )){
+ _WriteOut "Downloading nuget to $targetNugetExe"
+ Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe
+}
+else{
+ # _WriteOut "nuget.exe is already present"
+}
+
+Set-Alias nuget $targetNugetExe -Scope Global
+
+}
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
new file mode 100644
index 0000000..e9fb1da
--- /dev/null
+++ b/build.ps1
@@ -0,0 +1,43 @@
+param(
+ [string]$configuration = "Release"
+)
+
+. ".\build.common.ps1"
+
+$solutionName = "RaspberrySharp.IO"
+
+function init {
+ # Initialization
+ $global:rootFolder = Split-Path -parent $script:MyInvocation.MyCommand.Path
+ $global:rootFolder = Join-Path $rootFolder .
+ $global:packagesFolder = Join-Path $rootFolder packages
+ $global:outputFolder = Join-Path $rootFolder _artifacts
+ $global:msbuild = "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
+
+ _WriteOut -ForegroundColor $ColorScheme.Banner "-= $solutionName Build =-"
+ _WriteConfig "rootFolder" $rootFolder
+}
+
+function restorePackages{
+ _WriteOut -ForegroundColor $ColorScheme.Banner "nuget restore"
+
+ New-Item -Force -ItemType directory -Path $packagesFolder
+ _DownloadNuget $packagesFolder
+ nuget restore
+}
+
+function buildSolution{
+
+ _WriteOut -ForegroundColor $ColorScheme.Banner "Build Solution"
+ & $msbuild "$rootFolder\$solutionName.sln" /p:Configuration=$configuration
+
+}
+
+
+init
+
+restorePackages
+
+buildSolution
+
+Write-Host "Build $configuration complete"
\ No newline at end of file
diff --git a/packages/Raspberry.System.1.2.0/Raspberry.System.1.2.0.nupkg b/packages/Raspberry.System.1.2.0/Raspberry.System.1.2.0.nupkg
deleted file mode 100644
index 54bc80b..0000000
Binary files a/packages/Raspberry.System.1.2.0/Raspberry.System.1.2.0.nupkg and /dev/null differ
diff --git a/packages/Raspberry.System.1.2.0/lib/net40/Raspberry.System.dll b/packages/Raspberry.System.1.2.0/lib/net40/Raspberry.System.dll
deleted file mode 100644
index 63149e7..0000000
Binary files a/packages/Raspberry.System.1.2.0/lib/net40/Raspberry.System.dll and /dev/null differ
diff --git a/packages/Raspberry.System.1.2.0/lib/net40/Raspberry.System.xml b/packages/Raspberry.System.1.2.0/lib/net40/Raspberry.System.xml
deleted file mode 100644
index 69967a5..0000000
--- a/packages/Raspberry.System.1.2.0/lib/net40/Raspberry.System.xml
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-
- Raspberry.System
-
-
-
-
- Represents the Raspberry Pi mainboard.
-
- Version and revisions are based on .
-
-
-
- Gets the current mainboard configuration.
-
-
-
-
- Gets a value indicating whether this instance is a Raspberry Pi.
-
-
- true if this instance is a Raspberry Pi; otherwise, false.
-
-
-
-
- Gets the processor.
-
-
-
-
- Gets the board firmware version.
-
-
-
-
- Gets the serial number.
-
-
-
-
- Gets the model.
-
- The model name (A or B) if known; otherwise, (char)0.
-
-
-
- Gets the board revision.
-
- The board revision for the given if known; otherwise, 0.
-
-
-
- Represents a high-resolution timer.
-
-
-
-
- Starts this instance.
-
- The delay before the first occurence, in milliseconds.
-
-
-
- Stops this instance.
-
-
-
-
- Gets or sets the interval, in milliseconds.
-
-
- The interval, in milliseconds.
-
-
-
-
- Gets or sets the action.
-
-
- The action.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Sleeps the specified delay.
-
- The delay.
-
-
-
- Starts this instance.
-
- The delay before the first occurence, in milliseconds.
-
-
-
- Stops this instance.
-
-
-
-
- Gets or sets the interval, in milliseconds.
-
-
- The interval, in milliseconds.
-
-
-
-
- Gets or sets the action.
-
-
- The action.
-
-
-
-
- Starts this instance.
-
- The delay before the first occurence, in milliseconds.
-
-
-
- Stops this instance.
-
-
-
-
- Gets or sets the interval, in milliseconds.
-
-
- The interval, in milliseconds.
-
-
-
-
- Gets or sets the action.
-
-
- The action.
-
-
-
-
- Provides access to timing features.
-
-
-
-
- Creates a timer.
-
- The timer.
-
- The created timer is the most suitable for the current platform.
-
-
-
-
- Sleeps during the specified time.
-
- The time, in milliseconds.
-
-
-
diff --git a/packages/repositories.config b/packages/repositories.config
deleted file mode 100644
index 89e8483..0000000
--- a/packages/repositories.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy