Last active
July 2, 2021 15:13
-
-
Save marek-safar/896a2aac983e2168dcbd5e1cff216100 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inside partial class specific to implementation | |
const string Assembly = "Xamarin.iOS"; | |
const string NativeHandlerType = "Name of the handler type in ios"; | |
// This will be in shared mobile class | |
public bool UseCookies { | |
get | |
{ | |
if (IsSocketHandler) | |
{ | |
return _socketHandler!.UseCookies; | |
} | |
else | |
{ | |
return GetUseCookies(); | |
} | |
[DynamicDependency("get_UseCookies", NativeHandlerType, Assembly)] | |
bool GetUseCookies() => (bool)InvokeNativeHandlerMethod("get_UseCookies"); | |
} | |
set | |
{ | |
if (IsSocketHandler) | |
{ | |
_socketHandler!.UseCookies = value; | |
} | |
else | |
{ | |
SetUseCookies(value); | |
} | |
[DynamicDependency ("set_UseCookies", NativeHandlerType, Assembly)] | |
SetUseCookies(bool value) => InvokeNativeHandlerMethod("set_UseCookies", value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment