public SCServerRequestRegisterClose(SCSession session)
     : base(ActionUrls.GetActionUrl(ActionUrls.Close), session)
 {
     Dictionary<string, string> postData = new Dictionary<string, string>();
     postData.Add(KeyValues.LINK_ID_KEY, session.LinkId);
     base.PostData = postData;
 }
コード例 #2
0
        public SCServerRequestRegisterOpen(SCSession session)
            : base(ActionUrls.GetActionUrl(ActionUrls.Open), session)
        {
            Dictionary <string, string> postData = new Dictionary <string, string>();

            postData.Add(KeyValues.LINK_ID_KEY, session.LinkId);
            base.PostData = postData;
        }
コード例 #3
0
        public void StopSession(string activity)
        {
            SCSession session = mSessions[activity];

            if (session != null && !session.IsClosed())
            {
                session.Close();
                throw new NotImplementedException();
                //PostTask postTask = new PostTask();
                //postTask.Execute(new SCServerRequestRegisterClose(session));
            }
        }
コード例 #4
0
        public void RequestRegisterOpen()
        {
            // arrange
            var session = new SCSession("scdemo://shortcut.sc/demo/73734?sc_link_id=2cjog8");
            var client = new SCServerRequestRegisterOpen(session);

            // act
            var response = client.DoRequest();

            // assert
            Assert.IsNotNull(response);
            Assert.AreNotEqual(response, String.Empty);
            StringAssert.Contains(response, ":");
        }
コード例 #5
0
        public void RequestRegisterFirstOpen()
        {
            // arrange
            var session = new SCSession();
            var client = new SCServerRequestRegisterFirstOpen(session);

            // act
            var response = client.DoRequest();

            // assert
            Assert.IsNotNull(response);
            Assert.AreNotEqual(response, String.Empty);
            StringAssert.Contains(response, ":");
        }
コード例 #6
0
        public SCServerRequestCreateShortLink(SCSession session, SCShortLinkItem item)
            : base(ActionUrls.GetActionUrl(ActionUrls.Create), session)
        {
            Dictionary <string, string> postData = new Dictionary <string, string>();

            try
            {
                postData.Add(KeyValues.DEEP_LINK_ITEM_KEY, item.ToJson().ToString());
            }
            catch (Exception e)
            {
            }

            base.PostData = postData;
        }
        public SCServerRequestCreateShortLink(SCSession session, SCShortLinkItem item)
            : base(ActionUrls.GetActionUrl(ActionUrls.Create), session)
        {
            Dictionary<string, string> postData = new Dictionary<string, string>();
            try
            {
                postData.Add(KeyValues.DEEP_LINK_ITEM_KEY, item.ToJson().ToString());
            }
            catch (Exception e)
            {

            }

            base.PostData = postData;
        }
コード例 #8
0
 public SCServerRequest(string requestPath, SCSession session)
 {
     this.mRequestUri = requestPath;
     this.mSession    = session;
     this.mPreference = SCDeepLinking.GetInstance().Preference;
 }
コード例 #9
0
 private void GenerateSessionId()
 {
     this.mSession = new SCSession(this.mDeepLinkAtLaunch);
     SaveSessionId();
 }
コード例 #10
0
 public SCServerRequestCreateShortLink(SCSession session, SCShortLinkItem item, ISCShortLinkCreateListener callback)
     : this(session, item)
 {
     this.mCallback = callback;
 }
 public SCServerRequestRegisterFirstOpen(SCSession session)
     : base(ActionUrls.GetActionUrl(ActionUrls.FirstOpen), session)
 {
     base.PostData = new SCEnvironment().toMap();
 }
 public SCServerRequestCreateShortLink(SCSession session, SCShortLinkItem item, ISCShortLinkCreateListener callback)
     : this(session, item)
 {
     this.mCallback = callback;
 }
コード例 #13
0
 public SCServerRequest(string requestPath, SCSession session)
 {
     this.mRequestUri = requestPath;
     this.mSession = session;
     this.mPreference = SCDeepLinking.GetInstance().Preference;
 }
 public SCServerRequestRegisterFirstOpen(SCSession session)
     : base(ActionUrls.GetActionUrl(ActionUrls.FirstOpen), session)
 {
     base.PostData = new SCEnvironment().toMap();
 }