当前位置: 首页>>代码示例>>C#>>正文


C# FileSystemEventArgs.ToString方法代码示例

本文整理汇总了C#中System.IO.FileSystemEventArgs.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# FileSystemEventArgs.ToString方法的具体用法?C# FileSystemEventArgs.ToString怎么用?C# FileSystemEventArgs.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.IO.FileSystemEventArgs的用法示例。


在下文中一共展示了FileSystemEventArgs.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnWatcherError

 // Watcher error
 private void OnWatcherError(object sender, FileSystemEventArgs e)
 {
     showErrorAndExit("FileSystemWatcher Error: "+e.ToString());
 }
开发者ID:caar2000,项目名称:neolog,代码行数:5,代码来源:NeoLogger.cs

示例2: OnDeleted

 private static void OnDeleted(object source, FileSystemEventArgs e)
 {
     Trace.WriteLine("{0} - {1} : {2} [{3}]", e.FullPath, e.Name, e.ChangeType.ToString(), e.ToString());
 }
开发者ID:modulexcite,项目名称:biz.dfch.CS.LogShipper,代码行数:4,代码来源:LogShipperWorker.cs

示例3: OnFolderContentsUpdated

        void OnFolderContentsUpdated(object sender, FileSystemEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new FileSystemEventHandler(OnFolderContentsUpdated), sender, e);
                return;
            }

            Logger.LogHeavyTrace("OnFolderContentsUpdated: " + e.ToString());
            _delayedExplore.Stop();

            try
            {
                if (sender is FileSystemWatcher)
                {
                    _delayedExplore.Start();
                }
            }
            catch(Exception ex)
            {
                Logger.LogException(ex);
            }
        }
开发者ID:rraguso,项目名称:protone-suite,代码行数:23,代码来源:OPMShellListView.cs

示例4: OnChanged

        public void OnChanged(object source, FileSystemEventArgs e)
        {
            debugLogger.WriteDebug_3("Begin Method: OnChanged(object,FileSystemEventArgs) ("
                + source.ToString() + "," + e.ToString() + ")");

            changed = true;

            debugLogger.WriteDebug_3("End Method: OnChanged()");
        }
开发者ID:esdkp,项目名称:esdkp,代码行数:9,代码来源:LogParser.cs

示例5: Handle

        /// <summary>
        /// Raises the created/changed/deleted event as FSEvent.
        /// </summary>
        /// <param name='source'>
        /// Source file system watcher.
        /// </param>
        /// <param name='e'>
        /// Reported changes.
        /// </param>
        public virtual void Handle(object source, FileSystemEventArgs e) {
            try {
                bool isDirectory = false;
                if (e.ChangeType == WatcherChangeTypes.Deleted) {
                    var path = this.fsFactory.CreateFileInfo(e.FullPath);
                    var obj = this.storage.GetObjectByLocalPath(path);
                    Guid guid = Guid.Empty;
                    if (obj != null) {
                        isDirectory = obj.Type == MappedObjectType.Folder;
                        guid = obj.Guid;
                    }

                    this.AddEventToList(e, guid, isDirectory);
                } else {
                    bool? check = this.fsFactory.IsDirectory(e.FullPath);
                    if (check != null) {
                        isDirectory = (bool)check;
                        IFileSystemInfo fsInfo = isDirectory ? (IFileSystemInfo)this.fsFactory.CreateDirectoryInfo(e.FullPath) : (IFileSystemInfo)this.fsFactory.CreateFileInfo(e.FullPath);
                        Guid uuid = Guid.Empty;
                        try {
                            Guid? fsGuid = fsInfo.Uuid;
                            if (fsGuid != null) {
                                uuid = (Guid)fsGuid;
                            }
                        } catch(Exception) {
                            uuid = Guid.Empty;
                        }

                        this.AddEventToList(e, uuid, isDirectory);
                    }
                }
            } catch (Exception ex) {
                Logger.Warn(string.Format("Processing file system event {0} produces exception => force crawl sync", e.ToString()), ex);
                this.queue.AddEvent(new StartNextSyncEvent(true));
            }
        }
开发者ID:OpenDataSpace,项目名称:CmisSync,代码行数:45,代码来源:CreatedChangedDeletedFileSystemEventHandler.cs


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