Skip to content

Commit e11182a

Browse files
committed
#47 remove ReactiveUI dependency
1 parent d76a5a3 commit e11182a

17 files changed

+201
-282
lines changed

Demo.DeviceMonitor/Demo.DeviceMonitor.csproj

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,9 @@
3535
<ItemGroup>
3636
<Reference Include="PresentationCore" />
3737
<Reference Include="PresentationFramework" />
38-
<Reference Include="ReactiveUI, Version=8.3.0.0, Culture=neutral, processorArchitecture=MSIL">
39-
<HintPath>..\..\packages\ReactiveUI.8.3.1\lib\net461\ReactiveUI.dll</HintPath>
40-
</Reference>
41-
<Reference Include="Splat, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
42-
<HintPath>..\..\packages\Splat.4.0.0\lib\net461\Splat.dll</HintPath>
43-
</Reference>
4438
<Reference Include="System" />
4539
<Reference Include="System.Core" />
4640
<Reference Include="System.Drawing" />
47-
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
48-
<HintPath>..\..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll</HintPath>
49-
</Reference>
50-
<Reference Include="System.Reactive, Version=4.0.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
51-
<HintPath>..\..\packages\System.Reactive.4.0.0\lib\net46\System.Reactive.dll</HintPath>
52-
</Reference>
53-
<Reference Include="System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
54-
<HintPath>..\..\packages\System.Reactive.Core.4.0.0\lib\net46\System.Reactive.Core.dll</HintPath>
55-
</Reference>
56-
<Reference Include="System.Reactive.Interfaces, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
57-
<HintPath>..\..\packages\System.Reactive.Interfaces.4.0.0\lib\net46\System.Reactive.Interfaces.dll</HintPath>
58-
</Reference>
59-
<Reference Include="System.Reactive.Linq, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
60-
<HintPath>..\..\packages\System.Reactive.Linq.4.0.0\lib\net46\System.Reactive.Linq.dll</HintPath>
61-
</Reference>
62-
<Reference Include="System.Reactive.PlatformServices, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
63-
<HintPath>..\..\packages\System.Reactive.PlatformServices.4.0.0\lib\net46\System.Reactive.PlatformServices.dll</HintPath>
64-
</Reference>
6541
<Reference Include="System.Windows" />
6642
<Reference Include="System.Windows.Forms" />
6743
<Reference Include="System.Xaml" />
@@ -79,7 +55,6 @@
7955
</ItemGroup>
8056
<ItemGroup>
8157
<None Include="App.config" />
82-
<None Include="packages.config" />
8358
</ItemGroup>
8459
<ItemGroup>
8560
<ProjectReference Include="..\ODriveClientLibrary.DeviceGenerator\ODriveClientLibrary.DeviceGenerator.csproj">

Demo.DeviceMonitor/Program.cs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
using System;
44
using System.Collections.Generic;
5+
using System.Collections.ObjectModel;
56
using System.Linq;
6-
using System.Reactive.Linq;
77
using System.Windows.Forms;
88
using ODriveClientLibrary;
99

@@ -15,22 +15,21 @@ public static void Main(string[] args)
1515

1616
PrintDeviceInfos(deviceMonitor.AvailableDevices.ToList());
1717

18-
deviceMonitor.AvailableDevices.CountChanged.Subscribe(evt =>
19-
{
20-
PrintDeviceInfos(deviceMonitor.AvailableDevices.ToList());
21-
});
2218

23-
deviceMonitor.AvailableDevices.ItemChanged.Subscribe(evt =>
24-
{
25-
PrintDeviceInfos(deviceMonitor.AvailableDevices.ToList());
26-
});
19+
deviceMonitor.AvailableDevices.CollectionChanged += AvailableDevices_CollectionChanged;
2720

2821
while (!Console.KeyAvailable)
2922
{
3023
Application.DoEvents();
3124
}
3225
}
3326

27+
private static void AvailableDevices_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
28+
{
29+
var availableDevices = sender as ObservableCollection<BasicDeviceInfo>;
30+
PrintDeviceInfos(availableDevices.ToList());
31+
}
32+
3433
private static void PrintDeviceInfos(List<BasicDeviceInfo> deviceInfos)
3534
{
3635
Console.Clear();

Demo.DeviceMonitor/packages.config

Lines changed: 0 additions & 11 deletions
This file was deleted.

Demo.ReadSetProperties/Demo.ReadSetProperties.csproj

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,9 @@
3535
<ItemGroup>
3636
<Reference Include="PresentationCore" />
3737
<Reference Include="PresentationFramework" />
38-
<Reference Include="ReactiveUI, Version=8.2.0.0, Culture=neutral, processorArchitecture=MSIL">
39-
<HintPath>..\packages\ReactiveUI.8.2.1\lib\net461\ReactiveUI.dll</HintPath>
40-
</Reference>
41-
<Reference Include="Splat, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
42-
<HintPath>..\packages\Splat.4.0.0\lib\net461\Splat.dll</HintPath>
43-
</Reference>
4438
<Reference Include="System" />
4539
<Reference Include="System.Core" />
4640
<Reference Include="System.Drawing" />
47-
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
48-
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll</HintPath>
49-
</Reference>
50-
<Reference Include="System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
51-
<HintPath>..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll</HintPath>
52-
</Reference>
53-
<Reference Include="System.Reactive.Interfaces, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
54-
<HintPath>..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll</HintPath>
55-
</Reference>
56-
<Reference Include="System.Reactive.Linq, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
57-
<HintPath>..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll</HintPath>
58-
</Reference>
59-
<Reference Include="System.Reactive.PlatformServices, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
60-
<HintPath>..\packages\System.Reactive.PlatformServices.3.1.1\lib\net46\System.Reactive.PlatformServices.dll</HintPath>
61-
</Reference>
62-
<Reference Include="System.Reactive.Windows.Threading, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
63-
<HintPath>..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
64-
</Reference>
6541
<Reference Include="System.Windows" />
6642
<Reference Include="System.Windows.Forms" />
6743
<Reference Include="System.Xaml" />
@@ -83,7 +59,6 @@
8359
</ItemGroup>
8460
<ItemGroup>
8561
<None Include="App.config" />
86-
<None Include="packages.config" />
8762
</ItemGroup>
8863
<ItemGroup>
8964
<ProjectReference Include="..\ODriveClientLibrary.Common\ODriveClientLibrary.Common.csproj">

Demo.ReadSetProperties/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static async Task MyAsyncFunc()
2626
throw new Exception("Could not find any suitable devices to connect to");
2727
}
2828

29-
using (var oDrive = new Device(foundDevice))
29+
using (var oDrive = new Device(foundDevice, DeviceSchema.SchemaChecksum))
3030
{
3131
bool connectSuccess = false;
3232
try
@@ -38,8 +38,7 @@ static async Task MyAsyncFunc()
3838
System.Diagnostics.Debugger.Break();
3939
}
4040

41-
// var download = await oDrive.DownloadSchema();
42-
41+
// var download = await oDrive.DownloadSchema();
4342

4443
while (!Console.KeyAvailable)
4544
{

Demo.ReadSetProperties/packages.config

Lines changed: 0 additions & 12 deletions
This file was deleted.

ODriveClientLibrary.DeviceGenerator/ODriveClientLibrary.DeviceGenerator.csproj

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -38,32 +38,11 @@
3838
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
3939
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.2.8.2\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
4040
</Reference>
41-
<Reference Include="Microsoft.CodeAnalysis.CSharp.Workspaces, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
42-
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.Workspaces.2.8.2\lib\netstandard1.3\Microsoft.CodeAnalysis.CSharp.Workspaces.dll</HintPath>
43-
</Reference>
44-
<Reference Include="Microsoft.CodeAnalysis.VisualBasic, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
45-
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.2.8.2\lib\netstandard1.3\Microsoft.CodeAnalysis.VisualBasic.dll</HintPath>
46-
</Reference>
47-
<Reference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
48-
<HintPath>..\packages\Microsoft.CodeAnalysis.VisualBasic.Workspaces.2.8.2\lib\netstandard1.3\Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll</HintPath>
49-
</Reference>
50-
<Reference Include="Microsoft.CodeAnalysis.Workspaces, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
51-
<HintPath>..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.8.2\lib\net46\Microsoft.CodeAnalysis.Workspaces.dll</HintPath>
52-
</Reference>
53-
<Reference Include="Microsoft.CodeAnalysis.Workspaces.Desktop, Version=2.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
54-
<HintPath>..\packages\Microsoft.CodeAnalysis.Workspaces.Common.2.8.2\lib\net46\Microsoft.CodeAnalysis.Workspaces.Desktop.dll</HintPath>
55-
</Reference>
5641
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
5742
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
5843
</Reference>
5944
<Reference Include="PresentationCore" />
6045
<Reference Include="PresentationFramework" />
61-
<Reference Include="ReactiveUI, Version=8.2.0.0, Culture=neutral, processorArchitecture=MSIL">
62-
<HintPath>..\packages\ReactiveUI.8.2.1\lib\net461\ReactiveUI.dll</HintPath>
63-
</Reference>
64-
<Reference Include="Splat, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL">
65-
<HintPath>..\packages\Splat.4.0.0\lib\net461\Splat.dll</HintPath>
66-
</Reference>
6746
<Reference Include="System" />
6847
<Reference Include="System.AppContext, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
6948
<HintPath>..\packages\System.AppContext.4.3.0\lib\net46\System.AppContext.dll</HintPath>
@@ -72,21 +51,6 @@
7251
<HintPath>..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath>
7352
</Reference>
7453
<Reference Include="System.ComponentModel.Composition" />
75-
<Reference Include="System.Composition.AttributedModel, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
76-
<HintPath>..\packages\System.Composition.AttributedModel.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.AttributedModel.dll</HintPath>
77-
</Reference>
78-
<Reference Include="System.Composition.Convention, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
79-
<HintPath>..\packages\System.Composition.Convention.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Convention.dll</HintPath>
80-
</Reference>
81-
<Reference Include="System.Composition.Hosting, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
82-
<HintPath>..\packages\System.Composition.Hosting.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Hosting.dll</HintPath>
83-
</Reference>
84-
<Reference Include="System.Composition.Runtime, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
85-
<HintPath>..\packages\System.Composition.Runtime.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.Runtime.dll</HintPath>
86-
</Reference>
87-
<Reference Include="System.Composition.TypedParts, Version=1.0.31.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
88-
<HintPath>..\packages\System.Composition.TypedParts.1.0.31\lib\portable-net45+win8+wp8+wpa81\System.Composition.TypedParts.dll</HintPath>
89-
</Reference>
9054
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
9155
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
9256
</Reference>
@@ -98,9 +62,6 @@
9862
<HintPath>..\packages\System.Diagnostics.StackTrace.4.3.0\lib\net46\System.Diagnostics.StackTrace.dll</HintPath>
9963
</Reference>
10064
<Reference Include="System.Drawing" />
101-
<Reference Include="System.Drawing.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
102-
<HintPath>..\packages\System.Drawing.Primitives.4.3.0\lib\net45\System.Drawing.Primitives.dll</HintPath>
103-
</Reference>
10465
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
10566
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
10667
</Reference>
@@ -111,21 +72,6 @@
11172
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
11273
</Reference>
11374
<Reference Include="System.Numerics" />
114-
<Reference Include="System.Reactive.Core, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
115-
<HintPath>..\packages\System.Reactive.Core.3.1.1\lib\net46\System.Reactive.Core.dll</HintPath>
116-
</Reference>
117-
<Reference Include="System.Reactive.Interfaces, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
118-
<HintPath>..\packages\System.Reactive.Interfaces.3.1.1\lib\net45\System.Reactive.Interfaces.dll</HintPath>
119-
</Reference>
120-
<Reference Include="System.Reactive.Linq, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
121-
<HintPath>..\packages\System.Reactive.Linq.3.1.1\lib\net46\System.Reactive.Linq.dll</HintPath>
122-
</Reference>
123-
<Reference Include="System.Reactive.PlatformServices, Version=3.0.3000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
124-
<HintPath>..\packages\System.Reactive.PlatformServices.3.1.1\lib\net46\System.Reactive.PlatformServices.dll</HintPath>
125-
</Reference>
126-
<Reference Include="System.Reactive.Windows.Threading, Version=3.0.1000.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL">
127-
<HintPath>..\packages\System.Reactive.Windows.Threading.3.1.1\lib\net45\System.Reactive.Windows.Threading.dll</HintPath>
128-
</Reference>
12975
<Reference Include="System.Reflection.Metadata, Version=1.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
13076
<HintPath>..\packages\System.Reflection.Metadata.1.4.2\lib\portable-net45+win8\System.Reflection.Metadata.dll</HintPath>
13177
</Reference>
@@ -225,6 +171,5 @@
225171
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
226172
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.1.1.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
227173
</ItemGroup>
228-
<ItemGroup />
229174
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
230175
</Project>

0 commit comments

Comments
 (0)