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;
        }
        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));
            }
        }
        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, ":");
        }
        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;
        }
 public SCServerRequest(string requestPath, SCSession session)
 {
     this.mRequestUri = requestPath;
     this.mSession    = session;
     this.mPreference = SCDeepLinking.GetInstance().Preference;
 }
 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;
 }
 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();
 }