Browse Source

FxCop fixes for AvalonEdit.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3725 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
146d61722d
  1. 2
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/BackgroundGeometryBuilder.cs
  2. 50
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/DragDropException.cs
  3. 5
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/SelectionMouseHandler.cs
  4. 1
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj
  5. 1
      src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Properties/CodeAnalysisDictionary.xml

2
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/BackgroundGeometryBuilder.cs

@ -18,7 +18,7 @@ using ICSharpCode.AvalonEdit.Utils;
namespace ICSharpCode.AvalonEdit.Gui namespace ICSharpCode.AvalonEdit.Gui
{ {
/// <summary> /// <summary>
/// Hel create a PathGeometry. /// Helper for creating a PathGeometry.
/// </summary> /// </summary>
public sealed class BackgroundGeometryBuilder public sealed class BackgroundGeometryBuilder
{ {

50
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/DragDropException.cs

@ -0,0 +1,50 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <author name="Daniel Grunwald"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Runtime.Serialization;
namespace ICSharpCode.AvalonEdit.Gui
{
/// <summary>
/// Wraps exceptions that occur during drag'n'drop.
/// Exceptions during drag'n'drop might
/// get swallowed by WPF/COM, so AvalonEdit catches them and re-throws them later
/// wrapped in a DragDropException.
/// </summary>
[Serializable()]
public class DragDropException : Exception
{
/// <summary>
/// Creates a new DragDropException.
/// </summary>
public DragDropException() : base()
{
}
/// <summary>
/// Creates a new DragDropException.
/// </summary>
public DragDropException(string message) : base(message)
{
}
/// <summary>
/// Creates a new DragDropException.
/// </summary>
public DragDropException(string message, Exception innerException) : base(message, innerException)
{
}
/// <summary>
/// Deserializes a DragDropException.
/// </summary>
protected DragDropException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}

5
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Gui/SelectionMouseHandler.cs

@ -47,6 +47,7 @@ namespace ICSharpCode.AvalonEdit.Gui
} }
} }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
void textArea_DragEnter(object sender, DragEventArgs e) void textArea_DragEnter(object sender, DragEventArgs e)
{ {
try { try {
@ -56,6 +57,7 @@ namespace ICSharpCode.AvalonEdit.Gui
} }
} }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
void textArea_DragOver(object sender, DragEventArgs e) void textArea_DragOver(object sender, DragEventArgs e)
{ {
try { try {
@ -92,6 +94,7 @@ namespace ICSharpCode.AvalonEdit.Gui
e.Handled = true; e.Handled = true;
} }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
void textArea_Drop(object sender, DragEventArgs e) void textArea_Drop(object sender, DragEventArgs e)
{ {
try { try {
@ -124,7 +127,7 @@ namespace ICSharpCode.AvalonEdit.Gui
textArea.Dispatcher.BeginInvoke( textArea.Dispatcher.BeginInvoke(
DispatcherPriority.Normal, DispatcherPriority.Normal,
new Action(delegate { new Action(delegate {
throw new Exception("Exception during drag'n'drop", ex); throw new DragDropException("Exception during drag'n'drop", ex);
})); }));
} }

1
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/ICSharpCode.AvalonEdit.csproj

@ -117,6 +117,7 @@
<Compile Include="Gui\DocumentColorizingTransformer.cs"> <Compile Include="Gui\DocumentColorizingTransformer.cs">
<DependentUpon>IVisualLineTransformer.cs</DependentUpon> <DependentUpon>IVisualLineTransformer.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Gui\DragDropException.cs" />
<Compile Include="Gui\EditingCommandHandler.cs" /> <Compile Include="Gui\EditingCommandHandler.cs" />
<Compile Include="Gui\FoldingSection.cs"> <Compile Include="Gui\FoldingSection.cs">
<DependentUpon>FoldingManager.cs</DependentUpon> <DependentUpon>FoldingManager.cs</DependentUpon>

1
src/Libraries/AvalonEdit/ICSharpCode.AvalonEdit/Properties/CodeAnalysisDictionary.xml

@ -9,6 +9,7 @@
<Word>Utils</Word> <Word>Utils</Word>
<Word>Colorizer</Word> <Word>Colorizer</Word>
<Word>Renderer</Word> <Word>Renderer</Word>
<Word>Deletable</Word>
</Recognized> </Recognized>
<Unrecognized> <Unrecognized>
<!-- Disable Lineup as a single word - LineUp is the spelling used in WPF --> <!-- Disable Lineup as a single word - LineUp is the spelling used in WPF -->

Loading…
Cancel
Save