"景先生毕设|www.jxszl.com

C# ChangeAction类代码示例

2023-12-29 17:42编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中ChangeAction类的典型用法代码示例。如果您正苦于以下问题:C#ChangeAction类的具体用法?C#ChangeAction怎么用?C#ChangeAction使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:AddToQueue /// ///CreatestheSyncQueueItemfromthegivendataandaddsittothesyncqueue /// privatevoidAddToQueue(FileSystemEventArgse,ChangeActionaction) { varisFile=Common.PathIsFile(e.FullPath); //ignoredirectorychanges if(!isFile&&action==ChangeAction.changed)return; varqueueItem=newSyncQueueItem(controller) { Item=newClientItem { Name=e.Name, FullPath=e.FullPath, Type=isFile?ClientItemType.File:ClientItemType.Folder, Size=(isFile&&action!=ChangeAction.deleted)?newFileInfo(e.FullPath).Length:0x0, LastWriteTime=File.GetLastWriteTime(e.FullPath) }, SyncTo=SyncTo.Remote, ActionType=action }; if(action==ChangeAction.renamed) { varargs=easRenamedEventArgs; queueItem.Item.FullPath=args.OldFullPath; queueItem.Item.NewFullPath=args.FullPath; } //Sendtothesyncqueue controller.SyncQueue.Add(queueItem); }
原文链接:http://www.jxszl.com/biancheng/C/556716.html