本文整理汇总了C#中Soomla.Profile.Provider类的典型用法代码示例。如果您正苦于以下问题:C# Provider类的具体用法?C# Provider怎么用?C# Provider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Provider类属于Soomla.Profile命名空间,在下文中一共展示了Provider类的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: UserProfile
/// <summary>
/// Constructor.
/// </summary>
/// <param name="provider">The provider this <c>UserProfile</c> belongs to.</param>
/// <param name="profileId">A unique ID that identifies the current user with the provider.</param>
/// <param name="username">The username of the current user in the provider.</param>
/// <param name="extra">Additional info provided by SN.</param>
protected UserProfile(Provider provider, string profileId, string username, Dictionary<String, JSONObject> extra)
{
this.Provider = provider;
this.ProfileId = profileId;
this.Username = username;
this.Extra = extra;
}
示例3: SocialUploadGate
/// <summary>
/// Constructor.
/// </summary>
/// <param name="id"><c>Gate</c> ID.</param>
/// <param name="provider">Social provider.</param>
/// <param name="fileName">Name of file to upload.</param>
/// <param name="message">Message.</param>
/// <param name="texture">Texture.</param>
public SocialUploadGate(string id, Provider provider, string fileName, string message, Texture2D texture)
: base(id, provider)
{
FileName = fileName;
Message = message;
ImgTexture = texture;
}
示例4: SocialActionFailedEvent
public SocialActionFailedEvent(Provider provider, SocialActionType socialType, String errorDescription, String payload) : base(provider)
{
this.provider = provider;
this.SocialType = socialType;
this.payload = payload;
this.ErrorDescription = errorDescription;
}
示例5: _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);
}
示例6: GetScoresFailedEvent
public GetScoresFailedEvent(Provider provider, Leaderboard from, bool fromStart, string errorDescription, string payload)
: base(provider, payload)
{
this.From = from;
this.FromStart = fromStart;
this.ErrorDescription = errorDescription;
}
示例7: _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);
}
示例8: _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);
}
示例9: _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);
}
示例10: _pushEventSocialActionStarted
protected override void _pushEventSocialActionStarted(Provider provider, SocialActionType actionType, string payload) {
if (SoomlaProfile.IsProviderNativelyImplemented(provider)) return;
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.ProfileEventHandler")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "pushEventSocialActionStarted",
provider.ToString(), actionType.ToString(), payload);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例11: SocialStoryGate
/// <summary>
/// Constructor.
/// </summary>
/// <param name="id"><c>Gate</c> ID.</param>
/// <param name="provider">Social provider.</param>
/// <param name="message">Message for the story.</param>
/// <param name="name">Story name.</param>
/// <param name="caption">Caption for the story image.</param>
/// <param name="link">Link for the story.</param>
/// <param name="imgUrl">Image URL for the story.</param>
public SocialStoryGate(string id, Provider provider, string message, string storyName, string caption, string link, string imgUrl)
: base(id, provider)
{
Message = message;
StoreName = storyName;
Caption = caption;
Link = link;
ImgUrl = imgUrl;
}
示例12: _updateStory
protected override void _updateStory(Provider provider, string message, string name,
string caption, string description, string link,
string pictureUrl, string payload){
AndroidJNI.PushLocalFrame(100);
using(AndroidJavaClass jniSoomlaProfile = new AndroidJavaClass("com.soomla.profile.unity.UnitySoomlaProfile")) {
ProfileJNIHandler.CallStaticVoid(jniSoomlaProfile, "updateStory", provider.ToString(), message, name,
caption, description, link, pictureUrl, payload);
}
AndroidJNI.PopLocalFrame(IntPtr.Zero);
}
示例13: _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);
}
示例14: _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);
}
示例15: _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);
}