Exemplo n.º 1
0
        public Dropbox(string url, Dictionary<string, string> options)
        {
            var uri = new Utility.Uri(url);

            m_path = Library.Utility.Uri.UrlDecode(uri.HostAndPath);
            if (m_path.Length != 0 && !m_path.StartsWith("/"))
                m_path = "/" + m_path;

            if (m_path.EndsWith("/"))
                m_path = m_path.Substring(0, m_path.Length - 1);

            if (options.ContainsKey(AUTHID_OPTION))
                m_accesToken = options[AUTHID_OPTION];

            dbx = new DropboxHelper(m_accesToken);
        }
Exemplo n.º 2
0
        public Dropbox(string url, Dictionary <string, string> options)
        {
            var uri = new Utility.Uri(url);

            m_path = Library.Utility.Uri.UrlDecode(uri.HostAndPath);
            if (m_path.Length != 0 && !m_path.StartsWith("/"))
            {
                m_path = "/" + m_path;
            }

            if (m_path.EndsWith("/"))
            {
                m_path = m_path.Substring(0, m_path.Length - 1);
            }

            if (options.ContainsKey(AUTHID_OPTION))
            {
                m_accesToken = options[AUTHID_OPTION];
            }

            dbx = new DropboxHelper(m_accesToken);
        }