当前位置: 首页>>代码示例>>C#>>正文


C# Profile.UserProfile类代码示例

本文整理汇总了C#中Soomla.Profile.UserProfile的典型用法代码示例。如果您正苦于以下问题:C# UserProfile类的具体用法?C# UserProfile怎么用?C# UserProfile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


UserProfile类属于Soomla.Profile命名空间,在下文中一共展示了UserProfile类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: _pushEventLoginFinished

		protected override void _pushEventLoginFinished(UserProfile userProfile, bool autoLogin, string payload) { 
			if (SoomlaProfile.IsProviderNativelyImplemented(userProfile.Provider)) return;
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
				ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventLoginFinished", userProfile.toJSONObject().print(), autoLogin, payload);
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);
		}
开发者ID:trananh1992,项目名称:unity3d-profile,代码行数:8,代码来源:ProfileEventPusherAndroid.cs

示例2: StoreUserProfile

		/// <summary>
		/// Stores the given user profile in the relevant provider (contained internally in the UserProfile).
		///
		/// NOTE: This operation requires a successful login.
		/// </summary>
		/// <param name="userProfile">User profile to store.</param>
		/// <param name="notify">If set to <c>true</c>, notify.</param>
		public static void StoreUserProfile (UserProfile userProfile, bool notify = false) {
			instance._storeUserProfile (userProfile, notify);
		}
开发者ID:IgorPushkar,项目名称:FlappyBirdClone,代码行数:10,代码来源:SoomlaProfile.cs

示例3: _pushEventLoginFinished

			protected virtual void _pushEventLoginFinished(UserProfile userProfileJson, bool autoLogin, string payload){}
开发者ID:trananh1992,项目名称:unity3d-profile,代码行数:1,代码来源:ProfileEvents.cs

示例4: onLoginFinished

		/// <summary>
		/// Handles an <c>onLoginFinished</c> event
		/// </summary>
		/// <param name="message">Will contain a JSON representation of a <c>UserProfile</c> and payload</param>
		public void onLoginFinished(String message)
		{
			SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onLoginFinished");

			JSONObject eventJson = new JSONObject(message);

			UserProfile userProfile = new UserProfile (eventJson ["userProfile"]);

			bool autoLogin = eventJson["autoLogin"].b;

			JSONObject payloadJSON = new JSONObject(eventJson ["payload"].str);

			//give a reward
			Reward reward = Reward.GetReward(ProfilePayload.GetRewardId(payloadJSON));
			if (reward !=null)
				reward.Give();

			ProfileEvents.OnLoginFinished(userProfile, autoLogin, ProfilePayload.GetUserPayload(payloadJSON));
			//ProfileEvents.OnLoginFinished(new LoginFinishedEvent(userProfile, autoLogin, ProfilePayload.GetUserPayload(payloadJSON)));
		}
开发者ID:trananh1992,项目名称:unity3d-profile,代码行数:24,代码来源:ProfileEvents.cs

示例5: onUserProfileUpdated

		/// <summary>
		/// Handles an <c>onUserProfileUpdated</c> event
		/// </summary>
		/// <param name="message">Will contain a JSON representation of a <c>UserProfile</c></param>
		public void onUserProfileUpdated(String message)
		{
			SoomlaUtils.LogDebug(TAG, "SOOMLA/UNITY onUserProfileUpdated");

			JSONObject eventJson = new JSONObject(message);
			UserProfile userProfile = new UserProfile (eventJson ["userProfile"]);

			ProfileEvents.OnUserProfileUpdated (userProfile);
			//ProfileEvents.OnUserProfileUpdated (new UserProfileUpdatedEvent(userProfile));
		}
开发者ID:trananh1992,项目名称:unity3d-profile,代码行数:14,代码来源:ProfileEvents.cs

示例6: UserProfileFromFBJson

        private static UserProfile UserProfileFromFBJson(JSONObject fbJsonObject)
        {
            JSONObject soomlaJsonObject = new JSONObject ();
            soomlaJsonObject.AddField(PJSONConsts.UP_PROVIDER, Provider.FACEBOOK.ToString ());
            soomlaJsonObject.AddField(PJSONConsts.UP_PROFILEID, fbJsonObject["id"].str);
            string name = fbJsonObject ["name"].str;
            soomlaJsonObject.AddField(PJSONConsts.UP_USERNAME, name);
            string email = fbJsonObject ["email"] != null ? fbJsonObject ["email"].str : null;
            if (email == null) {
                email = Regex.Replace(name, @"\s+", ".") + "@facebook.com";
            }
            soomlaJsonObject.AddField(PJSONConsts.UP_EMAIL, email);
            soomlaJsonObject.AddField(PJSONConsts.UP_FIRSTNAME, fbJsonObject["first_name"].str);
            soomlaJsonObject.AddField(PJSONConsts.UP_LASTNAME, fbJsonObject["last_name"].str);
            soomlaJsonObject.AddField(PJSONConsts.UP_AVATAR, fbJsonObject["picture"]["data"]["url"].str);
            UserProfile userProfile = new UserProfile (soomlaJsonObject);

            return userProfile;
        }
开发者ID:jhorikawa,项目名称:unity3d-profile,代码行数:19,代码来源:FBSocialProvider.cs

示例7: LoginFinishedEvent

		public LoginFinishedEvent (UserProfile userProfile, bool autoLogin, string payload):this(userProfile, autoLogin, payload,null)
		{

		}
开发者ID:trananh1992,项目名称:unity3d-profile,代码行数:4,代码来源:LoginFinishedEvent.cs

示例8: _removeUserProfile

		protected virtual void _removeUserProfile(UserProfile userProfile) {
			#if UNITY_EDITOR
			string key = keyUserProfile(userProfile.Provider);
			PlayerPrefs.DeleteKey(key);
			#endif
		}
开发者ID:IgorPushkar,项目名称:FlappyBirdClone,代码行数:6,代码来源:SoomlaProfile.cs

示例9: _removeUserProfile

		protected override void _removeUserProfile(UserProfile userProfile) {
			soomlaProfile_RemoveUserProfile(userProfile.toJSONObject().ToString());
		}
开发者ID:IgorPushkar,项目名称:FlappyBirdClone,代码行数:3,代码来源:SoomlaProfileIOS.cs

示例10: _pushEventLoginFinished

 protected override void _pushEventLoginFinished(UserProfile userProfile, bool autoLogin, string payload)
 {
     if (SoomlaProfile.IsProviderNativelyImplemented(userProfile.Provider)) return;
     soomlaProfile_PushEventLoginFinished(userProfile.toJSONObject().print(), autoLogin, payload);
 }
开发者ID:thirunar,项目名称:Soomla-Social-Sharing,代码行数:5,代码来源:ProfileEventPusherIOS.cs

示例11: _storeUserProfile

		protected override void _storeUserProfile(UserProfile userProfile, bool notify) {
			soomlaProfile_SetStoredUserProfile(userProfile.toJSONObject().ToString(), notify);
		}
开发者ID:IgorPushkar,项目名称:FlappyBirdClone,代码行数:3,代码来源:SoomlaProfileIOS.cs

示例12: _removeUserProfile

		protected override void _removeUserProfile(UserProfile userProfile) {
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
				ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "removeUserProfile",
				                                 userProfile.toJSONObject().ToString());
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);
		}
开发者ID:drapermovies,项目名称:MansionGamingGitHub,代码行数:8,代码来源:SoomlaProfileAndroid.cs

示例13: RemoveUserProfile

		/// <summary>
		/// Removes the given user profile in the relevant provider (contained internally in the UserProfile).
		///
		/// NOTE: This operation requires a successful login.
		/// </summary>
		/// <param name="userProfile">User profile to store.</param>
		public static void RemoveUserProfile (UserProfile userProfile) {
			instance._removeUserProfile (userProfile);
		}
开发者ID:IgorPushkar,项目名称:FlappyBirdClone,代码行数:9,代码来源:SoomlaProfile.cs

示例14: UserProfileUpdatedEvent

		public UserProfileUpdatedEvent(UserProfile userProfile) : this(userProfile, null)
        {

		}
开发者ID:trananh1992,项目名称:unity3d-profile,代码行数:4,代码来源:UserProfileUpdatedEvent.cs

示例15: _storeUserProfile

		protected virtual void _storeUserProfile(UserProfile userProfile, bool notify) {
			#if UNITY_EDITOR
			string key = keyUserProfile(userProfile.Provider);
			string val = userProfile.toJSONObject().ToString();
			SoomlaUtils.LogDebug(TAG, "key/val:" + key + "/" + val);
			PlayerPrefs.SetString(key, val);

			if (notify) {
				ProfileEvents.OnUserProfileUpdated(userProfile);
			}
			#endif
		}
开发者ID:IgorPushkar,项目名称:FlappyBirdClone,代码行数:12,代码来源:SoomlaProfile.cs


注:本文中的Soomla.Profile.UserProfile类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。