add openhack files

This commit is contained in:
Ryan Peters
2022-11-03 16:41:13 -04:00
commit b2c9f7e29f
920 changed files with 118861 additions and 0 deletions

View File

@ -0,0 +1,22 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using System.Collections.Generic;
using System.Threading.Tasks;
namespace MyDriving.DataStore.Abstractions
{
public interface IBaseStore<T>
{
string Identifier { get; }
Task InitializeStoreAsync();
Task<IEnumerable<T>> GetItemsAsync(int skip = 0, int take = 100, bool forceRefresh = false);
Task<T> GetItemAsync(string id);
Task<bool> InsertAsync(T item);
Task<bool> UpdateAsync(T item);
Task<bool> RemoveAsync(T item);
Task<bool> RemoveItemsAsync(IEnumerable<T> items);
Task<bool> SyncAsync();
Task<bool> DropTable();
}
}

View File

@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using MyDriving.DataObjects;
namespace MyDriving.DataStore.Abstractions
{
public interface IHubIOTStore : IBaseStore<IOTHubData>
{
}
}

View File

@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using MyDriving.DataObjects;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace MyDriving.DataStore.Abstractions
{
public interface IPOIStore : IBaseStore<POI>
{
Task<IEnumerable<POI>> GetItemsAsync(string tripId);
}
}

View File

@ -0,0 +1,14 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using MyDriving.DataObjects;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace MyDriving.DataStore.Abstractions
{
public interface IPhotoStore : IBaseStore<Photo>
{
Task<IEnumerable<Photo>> GetTripPhotos(string tripId);
}
}

View File

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using System.Threading.Tasks;
namespace MyDriving.DataStore.Abstractions
{
public interface IStoreManager
{
bool IsInitialized { get; }
ITripStore TripStore { get; }
IPhotoStore PhotoStore { get; }
IUserStore UserStore { get; }
IHubIOTStore IOTHubStore { get; }
IPOIStore POIStore { get; }
ITripPointStore TripPointStore { get; }
Task<bool> SyncAllAsync(bool syncUserSpecific);
Task DropEverythingAsync();
Task InitializeAsync();
}
}

View File

@ -0,0 +1,14 @@
using MyDriving.DataObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyDriving.DataStore.Abstractions
{
public interface ITripPointStore : IBaseStore<TripPoint>
{
Task<IEnumerable<TripPoint>> GetPointsForTripAsync(string id);
}
}

View File

@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using MyDriving.DataObjects;
namespace MyDriving.DataStore.Abstractions
{
public interface ITripStore : IBaseStore<Trip>
{
}
}

View File

@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using MyDriving.DataObjects;
namespace MyDriving.DataStore.Abstractions
{
public interface IUserStore : IBaseStore<UserProfile>
{
}
}

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{649300CE-70EA-4606-983F-F4476FDD6C7E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MyDriving.DataStore.Abstractions</RootNamespace>
<AssemblyName>MyDriving.DataStore.Abstractions</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'XTC|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\XTC</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="IBaseStore.cs" />
<Compile Include="IHubIOTStore.cs" />
<Compile Include="IPOIStore.cs" />
<Compile Include="ITripPointStore.cs" />
<Compile Include="ITripStore.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="IStoreManager.cs" />
<Compile Include="IPhotoStore.cs" />
<Compile Include="IUserStore.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.WindowsAzure.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Client.2.0.1\lib\portable-win+net45+wp8+wpa81+monotouch+monoandroid\Microsoft.WindowsAzure.Mobile.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Mobile.SQLiteStore, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<HintPath>..\..\packages\Microsoft.Azure.Mobile.Client.SQLiteStore.2.0.1\lib\portable-win+net45+wp8+wpa81+monotouch+monoandroid\Microsoft.WindowsAzure.Mobile.SQLiteStore.dll</HintPath>
</Reference>
<Reference Include="MvvmHelpers, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\..\packages\Refractored.MvvmHelpers.1.0.1\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+UAP10\MvvmHelpers.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Plugin.Connectivity, Version=2.1.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xam.Plugin.Connectivity.2.1.2\lib\portable-net45+wp80+wp81+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+Xamarin.Mac20+UAP10\Plugin.Connectivity.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Plugin.Connectivity.Abstractions, Version=2.1.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Xam.Plugin.Connectivity.2.1.2\lib\portable-net45+wp80+wp81+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10+Xamarin.Mac20+UAP10\Plugin.Connectivity.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SQLitePCL, Version=3.8.7.2, Culture=neutral, PublicKeyToken=bddade01e9c850c5">
<HintPath>..\..\packages\SQLitePCL.3.8.7.2\lib\portable-net45+sl50+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10\SQLitePCL.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8\System.Net.Http.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\portable-net45+win8\System.Net.Http.Primitives.dll</HintPath>
</Reference>
<Reference Include="Plugin.EmbeddedResource">
<HintPath>..\..\packages\Xam.Plugin.EmbeddedResource.1.0.1.0\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Plugin.EmbeddedResource.dll</HintPath>
</Reference>
<Reference Include="PCLStorage">
<HintPath>..\..\packages\PCLStorage.1.0.2\lib\portable-net45+wp8+wpa81+win8+monoandroid+monotouch+Xamarin.iOS+Xamarin.Mac\PCLStorage.dll</HintPath>
</Reference>
<Reference Include="PCLStorage.Abstractions">
<HintPath>..\..\packages\PCLStorage.1.0.2\lib\portable-net45+wp8+wpa81+win8+monoandroid+monotouch+Xamarin.iOS+Xamarin.Mac\PCLStorage.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Humanizer">
<HintPath>..\..\packages\Humanizer.Core.2.0.1\lib\portable-win+net45+wp8+wpa81\Humanizer.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="..\MyDriving.DataObjects\MyDriving.DataObjects.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
</Target>
<!-- 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.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<ProjectReference Include="..\MyDriving.Utils\MyDriving.Utils.csproj">
<Project>{CEF8CB82-B2BF-42D0-998C-8C50A4CA7AE6}</Project>
<Name>MyDriving.Utils</Name>
</ProjectReference>
</ItemGroup>
</Project>

View File

@ -0,0 +1,33 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.
using System.Resources;
using System.Reflection;
// 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("MyDriving.DataStore.Abstractions")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MyDriving.DataStore.Abstractions")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: NeutralResourcesLanguage("en")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.29.0" newVersion="4.2.29.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="PCLStorage.Abstractions" publicKeyToken="286fe515a2c35b64" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.2.0" newVersion="1.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="PCLStorage" publicKeyToken="286fe515a2c35b64" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.2.0" newVersion="1.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Humanizer" version="2.0.1" targetFramework="portable-net45+win+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10" />
<package id="Humanizer.Core" version="2.0.1" targetFramework="portable-net45+win+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10" />
<package id="Microsoft.Azure.Mobile.Client" version="2.0.1" targetFramework="portable45-net45+win8" />
<package id="Microsoft.Azure.Mobile.Client.SQLiteStore" version="2.0.1" targetFramework="portable45-net45+win8" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="portable45-net45+win8" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="portable45-net45+win8" />
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="portable45-net45+win8" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="portable45-net45+win8" />
<package id="PCLStorage" version="1.0.2" targetFramework="portable-net45+win+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10" />
<package id="Refractored.MvvmHelpers" version="1.0.1" targetFramework="portable45-net45+win8" />
<package id="SQLitePCL" version="3.8.7.2" targetFramework="portable45-net45+win8" />
<package id="Xam.Plugin.Connectivity" version="2.1.2" targetFramework="portable45-net45+win8" />
<package id="Xam.Plugin.EmbeddedResource" version="1.0.1.0" targetFramework="portable-net45+win+MonoTouch10+MonoAndroid10+xamarinmac20+xamarinios10" />
</packages>