This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree 2 files changed +30
-4
lines changed
2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 23
23
#if ! __IOS__
24
24
using System . Reflection . Emit ;
25
25
using FastMember = ServiceStack . Text . FastMember ;
26
- #elif __UNIFIED__
26
+ #endif
27
+
28
+ #if __UNIFIED__
27
29
using Preserve = Foundation . PreserveAttribute ;
28
- #else
30
+ #elif __IOS__
29
31
using Preserve = MonoTouch . Foundation . PreserveAttribute ;
30
32
#endif
31
33
@@ -125,6 +127,7 @@ public override void RegisterLicenseFromConfig()
125
127
{
126
128
#if ANDROID
127
129
#elif __IOS__
130
+ #elif __MAC__
128
131
#else
129
132
//Automatically register license key stored in <appSettings/>
130
133
var licenceKeyText = System . Configuration . ConfigurationManager . AppSettings [ AppSettingsKey ] ;
@@ -670,7 +673,25 @@ private static DynamicMethod CreateDynamicSetMethod(MemberInfo memberInfo)
670
673
#endif
671
674
}
672
675
673
- #if __IOS__
676
+ #if __MAC__
677
+ public class MacPclExport : IosPclExport
678
+ {
679
+ public static new MacPclExport Provider = new MacPclExport ( ) ;
680
+
681
+ public MacPclExport ( )
682
+ {
683
+ PlatformName = "MAC" ;
684
+ SupportsEmit = SupportsExpression = true ;
685
+ }
686
+
687
+ public new static void Configure ( )
688
+ {
689
+ Configure ( Provider ) ;
690
+ }
691
+ }
692
+ #endif
693
+
694
+ #if __IOS__ || __MAC__
674
695
[ Preserve ( AllMembers = true ) ]
675
696
internal class Poco
676
697
{
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ public static class Platforms
22
22
{
23
23
public const string WindowsStore = "WindowsStore" ;
24
24
public const string Android = "Android" ;
25
- public const string IOS = "IOS" ;
25
+ public const string IOS = "IOS" ;
26
+ public const string Mac = "MAC" ;
26
27
public const string Silverlight5 = "Silverlight5" ;
27
28
public const string WindowsPhone = "WindowsPhone" ;
28
29
}
@@ -40,6 +41,8 @@ public static PclExport Instance
40
41
= new XboxPclExport ( )
41
42
#elif __IOS__
42
43
= new IosPclExport ( )
44
+ #elif __MAC__
45
+ = new MacPclExport ( )
43
46
#elif ANDROID
44
47
= new AndroidPclExport ( )
45
48
#else
@@ -58,6 +61,8 @@ static PclExport()
58
61
return;
59
62
if ( ConfigureProvider ( "ServiceStack.AndroidPclExportClient, ServiceStack.Pcl.Android" ) )
60
63
return;
64
+ if ( ConfigureProvider ( "ServiceStack.MacPclExportClient, ServiceStack.Pcl.Mac20" ) )
65
+ return;
61
66
if ( ConfigureProvider ( "ServiceStack.WinStorePclExportClient, ServiceStack.Pcl.WinStore" ) )
62
67
return;
63
68
if ( ConfigureProvider ( "ServiceStack.Net40PclExportClient, ServiceStack.Pcl.Net45" ) )
You can’t perform that action at this time.
0 commit comments