コード例 #1
0
 public void SendInvite(string channelId, InviteContent customInviteContent,
                        LinkParams linkParams,
                        Action onComplete, Action onCancel, Action <GetSocialError> onFailure)
 {
     DebugUtils.LogMethodCall(MethodBase.GetCurrentMethod(), channelId, customInviteContent, linkParams,
                              onComplete, onCancel, onFailure);
 }
コード例 #2
0
        public void SendInvite(string channelId, InviteContent customInviteContent, Action onComplete, Action onCancel,
                               Action <GetSocialError> onFailure)
        {
            var inviteContentAjo = customInviteContent == null ? null : customInviteContent.ToAjo();

            _getSocial.CallStatic("sendInvite", channelId, inviteContentAjo,
                                  new InviteCallbackProxy(onComplete, onCancel, onFailure));
        }
コード例 #3
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("CreateInviteRequest");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (SessionId != null && __isset.sessionId)
         {
             field.Name = "sessionId";
             field.Type = TType.String;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(SessionId);
             oprot.WriteFieldEnd();
         }
         if (InviteContent != null && __isset.inviteContent)
         {
             field.Name = "inviteContent";
             field.Type = TType.Struct;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             InviteContent.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (ProviderId != null && __isset.providerId)
         {
             field.Name = "providerId";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(ProviderId);
             oprot.WriteFieldEnd();
         }
         if (__isset.type)
         {
             field.Name = "type";
             field.Type = TType.I32;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)Type);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
コード例 #4
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("CreateInviteResponse");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (InviteContent != null && __isset.inviteContent)
         {
             field.Name = "inviteContent";
             field.Type = TType.Struct;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             InviteContent.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (InviteUrl != null && __isset.inviteUrl)
         {
             field.Name = "inviteUrl";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(InviteUrl);
             oprot.WriteFieldEnd();
         }
         if (Token != null && __isset.token)
         {
             field.Name = "token";
             field.Type = TType.String;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Token);
             oprot.WriteFieldEnd();
         }
         if (Copycode != null && __isset.copycode)
         {
             field.Name = "copycode";
             field.Type = TType.String;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(Copycode);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
コード例 #5
0
        public void SendInvite(string channelId, InviteContent customInviteContent,
                               Action onComplete, Action onCancel, Action <GetSocialError> onFailure)
        {
            string customInviteContentJson = null;

            if (customInviteContent != null)
            {
                customInviteContentJson = customInviteContent.ToJson();
            }
            _gs_sendInviteCustom(channelId, customInviteContentJson,
                                 Callbacks.ActionCallback, onComplete.GetPointer(), onCancel.GetPointer(),
                                 Callbacks.FailureCallback, onFailure.GetPointer());
        }
コード例 #6
0
 public void Send(InviteContent customInviteContent, string channelId, Action success, Action cancel, Action <GetSocialError> failure)
 {
     CallAsync("Invites.send", GSJson.Serialize(new SendInviteBody {
         ChannelId = channelId, Content = customInviteContent
     }), (string result) => {
         if (result.Equals("cancel"))
         {
             cancel();
         }
         else
         {
             success();
         }
     }, failure);
 }
コード例 #7
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("CreateInviteRequest(");
            bool          __first = true;

            if (SessionId != null && __isset.sessionId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("SessionId: ");
                __sb.Append(SessionId);
            }
            if (InviteContent != null && __isset.inviteContent)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("InviteContent: ");
                __sb.Append(InviteContent == null ? "<null>" : InviteContent.ToString());
            }
            if (ProviderId != null && __isset.providerId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ProviderId: ");
                __sb.Append(ProviderId);
            }
            if (__isset.type)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Type: ");
                __sb.Append(Type);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
コード例 #8
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("CreateInviteResponse(");
            bool          __first = true;

            if (InviteContent != null && __isset.inviteContent)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("InviteContent: ");
                __sb.Append(InviteContent == null ? "<null>" : InviteContent.ToString());
            }
            if (InviteUrl != null && __isset.inviteUrl)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("InviteUrl: ");
                __sb.Append(InviteUrl);
            }
            if (Token != null && __isset.token)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Token: ");
                __sb.Append(Token);
            }
            if (Copycode != null && __isset.copycode)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Copycode: ");
                __sb.Append(Copycode);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
コード例 #9
0
 protected internal Builder()
 {
     _inviteContent = new InviteContent();
 }
コード例 #10
0
 /// <summary>
 /// Create invite with localized values and a link.
 /// </summary>
 /// <param name="customInviteContent">Custom content to override the default content provided from the Dashboard.</param>
 /// <param name="success">Called with invite content when it is created.</param>
 /// <param name="failure">Called with error if operation fails</param>
 public static void Create(InviteContent customInviteContent, Action <Invite> success, Action <GetSocialError> failure)
 {
     GetSocialFactory.Bridge.Create(customInviteContent, success, failure);
 }
コード例 #11
0
 /// <summary>
 /// Invite friends via a specified invite channel.
 /// </summary>
 /// <param name="customInviteContent">Custom content to override the default content provided from the Dashboard.</param>
 /// <param name="channelId">The channel through which the invite will be sent, one of the constants defined in <see cref="InviteChannelIds"/>.</param>
 /// <param name="success">Called when the invite process is complete.</param>
 /// <param name="cancel">Called if a user canceled an invite.</param>
 /// <param name="failure">Called with error if operation fails</param>
 public static void Send(InviteContent customInviteContent, string channelId, Action success, Action cancel, Action <GetSocialError> failure)
 {
     GetSocialFactory.Bridge.Send(customInviteContent, channelId, success, cancel, failure);
 }
コード例 #12
0
        public override string ToString()
        {
            StringBuilder __sb    = new StringBuilder("THInviteProvider(");
            bool          __first = true;

            if (Name != null && __isset.name)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Name: ");
                __sb.Append(Name.ToDebugString());
            }
            if (ProviderId != null && __isset.providerId)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("ProviderId: ");
                __sb.Append(ProviderId);
            }
            if (__isset.os)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Os: ");
                __sb.Append(Os);
            }
            if (__isset.displayOrder)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("DisplayOrder: ");
                __sb.Append(DisplayOrder);
            }
            if (IconUrl != null && __isset.iconUrl)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("IconUrl: ");
                __sb.Append(IconUrl);
            }
            if (__isset.enabled)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Enabled: ");
                __sb.Append(Enabled);
            }
            if (__isset.supportsInviteText)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("SupportsInviteText: ");
                __sb.Append(SupportsInviteText);
            }
            if (__isset.supportsInviteImageUrl)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("SupportsInviteImageUrl: ");
                __sb.Append(SupportsInviteImageUrl);
            }
            if (__isset.supportsInviteSubject)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("SupportsInviteSubject: ");
                __sb.Append(SupportsInviteSubject);
            }
            if (Properties != null && __isset.properties)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("Properties: ");
                __sb.Append(Properties == null ? "<null>" : Properties.ToString());
            }
            if (InviteContent != null && __isset.inviteContent)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("InviteContent: ");
                __sb.Append(InviteContent == null ? "<null>" : InviteContent.ToString());
            }
            if (__isset.supportsGif)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("SupportsGif: ");
                __sb.Append(SupportsGif);
            }
            if (__isset.supportsVideo)
            {
                if (!__first)
                {
                    __sb.Append(", ");
                }
                __first = false;
                __sb.Append("SupportsVideo: ");
                __sb.Append(SupportsVideo);
            }
            __sb.Append(")");
            return(__sb.ToString());
        }
コード例 #13
0
 public void Write(TProtocol oprot)
 {
     oprot.IncrementRecursionDepth();
     try
     {
         TStruct struc = new TStruct("THInviteProvider");
         oprot.WriteStructBegin(struc);
         TField field = new TField();
         if (Name != null && __isset.name)
         {
             field.Name = "name";
             field.Type = TType.Map;
             field.ID   = 1;
             oprot.WriteFieldBegin(field);
             {
                 oprot.WriteMapBegin(new TMap(TType.String, TType.String, Name.Count));
                 foreach (string _iter37 in Name.Keys)
                 {
                     oprot.WriteString(_iter37);
                     oprot.WriteString(Name[_iter37]);
                 }
                 oprot.WriteMapEnd();
             }
             oprot.WriteFieldEnd();
         }
         if (ProviderId != null && __isset.providerId)
         {
             field.Name = "providerId";
             field.Type = TType.String;
             field.ID   = 2;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(ProviderId);
             oprot.WriteFieldEnd();
         }
         if (__isset.os)
         {
             field.Name = "os";
             field.Type = TType.I32;
             field.ID   = 3;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32((int)Os);
             oprot.WriteFieldEnd();
         }
         if (__isset.displayOrder)
         {
             field.Name = "displayOrder";
             field.Type = TType.I32;
             field.ID   = 4;
             oprot.WriteFieldBegin(field);
             oprot.WriteI32(DisplayOrder);
             oprot.WriteFieldEnd();
         }
         if (IconUrl != null && __isset.iconUrl)
         {
             field.Name = "iconUrl";
             field.Type = TType.String;
             field.ID   = 5;
             oprot.WriteFieldBegin(field);
             oprot.WriteString(IconUrl);
             oprot.WriteFieldEnd();
         }
         if (__isset.enabled)
         {
             field.Name = "enabled";
             field.Type = TType.Bool;
             field.ID   = 6;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(Enabled);
             oprot.WriteFieldEnd();
         }
         if (__isset.supportsInviteText)
         {
             field.Name = "supportsInviteText";
             field.Type = TType.Bool;
             field.ID   = 7;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(SupportsInviteText);
             oprot.WriteFieldEnd();
         }
         if (__isset.supportsInviteImageUrl)
         {
             field.Name = "supportsInviteImageUrl";
             field.Type = TType.Bool;
             field.ID   = 8;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(SupportsInviteImageUrl);
             oprot.WriteFieldEnd();
         }
         if (__isset.supportsInviteSubject)
         {
             field.Name = "supportsInviteSubject";
             field.Type = TType.Bool;
             field.ID   = 9;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(SupportsInviteSubject);
             oprot.WriteFieldEnd();
         }
         if (Properties != null && __isset.properties)
         {
             field.Name = "properties";
             field.Type = TType.Struct;
             field.ID   = 10;
             oprot.WriteFieldBegin(field);
             Properties.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (InviteContent != null && __isset.inviteContent)
         {
             field.Name = "inviteContent";
             field.Type = TType.Struct;
             field.ID   = 11;
             oprot.WriteFieldBegin(field);
             InviteContent.Write(oprot);
             oprot.WriteFieldEnd();
         }
         if (__isset.supportsGif)
         {
             field.Name = "supportsGif";
             field.Type = TType.Bool;
             field.ID   = 12;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(SupportsGif);
             oprot.WriteFieldEnd();
         }
         if (__isset.supportsVideo)
         {
             field.Name = "supportsVideo";
             field.Type = TType.Bool;
             field.ID   = 13;
             oprot.WriteFieldBegin(field);
             oprot.WriteBool(SupportsVideo);
             oprot.WriteFieldEnd();
         }
         oprot.WriteFieldStop();
         oprot.WriteStructEnd();
     }
     finally
     {
         oprot.DecrementRecursionDepth();
     }
 }
コード例 #14
0
 public void Create(InviteContent customInviteContent, Action <Invite> success, Action <GetSocialError> failure)
 {
     CallAsync("Invites.create", GSJson.Serialize(customInviteContent), success, failure);
 }
コード例 #15
0
 public void SendInvite(string channelId, InviteContent customInviteContent, LinkParams linkParams, Action onComplete,
                        Action onCancel, Action <GetSocialError> onFailure)
 {
     GetSocialLogs.W("SendInvite is not supported in Editor yet");
     onFailure(new GetSocialError("SendInvite doesn't work in Unity Editor yet"));
 }
コード例 #16
0
 public void SendInvite(string channelId, InviteContent customInviteContent, Action onComplete, Action onCancel,
                        Action <GetSocialError> onFailure)
 {
     SendInvite(channelId, customInviteContent, null, onComplete, onCancel, onFailure);
 }