Пример #1
0
        public static FileObject ConvertToFileObject(MSFileObject msfo)
        {
            FileObject fo = new FileObject();

            fo.Id          = msfo.id;
            fo.Name        = msfo.name;
            fo.Type        = (FileObjectType)Enum.Parse(typeof(FileObjectType), msfo.file_type);
            fo.Size        = msfo.size;
            fo.Extension   = msfo.extension;
            fo.UpdateAt    = msfo.update_at;
            fo.DownloadUrl = msfo.download_url;
            fo.MimeType    = msfo.mime_type;
            fo.SpotId      = msfo.spot_id;
            fo.Owner       = new ProfileObject(msfo.owner_account_id, msfo.owner_account_name);
            return(fo);
        }
Пример #2
0
 public static FileObject ConvertToFileObject(MSFileObject msfo)
 {
     FileObject fo = new FileObject();
     fo.Id = msfo.id;
     fo.Name = msfo.name;
     fo.Type = (FileObjectType)Enum.Parse(typeof(FileObjectType), msfo.file_type);
     fo.Size = msfo.size;
     fo.Extension = msfo.extension;
     fo.UpdateAt = msfo.update_at;
     fo.DownloadUrl = msfo.download_url;
     fo.MimeType = msfo.mime_type;
     fo.SpotId = msfo.spot_id;
     fo.Owner = new ProfileObject(msfo.owner_account_id, msfo.owner_account_name);
     return fo;
 }