From 059f34c74da8c5696bcb32c34e1224b1876039f7 Mon Sep 17 00:00:00 2001 From: Mark Trinder Date: Tue, 20 May 2014 08:38:09 +1000 Subject: [PATCH] Added Xamarin.iOS library for Xero Api --- .gitignore | 3 +- source/XeroApi/MimeTypes.cs | 4 + source/XeroApi/XeroApi.MonoTouch.csproj | 186 ++++++++++++++++++++++++ source/XeroApi/XeroApi.MonoTouch.sln | 20 +++ 4 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 source/XeroApi/XeroApi.MonoTouch.csproj create mode 100644 source/XeroApi/XeroApi.MonoTouch.sln diff --git a/.gitignore b/.gitignore index 2eeefdc..e383428 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ _ReSharper* *resharper* *.suo *.cache -* Thumbs.db \ No newline at end of file +* Thumbs.db +*.userprefs diff --git a/source/XeroApi/MimeTypes.cs b/source/XeroApi/MimeTypes.cs index 854d523..97a9989 100644 --- a/source/XeroApi/MimeTypes.cs +++ b/source/XeroApi/MimeTypes.cs @@ -23,6 +23,7 @@ public static class MimeTypes // Taken from http://stackoverflow.com/questions/58510/using-net-how-can-you-find-the-mime-type-of-a-file-based-on-the-file-signature public static string GetMimeType(FileInfo fileInfo) { + #if !__IOS string mimeType = "application/unknown"; RegistryKey regKey = Registry.ClassesRoot.OpenSubKey(fileInfo.Extension.ToLower(), RegistryKeyPermissionCheck.ReadSubTree); @@ -36,6 +37,9 @@ public static string GetMimeType(FileInfo fileInfo) } return mimeType; + #else + return Unknown; + #endif } public static string GetMimeType(string fileName) diff --git a/source/XeroApi/XeroApi.MonoTouch.csproj b/source/XeroApi/XeroApi.MonoTouch.csproj new file mode 100644 index 0000000..b25d799 --- /dev/null +++ b/source/XeroApi/XeroApi.MonoTouch.csproj @@ -0,0 +1,186 @@ + + + + Debug + AnyCPU + 10.0.0 + 2.0 + {5827049A-5B3A-479C-8CBF-CCE370871E4D} + {6BC8ED88-2882-458C-8E55-DFD12B67127B};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Library + XeroApi.MonoTouch + Resources + XeroApi.MonoTouch + + + true + full + false + bin\Debug + DEBUG;__IOS; + prompt + 4 + false + + + full + true + bin\Release + prompt + 4 + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/XeroApi/XeroApi.MonoTouch.sln b/source/XeroApi/XeroApi.MonoTouch.sln new file mode 100644 index 0000000..269542b --- /dev/null +++ b/source/XeroApi/XeroApi.MonoTouch.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XeroApi.MonoTouch", "XeroApi.MonoTouch.csproj", "{5827049A-5B3A-479C-8CBF-CCE370871E4D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5827049A-5B3A-479C-8CBF-CCE370871E4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5827049A-5B3A-479C-8CBF-CCE370871E4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5827049A-5B3A-479C-8CBF-CCE370871E4D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5827049A-5B3A-479C-8CBF-CCE370871E4D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = XeroApi.MonoTouch.csproj + EndGlobalSection +EndGlobal