Used shared project + rename namespace

This commit is contained in:
mort5161 2014-07-25 10:41:25 -07:00
parent fed66b6fa4
commit 254da8a14c
21 changed files with 76 additions and 53 deletions

View file

@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using BTDevices.Nmea;
using BTDevices.Nmea.Gps;
using NmeaParser.Nmea;
using NmeaParser.Nmea.Gps;
namespace BTDevices.Tests
namespace NmeaParser.Tests
{
[TestClass]
public class NmeaMessages

View file

@ -136,7 +136,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BTDevices\BTDevices.WinStore.csproj">
<ProjectReference Include="..\NmeaParser\NmeaParser.WinStore.csproj">
<Project>{62a55887-10f5-40d2-9352-96246d1b11d3}</Project>
<Name>BTDevices.WinStore</Name>
</ProjectReference>

View file

@ -6,10 +6,10 @@
Version="1.0.0.0" />
<Properties>
<DisplayName>BTDevices.Tests</DisplayName>
<DisplayName>NmeaParser.Tests</DisplayName>
<PublisherDisplayName>mort5161</PublisherDisplayName>
<Logo>Images\UnitTestStoreLogo.png</Logo>
<Description>BTDevices.Tests</Description>
<Description>NmeaParser.Tests</Description>
</Properties>
<Prerequisites>

View file

@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BTDevices.Tests")]
[assembly: AssemblyTitle("NmeaParser.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BTDevices.Tests")]
[assembly: AssemblyProduct("NmeaParser.Tests")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

View file

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
VisualStudioVersion = 12.0.30501.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WinPhone", "WinPhone", "{26A0F6A9-4B11-46F4-BB01-50D37D1C3CB4}"
EndProject
@ -13,7 +13,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NmeaParser.Tests", "NmeaPar
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NmeaParser.WinPhone", "NmeaParser\NmeaParser.WinPhone.csproj", "{EA42A713-BC6E-4914-B54B-47C0891B7421}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "NmeaParser.Shared", "NmeaParser\NmeaParser.Shared\NmeaParser.Shared.shproj", "{E15EDBD9-0356-422B-8C29-18833787356E}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
NmeaParser\NmeaParser.Shared\NmeaParser.Shared.projitems*{62a55887-10f5-40d2-9352-96246d1b11d3}*SharedItemsImports = 4
NmeaParser\NmeaParser.Shared\NmeaParser.Shared.projitems*{e15edbd9-0356-422b-8c29-18833787356e}*SharedItemsImports = 13
NmeaParser\NmeaParser.Shared\NmeaParser.Shared.projitems*{ea42a713-bc6e-4914-b54b-47c0891b7421}*SharedItemsImports = 4
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
@ -84,8 +91,8 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{EA42A713-BC6E-4914-B54B-47C0891B7421} = {26A0F6A9-4B11-46F4-BB01-50D37D1C3CB4}
{62A55887-10F5-40D2-9352-96246D1B11D3} = {07131E3E-1C4E-41CB-BD14-7950AA858A23}
{5B5BAF9D-3FB9-47F9-AE07-B8CC43EC887C} = {07131E3E-1C4E-41CB-BD14-7950AA858A23}
{EA42A713-BC6E-4914-B54B-47C0891B7421} = {26A0F6A9-4B11-46F4-BB01-50D37D1C3CB4}
EndGlobalSection
EndGlobal

View file

@ -15,7 +15,7 @@ using Windows.Foundation;
using BTDevice = Windows.Networking.Proximity.PeerInformation;
#endif
namespace BTDevices
namespace NmeaParser
{
public abstract class Device : IDisposable
{

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea.Gps
namespace NmeaParser.Nmea.Gps
{
/// <summary>
/// Recommended Minimum

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea.Gps
namespace NmeaParser.Nmea.Gps
{
/// <summary>
/// Recommended Minimum

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea
namespace NmeaParser.Nmea
{
/// <summary>
/// Laser Range Measurement

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea.LaserTech.LaserRange
namespace NmeaParser.Nmea.LaserTech.LaserRange
{
/// <summary>
/// Laser Range

View file

@ -11,7 +11,7 @@ using BTDevice = Windows.Networking.Proximity.PeerInformation;
#endif
using Windows.Foundation;
namespace BTDevices
namespace NmeaParser
{
public class NmeaDevice : Device
{
@ -37,7 +37,7 @@ namespace BTDevices
{
try
{
var msg = BTDevices.Nmea.NmeaMessage.Parse(p);
var msg = NmeaParser.Nmea.NmeaMessage.Parse(p);
if (msg != null)
OnMessageReceived(msg);
}

View file

@ -5,7 +5,7 @@ using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea
namespace NmeaParser.Nmea
{
public class NmeaMessageType : Attribute { public string Type { get; set; } }

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea.Trimble.LaserRange
namespace NmeaParser.Nmea.Trimble.LaserRange
{
/// <summary>
/// Burden finder

View file

@ -5,7 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea.Trimble.LaserRange
namespace NmeaParser.Nmea.Trimble.LaserRange
{
/// <summary>
/// Tree Measurement

View file

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BTDevices.Nmea
namespace NmeaParser.Nmea
{
public class UnknownMessage : NmeaMessage
{

View file

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>e15edbd9-0356-422b-8c29-18833787356e</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>NmeaParser.Shared</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Nmea\Device.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\Gps\GPGGA.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\Gps\GPRMC.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\LaserRangeMessage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\LaserTech\LaserRange\PLTIT.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\NmeaDevice.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\NmeaMessage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\Trimble\LaserRange\PTNLA.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\Trimble\LaserRange\PTNLB.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Nmea\UnknownMessage.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Nmea\Gps\Garmin\" />
<Folder Include="$(MSBuildThisFileDirectory)Nmea\Navigation\" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>e15edbd9-0356-422b-8c29-18833787356e</ProjectGuid>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="NmeaParser.Shared.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>

View file

@ -9,8 +9,8 @@
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BTDevices</RootNamespace>
<AssemblyName>BTDevices.WinPhone</AssemblyName>
<RootNamespace>NmeaParser</RootNamespace>
<AssemblyName>NmeaParser.WinPhone</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
@ -41,22 +41,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Device.cs" />
<Compile Include="NmeaDevice.cs" />
<Compile Include="Nmea\Gps\Garmin\PGRME.cs" />
<Compile Include="Nmea\Gps\GPGGA.cs" />
<Compile Include="Nmea\Gps\GPRMC.cs" />
<Compile Include="Nmea\LaserRangeMessage.cs" />
<Compile Include="Nmea\LaserTech\LaserRange\PLTIT.cs" />
<Compile Include="Nmea\NmeaMessage.cs" />
<Compile Include="Nmea\Trimble\LaserRange\PTNLA.cs" />
<Compile Include="Nmea\Trimble\LaserRange\PTNLB.cs" />
<Compile Include="Nmea\UnknownMessage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="Nmea\Navigation\" />
</ItemGroup>
<ItemGroup />
<Import Project="NmeaParser.Shared\NmeaParser.Shared.projitems" Label="Shared" Condition="Exists('NmeaParser.Shared\NmeaParser.Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />

View file

@ -9,8 +9,8 @@
<ProjectGuid>{62A55887-10F5-40D2-9352-96246D1B11D3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BTDevices</RootNamespace>
<AssemblyName>BTDevices.WinStore</AssemblyName>
<RootNamespace>NmeaParser</RootNamespace>
<AssemblyName>NmeaParser.WinStore</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
@ -36,25 +36,14 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<Folder Include="Nmea\Gps\Garmin\" />
<Folder Include="Nmea\Navigation\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Device.cs" />
<Compile Include="NmeaDevice.cs" />
<Compile Include="Nmea\Gps\GPGGA.cs" />
<Compile Include="Nmea\Gps\GPRMC.cs" />
<Compile Include="Nmea\LaserTech\LaserRange\PLTIT.cs" />
<Compile Include="Nmea\LaserRangeMessage.cs" />
<Compile Include="Nmea\NmeaMessage.cs" />
<Compile Include="Nmea\Trimble\LaserRange\PTNLA.cs" />
<Compile Include="Nmea\Trimble\LaserRange\PTNLB.cs" />
<Compile Include="Nmea\UnknownMessage.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="NmeaParser.Shared\NmeaParser.Shared.projitems" Label="Shared" Condition="Exists('NmeaParser.Shared\NmeaParser.Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BTDevices")]
[assembly: AssemblyTitle("NmeaParser")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BTDevices")]
[assembly: AssemblyProduct("NmeaParser")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]