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


C# ErrorEventArgs.ToString方法代码示例

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


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

示例1: OnError

 private static void OnError(object source, ErrorEventArgs e)
 {
     Trace.WriteLine("{0} : {1} : {2}", e.GetException().ToString(), e.GetType().ToString(), e.ToString());
 }
开发者ID:modulexcite,项目名称:biz.dfch.CS.LogShipper,代码行数:4,代码来源:LogShipperWorker.cs

示例2: _watcher_Error

 void _watcher_Error(object sender, ErrorEventArgs e)
 {
     Console.WriteLine("File Watcher Error: " + e.ToString());
 }
开发者ID:RobRobertsCE,项目名称:RobsRepo,代码行数:4,代码来源:FileService.cs

示例3: watcher_Error

        /// <summary>
        /// if the filesystem watcher throws an error - we mostly care about it throwing when 
        /// it can't see a network share anymore.  in that case we re-create the file watcher
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void watcher_Error(object sender, ErrorEventArgs e)
        {
            DebugLine("Watcher Error Triggered. " + e.ToString());

            try
            {
                FileSystemWatcher watcher = sender as FileSystemWatcher;

                if ( watcher == null )
                    return;

                // if the watcher path no longer exists for whatever reason, add this watcher to the bad queue
                // to re-attempt to see if it exists every 5 seconds.  This can happen if a network drive disconnects
                // or someone removes an attached drive.  re-creating the watcher is required when the device comes
                // back online
                if (!Directory.Exists(watcher.Path))
                {
                    lock (badWatchers)
                    {
                        // add it to the bad watcher list
                        if (watchers.Contains(watcher))
                        {
                            badWatchers.Add(watcher);
                            watchers.Remove(watcher);

                            badWatcherTimer.Start();
                        }
                    }
                }
            }
            catch (Exception err)
            {
                DebugLineError(err, "Error re-setting up watcher");
            }
        }
开发者ID:peeboo,项目名称:open-media-library,代码行数:41,代码来源:DirectoryScanner.cs

示例4: WatcherErrorHandler

 private void WatcherErrorHandler(object sender, ErrorEventArgs e)
 {
     _onError(e.ToString());
 }
开发者ID:acken,项目名称:FSWatcher,代码行数:4,代码来源:FSW.cs

示例5: FileMonitor_OnError

 /// <summary>
 /// Handles the OnError event of the FileMonitor control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.IO.ErrorEventArgs"/> instance containing the event data.</param>
 public void FileMonitor_OnError(object sender, ErrorEventArgs e)
 {
     this.EventLog.WriteEntry(String.Format("FileMonitor: OnError: {0}", e.ToString()));
 }
开发者ID:jorik041,项目名称:azurefilebackupsvc,代码行数:9,代码来源:WindowsAzure_FileBackup_Common_FileMonitor.cs

示例6: dialer_Error

 void dialer_Error(object sender, ErrorEventArgs e)
 {
     DialError(e.ToString());
 }
开发者ID:kangwl,项目名称:xk,代码行数:4,代码来源:VPNCore.cs

示例7: OnError

 // OnError +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 public static void OnError( object         sender, 
                         ErrorEventArgs error )
 {
     Log.Error( "! PlayerInfo Error: " + error.ToString() );
 }
开发者ID:HySpeed,项目名称:PlayerInfo,代码行数:6,代码来源:PlayerInfo.cs

示例8: _sourceWatcher_Error

 private void _sourceWatcher_Error(object sender, ErrorEventArgs e)
 {
     Log("Error");
     Log(e.ToString());
 }
开发者ID:vidstige,项目名称:Ez-XBMC,代码行数:5,代码来源:MainViewModel.cs

示例9: watcher_Error

 void watcher_Error(object sender, ErrorEventArgs e)
 {
     System.Diagnostics.Debug.WriteLine(e.ToString());
 }
开发者ID:ago1024,项目名称:WurmTools,代码行数:4,代码来源:MainForm.cs


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