• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Models.MetaData类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DropNet.Models.MetaData的典型用法代码示例。如果您正苦于以下问题:C# MetaData类的具体用法?C# MetaData怎么用?C# MetaData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MetaData类属于DropNet.Models命名空间,在下文中一共展示了MetaData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateFolderViewModel

 public CreateFolderViewModel()
 {
     if (IsInDesignMode)
     {
         _metadata = new MetaData { Path = "/photos" };
     }
 }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:7,代码来源:CreateFolderViewModel.cs


示例2: OnNavigatedTo

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            if (RemoveBackEntry)
            {
                NavigationService.RemoveBackEntry();
            }

            Messenger.Default.Register<MetaDataViewModel>(this, MessengerToken.GetLink, GetLinkPage);

            var data = new MetaData
                           {
                               Path = GetPath(),
                               Icon = GetIcon()
                           };

            PageTitle.Text = data.Name.ToLower();
            _viewModel.RegisterMessengers.Execute(null);
            _viewModel.LoadItems.Execute(data);

            SetPinIcon(data);

            if (RemoveBackEntry)
            {
                App.NeedDataRefresh = true;
            }

            base.OnNavigatedTo(e);
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:28,代码来源:FolderPage.xaml.cs


示例3: IsPinned

        public static bool IsPinned(MetaData metaData)
        {
            string path = string.Format("/FolderPage.xaml?path={0}&icon={1}", metaData.Path, metaData.Icon);
            var tile = LiveTileHelper.GetTile(new Uri(path, UriKind.Relative));

            return tile != null;
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:7,代码来源:TileHelper.cs


示例4: FromMetaData

 public static DropBoxItem FromMetaData(MetaData metaData)
 {
     if(metaData.Is_Dir)
     {
         return new DropBoxFolder(metaData.Path, metaData.Name);
     }
     return new DropBoxFile(metaData.Path, metaData.Name);
 }
开发者ID:runegri,项目名称:CrossBox,代码行数:8,代码来源:DropBoxItem.cs


示例5: GetMetaData

 private async void GetMetaData()
 {
     _metaData = _client.GetMetaData(path: "/Photos/Camera/2014/2014-05-11");
     _position = 0;
     LoadImageIntoControl(await GetImage(_position));
     if (_position < _metaData.Contents.Count - 1)
         await GetImage(_position + 1); // cache the next image
 }
开发者ID:JeffreyVest,项目名称:PhotoTagger,代码行数:8,代码来源:MainWindow.xaml.cs


示例6: ParseImageMetadata

 protected virtual void ParseImageMetadata(MetaData data)
 {
     Client.GetMediaAsync(data.Path, response =>
                                         {
                                             var media = MediaFactory.CreateFromUrl(Settings.Id, response.Url);
                                             NewMedia(media);
                                             ((List<Media>)Media).Add(media);
                                         }, exception => Debug.WriteLine(exception));
 }
开发者ID:vegardlarsen,项目名称:Mat,代码行数:9,代码来源:DropboxMediaSource.cs


示例7: RemoveTile

        public static void RemoveTile(MetaData metaData)
        {
            string path = string.Format("/FolderPage.xaml?path={0}&icon={1}", metaData.Path, metaData.Icon);
            var tile = LiveTileHelper.GetTile(new Uri(path, UriKind.Relative));

            if (tile != null)
            {
                tile.Delete();
            }
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:10,代码来源:TileHelper.cs


示例8: GetMetadataRecursive

 public static IEnumerable<MetaData> GetMetadataRecursive(MetaData metaData)
 {
     var result = new List<MetaData>() {metaData};
     if (metaData.Contents != null) {
         foreach (var data in metaData.Contents) {
             result.AddRange(GetMetadataRecursive(data));
         }
     }
     return result;
 }
开发者ID:uluhonolulu,项目名称:DropnetExt,代码行数:10,代码来源:DropnetExtensions.cs


示例9: FileEntry

 public FileEntry(MetaData md, ImageSource thumb)
 {
     Modified = md.ModifiedDate;
     Title = md.Name;
     Image = thumb;
     IdString = md.Path;
     IsFolder = md.Is_Dir;
     IsGDrive = false;
     IsViewable = !md.Is_Dir && IsExtViewable(md.Extension.Replace(".", ""));
 }
开发者ID:gdlprj,项目名称:duscusys,代码行数:10,代码来源:FileEntry.cs


示例10: Create

 public static DropboxFileMeta Create(MetaData m)
 {
   return new DropboxFileMeta
   {
     IsDir = m.Is_Dir,
     IsDeleted = m.Is_Deleted,
     Extension = m.Extension,
     Name = m.Name,
     LastModifiedUtc = m.UTCDateModified,
     Path = m.Path
   };
 }
开发者ID:popopome,项目名称:memocloud,代码行数:12,代码来源:SyncPolicy.cs


示例11: ConvertToFileObject

        /// <summary>
        /// Converting DropBox Model to FileObject
        /// </summary>
        /// <param name="meta">DropBox Model</param>
        /// <returns>POJO FileObject</returns>
        public static FileObject ConvertToFileObject(MetaData meta)
        {
            string Name = meta.Name;
            string UpdateAt = meta.ModifiedDate.ToString(); //14/02/2014 15:48:13
            string Id = meta.Path; // Full path
            string ParentId = meta.Path;
            double Size = meta.Bytes * 1.0;
            FileObject.FileObjectType Type = (meta.Is_Dir ? FileObject.FileObjectType.FOLDER : FileObject.FileObjectType.FILE);
            string Extension = (meta.Extension == null || "".Equals(meta.Extension)) ? "" : meta.Extension.Substring(1, meta.Extension.Length -1); // .png

            return new FileObject(Id,Name,Size,Type,Extension,UpdateAt);
        }
开发者ID:pinthecloud,项目名称:pin_the_cloud,代码行数:17,代码来源:ConvertToFileObjectHelper.cs


示例12: GetRelativeTime

        private static string GetRelativeTime(MetaData data)
        {
            DateTime date;
            var parsed = DateTime.TryParseExact(
                data.Modified,
                "ddd, dd MMM yyyy HH:mm:ss +ffff",
                CultureInfo.InvariantCulture,
                DateTimeStyles.None, out date);

            return parsed
                ? date.ToRelative()
                : string.Empty;
        }
开发者ID:oldlaurel,项目名称:WinPass,代码行数:13,代码来源:MetaListItemInfo.cs


示例13: MetaListItemInfo

        public MetaListItemInfo(MetaData data)
        {
            if (data == null)
                throw new ArgumentNullException("data");

            Title = data.Name;
            _path = data.Path;
            _idDir = data.Is_Dir;
            _modified = data.Modified;

            Icon = ThemeData.GetImage(
                data.Is_Dir ? "folder" : "entry");
        }
开发者ID:nthobois,项目名称:7Pass,代码行数:13,代码来源:MetaListItemInfo.cs


示例14: UnpublishedMarkdownFiles

        private static bool UnpublishedMarkdownFiles(MetaData arg)
        {
            if (arg.Name == null)
                return false;
            var withoutExtension = Path.GetFileNameWithoutExtension(arg.Name);
            var extension = Path.GetExtension(arg.Name);
            return
                withoutExtension != null &&
                extension != null &&
                withoutExtension.IndexOf(PublishedMarker, StringComparison.Ordinal) == -1 &&
                withoutExtension.IndexOf(WorkInProgressMarker, StringComparison.Ordinal) == -1 &&
                extension == ".md";

        }
开发者ID:flq,项目名称:Rf.Sites,代码行数:14,代码来源:DropboxFacade.cs


示例15: CreateTile

        public static void CreateTile(MetaData metaData)
        {
            ImageSource imageSource = new BitmapImage(new Uri(string.Format("/TileIcon/{0}.png", metaData.Icon), UriKind.Relative));
            var visual = new LiveTileVisual();
            visual.SetProperties(metaData.Name, imageSource);
            var data = new RadExtendedTileData
                           {
                               VisualElement = visual
                           };

            string path = string.Format("/FolderPage.xaml?path={0}&icon={1}", metaData.Path, metaData.Icon);

            LiveTileHelper.CreateTile(data, new Uri(path, UriKind.Relative));
        }
开发者ID:prashantvc,项目名称:WinBox-Win8,代码行数:14,代码来源:TileHelper.cs


示例16: DisplayContents

        public void DisplayContents(string path)
        {
            Console.WriteLine("Displaying the contents of : {0}",path);

            AppDelegate.Dropbox.GetMetaDataAsync(path, response => {

                _dropboxData = response.Data;
                InvokeOnMainThread(()=>{
                    this.TableView.DataSource = new TableDataSource(this);
                    this.TableView.Delegate = new TableDelegate(this);
                    this.TableView.ReloadData();
                });
            });
        }
开发者ID:kevinmcmahon,项目名称:DropNetTestApp,代码行数:14,代码来源:DBFileTableViewController.cs


示例17: AdditionalSetup

        protected override void AdditionalSetup()
        {
            _randomFile1 = Path.GetRandomFileName() + ".md";
            var client = GetAuthorizedClient();
            client.UploadFile("/", _randomFile1, GetFileContent());

            _f = GetDropboxFacade();
            var files = _f.GetAllUnpublished();
            _file = files[0];
            _f.UpdatePublishState(files);

            var c = GetAuthorizedClient();
            _meta = c.GetMetaData();
        }
开发者ID:flq,项目名称:Rf.Sites,代码行数:14,代码来源:RenameOfPublishedFiles.cs


示例18: MetaListItemInfo

        public MetaListItemInfo(MetaData data)
        {
            if (data == null)
                throw new ArgumentNullException("data");

            _path = data.Path;
            _size = data.Bytes;
            _isDir = data.Is_Dir;
            _modified = data.Modified;

            Title = data.Name;
            Notes = GetRelativeTime(data);
            Icon = ThemeData.GetImage(
                data.Is_Dir ? "folder" : "entry");
        }
开发者ID:oldlaurel,项目名称:WinPass,代码行数:15,代码来源:MetaListItemInfo.cs


示例19: ParseImageMetadata

        protected override void ParseImageMetadata(MetaData data)
        {
            var localPath = LocalPathFromRemotePath(data.Path);
            if (File.Exists(localPath)) return;
            Client.GetFileAsync(data.Path,
                     delegate(IRestResponse response)
                     {

                         using (var fs = new FileStream(localPath, FileMode.CreateNew, FileAccess.Write))
                         {
                             fs.Write(response.RawBytes, 0, response.RawBytes.Length);
                         }
                         var media = new LocalMedia(localPath, Settings.Id);
                         NewMedia(media);
                         ((List<Media>)Media).Add(media);
                     },
                     exception => Debug.WriteLine(exception));
        }
开发者ID:vegardlarsen,项目名称:Mat,代码行数:18,代码来源:DropboxLocalMediaSource.cs


示例20: DropboxRepository

        public DropboxRepository(string appKey, string appSecret, string userToken, string userSecret, string folderPath)
        {
            if (!string.IsNullOrEmpty(appKey) && !string.IsNullOrEmpty(appSecret) && !string.IsNullOrEmpty(userToken) && !string.IsNullOrEmpty(userSecret) && !string.IsNullOrEmpty(folderPath))
            {
                _client = new DropNetClient(apiKey: appKey, appSecret: appSecret, userToken: userToken, userSecret: userSecret);

                _cacheKey = string.Format(_cacheKey, appKey);
                var cachedMetaData = LoadFromCache<MetaData>(cacheKey: _cacheKey);
                if (cachedMetaData != null)
                {
                    _dropboxImageFolderMetaData = cachedMetaData;
                }
                else
                {
                    _dropboxImageFolderMetaData = _client.GetMetaData(path: folderPath);
                    AddToCache(item: _dropboxImageFolderMetaData, cacheKey: _cacheKey, absoluteExpiration: DateTime.Now.AddHours(1));
                }
            }
        }
开发者ID:Traan,项目名称:TimelinePhoto,代码行数:19,代码来源:DropboxRepository.cs



注:本文中的DropNet.Models.MetaData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Physics.RigidBody类代码示例发布时间:2022-05-24
下一篇:
C# IL.ILPreprocessState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap