http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/LocationDotNetSample.csproj ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/LocationDotNetSample.csproj b/samples/locationSample/LocationDotNetSample/LocationDotNetSample.csproj new file mode 100644 index 0000000..e67e559 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/LocationDotNetSample.csproj @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<Project ToolsVersion="12.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> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{6F830639-6E84-4FBC-B975-49521F30DE83}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>LocationDotNetSample</RootNamespace> + <AssemblyName>LocationDotNetSample</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <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' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="BSE.Windows.Forms"> + <HintPath>bin\BSE.Windows.Forms.dll</HintPath> + </Reference> + <Reference Include="Geocoder"> + <HintPath>..\packages\Geocoder.0.1.0.0\lib\net45\Geocoder.dll</HintPath> + </Reference> + <Reference Include="GMap.NET.Core"> + <HintPath>bin\GMap.NET.Core.dll</HintPath> + </Reference> + <Reference Include="GMap.NET.WindowsForms"> + <HintPath>bin\GMap.NET.WindowsForms.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\..\GitHub\usergrid-.net-sdk\Usergrid.Sdk\bin\Debug\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="RestSharp"> + <HintPath>..\..\..\..\GitHub\usergrid-.net-sdk\Usergrid.Sdk\bin\Debug\RestSharp.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Usergrid.Sdk"> + <HintPath>..\..\..\..\GitHub\usergrid-.net-sdk\Usergrid.Sdk\bin\Debug\Usergrid.Sdk.dll</HintPath> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="Form1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Form1.Designer.cs"> + <DependentUpon>Form1.cs</DependentUpon> + </Compile> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Store.cs" /> + <EmbeddedResource Include="Form1.resx"> + <DependentUpon>Form1.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.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. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/Program.cs ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/Program.cs b/samples/locationSample/LocationDotNetSample/Program.cs new file mode 100644 index 0000000..4664ffc --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/Program.cs @@ -0,0 +1,37 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace LocationDotNetSample +{ + static class Program + { + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/Properties/AssemblyInfo.cs ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/Properties/AssemblyInfo.cs b/samples/locationSample/LocationDotNetSample/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2e05189 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/Properties/AssemblyInfo.cs @@ -0,0 +1,51 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System.Reflection; +using System.Runtime.CompilerServices; +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("LocationDotNetSample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LocationDotNetSample")] +[assembly: AssemblyCopyright("Copyright © 2013")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9bd68350-c7a0-4b65-aa3a-ee530c4ba987")] + +// 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")] http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/Properties/Resources.Designer.cs ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/Properties/Resources.Designer.cs b/samples/locationSample/LocationDotNetSample/Properties/Resources.Designer.cs new file mode 100644 index 0000000..c84f483 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/Properties/Resources.Designer.cs @@ -0,0 +1,86 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.18331 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace LocationDotNetSample.Properties +{ + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LocationDotNetSample.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/Properties/Resources.resx ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/Properties/Resources.resx b/samples/locationSample/LocationDotNetSample/Properties/Resources.resx new file mode 100644 index 0000000..e65c186 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/Properties/Resources.resx @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/Properties/Settings.Designer.cs ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/Properties/Settings.Designer.cs b/samples/locationSample/LocationDotNetSample/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b9ab418 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/Properties/Settings.Designer.cs @@ -0,0 +1,45 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.18331 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace LocationDotNetSample.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/Properties/Settings.settings ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/Properties/Settings.settings b/samples/locationSample/LocationDotNetSample/Properties/Settings.settings new file mode 100644 index 0000000..a3b7316 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/Properties/Settings.settings @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='utf-8'?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/Store.cs ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/Store.cs b/samples/locationSample/LocationDotNetSample/Store.cs new file mode 100644 index 0000000..2b28744 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/Store.cs @@ -0,0 +1,45 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LocationDotNetSample +{ + class Store + { + public string uuid { get; set; } + public string type { get; set; } + public string name { get; set; } + public string[] hours { get; set; } + public location location { get; set; } + public string pharmacy { get; set; } + public string[] services { get; set; } + public string storeNumber { get; set; } + public string supertarget { get; set; } + + } + + class location + { + public string stateCode { get; set; } + public string latitude { get; set; } + public string longitude { get; set; } + public string displayAddress { get; set; } + } +} http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/LocationDotNetSample/packages.config ---------------------------------------------------------------------- diff --git a/samples/locationSample/LocationDotNetSample/packages.config b/samples/locationSample/LocationDotNetSample/packages.config new file mode 100644 index 0000000..0b04b25 --- /dev/null +++ b/samples/locationSample/LocationDotNetSample/packages.config @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<packages> + <package id="Geocoder" version="0.1.0.0" targetFramework="net45" /> +</packages> http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/ReadMe.md ---------------------------------------------------------------------- diff --git a/samples/locationSample/ReadMe.md b/samples/locationSample/ReadMe.md new file mode 100644 index 0000000..6283f6f --- /dev/null +++ b/samples/locationSample/ReadMe.md @@ -0,0 +1,20 @@ +#App Services .NET Location-based sample application + +##Setup Instructions +First, you must load the store data into a collection on your App Services org. This is done with the following curl command: + curl -X POST -d '@stores.json' https://api.usergrid.com/<YOUR ORGANIZATION>/<YOUR APP>/<YOUR COLLECTION> +Next you must make sure all of your references are in order. It is assumed that you have already built the App Services .NET SDK and have those +available. From within Visual Studio, choose Project > Add Reference and be sure to add references to: +- Usergrid.Sdk.dll +- RestSharp.dll += Newtonsoft.Json.dll +Then, you will need to add references to the GMap.Net libraries +- GMap.NET.Core.dll +- GMap.NET.WindowsForm.dll +These files can be found off the Hot Build page at http://greatmaps.codeplex.com/releases/view/73162 +Next, install the Geocoding NuGet library by typing "Install-Package Geocoder" in the Package Manager + +In the file Form1.cs, change the org and app names to match your account. Note that it is assumed you are using a sandbox account that does not +require a separate login step. If that is not the case, add a call to client.Login() with the appropriate credentials. + +After these setup steps, you should be able to compile and run the application. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nupkg ---------------------------------------------------------------------- diff --git a/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nupkg b/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nupkg new file mode 100644 index 0000000..9bd73ef Binary files /dev/null and b/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nupkg differ http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nuspec ---------------------------------------------------------------------- diff --git a/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nuspec b/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nuspec new file mode 100644 index 0000000..ffd289a --- /dev/null +++ b/samples/locationSample/packages/Geocoder.0.1.0.0/Geocoder.0.1.0.0.nuspec @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> + <metadata> + <id>Geocoder</id> + <version>0.1.0.0</version> + <title>Geocoder</title> + <authors>Brandon Montgomery</authors> + <owners>Brandon Montgomery</owners> + <projectUrl>http://github.com/bmontgomery/Geocoder</projectUrl> + <requireLicenseAcceptance>false</requireLicenseAcceptance> + <description>A simple .NET library which utilizes Google's Geocoding API to geocode street addresses.</description> + <releaseNotes /> + <copyright>Copyright 2013</copyright> + <tags>Geocoding .NET</tags> + </metadata> +</package> http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/packages/Geocoder.0.1.0.0/README.txt ---------------------------------------------------------------------- diff --git a/samples/locationSample/packages/Geocoder.0.1.0.0/README.txt b/samples/locationSample/packages/Geocoder.0.1.0.0/README.txt new file mode 100644 index 0000000..930ec73 --- /dev/null +++ b/samples/locationSample/packages/Geocoder.0.1.0.0/README.txt @@ -0,0 +1,3 @@ +Apache Software Foundation policy prevents us from including DLLs and other binary files in our releases. + +You will have to download this package and place it in this directory yourself. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/packages/Geocoder.0.1.0.0/lib/net45/Geocoder.dll ---------------------------------------------------------------------- diff --git a/samples/locationSample/packages/Geocoder.0.1.0.0/lib/net45/Geocoder.dll b/samples/locationSample/packages/Geocoder.0.1.0.0/lib/net45/Geocoder.dll new file mode 100644 index 0000000..f07998d Binary files /dev/null and b/samples/locationSample/packages/Geocoder.0.1.0.0/lib/net45/Geocoder.dll differ http://git-wip-us.apache.org/repos/asf/usergrid-dotnet/blob/94c0483c/samples/locationSample/packages/repositories.config ---------------------------------------------------------------------- diff --git a/samples/locationSample/packages/repositories.config b/samples/locationSample/packages/repositories.config new file mode 100644 index 0000000..480990e --- /dev/null +++ b/samples/locationSample/packages/repositories.config @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<repositories> + <repository path="..\LocationDotNetSample\packages.config" /> +</repositories>