本文整理汇总了C#中Soomla.Profile.Provider.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Provider.ToString方法的具体用法?C# Provider.ToString怎么用?C# Provider.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Soomla.Profile.Provider
的用法示例。
在下文中一共展示了Provider.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: _logout
protected override void _logout (Provider provider){
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "logout", provider.ToString());
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例2: _updateStatus
protected override void _updateStatus(Provider provider, string status, string payload){
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "updateStatus", provider.ToString(), status, payload);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例3: _pushEventLoginFailed
protected override void _pushEventLoginFailed(Provider provider, string message, bool autoLogin, string payload) {
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventLoginFailed", provider.ToString(), message, autoLogin, payload);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例4: _getFeed
protected override void _getFeed(Provider provider, bool fromStart, string payload)
{
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "getFeed", provider.ToString(), fromStart, payload);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例5: _pushEventLogoutFinished
protected override void _pushEventLogoutFinished(Provider provider) {
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventLogoutFinished", provider.ToString());
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例6: _login
protected override void _login(Provider provider, string payload){
AndroidJNI.PushLocalFrame(100);
using (AndroidJavaClass unityActivityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) {
using(AndroidJavaObject unityActivity = unityActivityClass.GetStatic<AndroidJavaObject>("currentActivity")) {
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "login", unityActivity, provider.ToString(), payload);
}
}
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例7: _pushEventGetContactsFinished
protected override void _pushEventGetContactsFinished(Provider provider, SocialPageData<UserProfile> contactsPage, string payload)
{
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
List<JSONObject> profiles = new List<JSONObject>();
foreach (var profile in contactsPage.PageData) {
profiles.Add(profile.toJSONObject());
}
JSONObject contacts = new JSONObject(profiles.ToArray());
soomlaProfile_PushEventGetContactsFinished(provider.ToString(), contacts.ToString(), payload, contactsPage.HasMore);
}
示例8: _isLoggedIn
protected override bool _isLoggedIn(Provider provider) {
bool loggedIn;
AndroidJNI.PushLocalFrame(100);
using (AndroidJavaClass unityActivityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) {
using(AndroidJavaObject unityActivity = unityActivityClass.GetStatic<AndroidJavaObject>("currentActivity")) {
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
loggedIn = ProfileJNIHandler.CallStatic<bool>(jniSoomlaProfile, "isLoggedIn", unityActivity, provider.ToString());
}
}
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
return loggedIn;
}
示例9: _getStoredUserProfile
protected override UserProfile _getStoredUserProfile(Provider provider)
{
IntPtr p = IntPtr.Zero;
int err = soomlaProfile_GetStoredUserProfile(provider.ToString(), out p);
IOS_ProfileErrorCodes.CheckAndThrowException(err);
string json = Marshal.PtrToStringAnsi(p);
Marshal.FreeHGlobal(p);
SoomlaUtils.LogDebug(TAG, "Got json: " + json);
JSONObject obj = new JSONObject(json);
return new UserProfile(obj);
}
示例10: _getAccessToken
protected override string _getAccessToken(Provider provider)
{
string accessToken;
AndroidJNI.PushLocalFrame(100);
using (AndroidJavaClass unityActivityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) {
using(AndroidJavaObject unityActivity = unityActivityClass.GetStatic<AndroidJavaObject>("currentActivity")) {
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
accessToken = ProfileJNIHandler.CallStatic<string>(jniSoomlaProfile, "getAccessToken", unityActivity, provider.ToString());
}
}
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
return accessToken;
}
示例11: _pushEventGetContactsFinished
protected override void _pushEventGetContactsFinished(Provider provider, SocialPageData<UserProfile> contactsPage, string payload)
{
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
List<JSONObject> profiles = new List<JSONObject>();
foreach (var profile in contactsPage.PageData) {
profiles.Add(profile.toJSONObject());
}
JSONObject contacts = new JSONObject(profiles.ToArray());
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventGetContactsFinished",
provider.ToString(), contacts.ToString(), payload, contactsPage.HasMore);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例12: _getStoredUserProfile
protected override UserProfile _getStoredUserProfile(Provider provider)
{
JSONObject upObj = null;
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
string upJSON = ProfileJNIHandler.CallStatic<string>(jniSoomlaProfile, "getStoredUserProfile", provider.ToString());
if(upJSON != null) {
upObj = new JSONObject(upJSON);
}
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
if (upObj) {
return new UserProfile(upObj);
} else {
return null;
}
}
示例13: _pushEventGetFeedFinished
protected override void _pushEventGetFeedFinished(Provider provider ,SocialPageData<String> feedPage, string payload) {
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
List<JSONObject> feeds = new List<JSONObject>();
foreach (var feed in feedPage.PageData) {
feeds.Add(JSONObject.StringObject(feed));
}
JSONObject jsonFeeds = new JSONObject(feeds.ToArray());
soomlaProfile_PushEventGetFeedFinished(provider.ToString(), jsonFeeds.ToString(), payload, feedPage.HasMore);
}
示例14: _pushEventInviteFinished
protected override void _pushEventInviteFinished(Provider provider, string requestId, List<string> invitedIds, string payload) {
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
List<JSONObject> invited = new List<JSONObject>();
foreach (var id in invitedIds) {
invited.Add(JSONObject.StringObject(id));
}
JSONObject jsonInvited = new JSONObject(invited.ToArray());
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventInviteFinished",
provider.ToString(), SocialActionType.INVITE.ToString(), requestId, jsonInvited.ToString(), payload);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例15: _pushEventGetFeedFinished
protected override void _pushEventGetFeedFinished (Provider provider, SocialPageData<String> feedPage, string payload) {
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
List<JSONObject> feeds = new List<JSONObject>();
foreach (var feed in feedPage.PageData) {
feeds.Add(JSONObject.StringObject(feed));
}
JSONObject feedJson = new JSONObject(feeds.ToArray());
AndroidJNI.PushLocalFrame(100);
using (AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventGetFeedFinished",
provider.ToString(), feedJson.ToString(), payload, feedPage.HasMore);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}