コード例 #1
0
        private KeyValuePair <SLPaging, List <SLFile> > ExtractFilesList(dynamic data)
        {
            List <SLFile> fileList           = new List <SLFile>();
            bool          convertationResult = false;

            dynamic files = DictionaryExtension.TryGetValue(data, "files", out convertationResult);

            foreach (dynamic item in files)
            {
                SLFile file = new SLFile();
                file.id        = DictionaryExtension.TryGetValue(item, "id", out convertationResult);
                file.created   = DictionaryExtension.TryGetValue(item, "created", out convertationResult);
                file.timestamp = DictionaryExtension.TryGetValue(item, "timestamp", out convertationResult);
                file.name      = DictionaryExtension.TryGetValue(item, "name", out convertationResult);
                file.title     = DictionaryExtension.TryGetValue(item, "title", out convertationResult);
                file.mimetype  = DictionaryExtension.TryGetValue(item, "mimetype", out convertationResult);
                file.filetype  = DictionaryExtension.TryGetValue(item, "filetype", out convertationResult);
                file.user_id   = DictionaryExtension.TryGetValue(item, "user", out convertationResult);
                fileList.Add(file);
            }

            dynamic  pagingData = DictionaryExtension.TryGetValue(data, "paging", out convertationResult);
            SLPaging paging     = new SLPaging();

            paging.count = DictionaryExtension.TryGetValue(pagingData, "count", out convertationResult);
            paging.total = DictionaryExtension.TryGetValue(pagingData, "total", out convertationResult);
            paging.page  = DictionaryExtension.TryGetValue(pagingData, "page", out convertationResult);
            paging.pages = DictionaryExtension.TryGetValue(pagingData, "pages", out convertationResult);
            return(new KeyValuePair <SLPaging, List <SLFile> >(paging, fileList));
        }
コード例 #2
0
 public SLMessage()
 {
     file_description = new SLFile();
 }
コード例 #3
0
 public SLFileUploadResult()
 {
     slFile = new SLFile();
 }