diff --git a/MessageSender/MessageSender.xproj b/MessageSender/MessageSender.xproj deleted file mode 100644 index 222981f4..00000000 --- a/MessageSender/MessageSender.xproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - 2f4ae1ac-5311-483b-ab03-f8bfdf998f29 - MessageSender - .\obj - .\bin\ - v4.5.2 - - - 2.0 - - - True - - - \ No newline at end of file diff --git a/MessageSender/MessageSender.xproj.user b/MessageSender/MessageSender.xproj.user deleted file mode 100644 index bc5e9832..00000000 --- a/MessageSender/MessageSender.xproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - console1 - - \ No newline at end of file diff --git a/MessageSender/Program.cs b/MessageSender/Program.cs deleted file mode 100644 index 7bd387f0..00000000 --- a/MessageSender/Program.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Text; -using System.Threading.Tasks; -using Newtonsoft.Json.Linq; - -namespace MessageSender -{ - public class Program - { - public const string API_KEY = "AIzaSyDwPlu2ky9AoPwDvThoXxJwqiPq-Tc8p8k"; - public const string MESSAGE = "Hello, Xamarin!"; - - static void Main(string[] args) - { - var jGcmData = new JObject(); - var jData = new JObject(); - - jData.Add("message", MESSAGE); - jGcmData.Add("to", "/topics/global"); - jGcmData.Add("data", jData); - - var url = new Uri("https://gcm-http.googleapis.com/gcm/send"); - try - { - using (var client = new HttpClient()) - { - client.DefaultRequestHeaders.Accept.Add( - new MediaTypeWithQualityHeaderValue("application/json")); - - client.DefaultRequestHeaders.TryAddWithoutValidation( - "Authorization", "key=" + API_KEY); - - Task.WaitAll(client.PostAsync(url, - new StringContent(jGcmData.ToString(), Encoding.Default, "application/json")) - .ContinueWith(response => - { - Console.WriteLine(response); - Console.WriteLine("Message sent: check the client device notification tray."); - })); - } - } - catch (Exception e) - { - Console.WriteLine("Unable to send GCM message:"); - Console.Error.WriteLine(e.StackTrace); - } - } - } -} diff --git a/MessageSender/Properties/AssemblyInfo.cs b/MessageSender/Properties/AssemblyInfo.cs deleted file mode 100644 index b99a04e3..00000000 --- a/MessageSender/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -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: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MessageSender")] -[assembly: AssemblyTrademark("")] - -// 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("2f4ae1ac-5311-483b-ab03-f8bfdf998f29")] diff --git a/MessageSender/Properties/launchSettings.json b/MessageSender/Properties/launchSettings.json deleted file mode 100644 index 3a2cb634..00000000 --- a/MessageSender/Properties/launchSettings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "profiles": { - "console1": {} - } -} \ No newline at end of file diff --git a/MessageSender/project.json b/MessageSender/project.json deleted file mode 100644 index 2d200be1..00000000 --- a/MessageSender/project.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "emitEntryPoint": true - }, - - "dependencies": { - "Microsoft.NETCore.App": { - "type": "build", - "version": "1.0.0-rc2-3002702" - }, - "Newtonsoft.Json": "9.0.1" - }, - - "frameworks": { - "dnx451": {"compilationOptions": {"emitEntryPoint": true}}, - "netcoreapp1.0": { - "imports": "dnxcore50" - } - } -} diff --git a/MessageSender/project.lock.json b/MessageSender/project.lock.json deleted file mode 100644 index 3535509f..00000000 --- a/MessageSender/project.lock.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "locked": false, - "version": 2, - "targets": { - "DNX,Version=v4.5.1": { - "Microsoft.NETCore.App/1.0.0-rc2-3002702": { - "type": "package" - }, - "Newtonsoft.Json/9.0.1": { - "type": "package", - "compile": { - "lib/net45/Newtonsoft.Json.dll": {} - }, - "runtime": { - "lib/net45/Newtonsoft.Json.dll": {} - } - } - }, - "DNX,Version=v4.5.1/win7-x86": { - "Microsoft.NETCore.App/1.0.0-rc2-3002702": { - "type": "package" - }, - "Newtonsoft.Json/9.0.1": { - "type": "package", - "compile": { - "lib/net45/Newtonsoft.Json.dll": {} - }, - "runtime": { - "lib/net45/Newtonsoft.Json.dll": {} - } - } - }, - "DNX,Version=v4.5.1/win7-x64": { - "Microsoft.NETCore.App/1.0.0-rc2-3002702": { - "type": "package" - }, - "Newtonsoft.Json/9.0.1": { - "type": "package", - "compile": { - "lib/net45/Newtonsoft.Json.dll": {} - }, - "runtime": { - "lib/net45/Newtonsoft.Json.dll": {} - } - } - } - }, - "libraries": { - "Microsoft.NETCore.App/1.0.0-rc2-3002702": { - "type": "package", - "sha512": "G+wsg7zwathgjAOZ2w0XbHU0MD4GEHIpi/JsvBGmbACW+/Dsx2YoXai7LLItfe5ZVidqBXXQCz8NxCKbKqr8Ww==", - "files": [ - "dotnet_library_license.txt", - "Microsoft.NETCore.App.1.0.0-rc2-3002702.nupkg", - "Microsoft.NETCore.App.1.0.0-rc2-3002702.nupkg.sha512", - "Microsoft.NETCore.App.nuspec", - "ThirdPartyNotices.txt" - ] - }, - "Newtonsoft.Json/9.0.1": { - "type": "package", - "sha512": "U82mHQSKaIk+lpSVCbWYKNavmNH1i5xrExDEquU1i6I5pV6UMOqRnJRSlKO3cMPfcpp0RgDY+8jUXHdQ4IfXvw==", - "files": [ - "lib/net20/Newtonsoft.Json.dll", - "lib/net20/Newtonsoft.Json.xml", - "lib/net35/Newtonsoft.Json.dll", - "lib/net35/Newtonsoft.Json.xml", - "lib/net40/Newtonsoft.Json.dll", - "lib/net40/Newtonsoft.Json.xml", - "lib/net45/Newtonsoft.Json.dll", - "lib/net45/Newtonsoft.Json.xml", - "lib/netstandard1.0/Newtonsoft.Json.dll", - "lib/netstandard1.0/Newtonsoft.Json.xml", - "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll", - "lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.xml", - "lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll", - "lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.xml", - "Newtonsoft.Json.9.0.1.nupkg", - "Newtonsoft.Json.9.0.1.nupkg.sha512", - "Newtonsoft.Json.nuspec", - "tools/install.ps1" - ] - } - }, - "projectFileDependencyGroups": { - "": [ - "Microsoft.NETCore.App >= 1.0.0-rc2-3002702", - "Newtonsoft.Json >= 9.0.1" - ], - "DNX,Version=v4.5.1": [] - } -} \ No newline at end of file