Browse Source

Add strong-name to NRefactory; small API changes for ICSharpCode.Editor.

newNRvisualizers
Daniel Grunwald 14 years ago
parent
commit
cb70bceece
  1. 4
      ICSharpCode.Editor/ICSharpCode.Editor.csproj
  2. 53
      ICSharpCode.Editor/IDocument.cs
  3. 2
      ICSharpCode.Editor/Properties/AssemblyInfo.cs
  4. 12
      ICSharpCode.Editor/ReadOnlyDocument.cs
  5. BIN
      ICSharpCode.NRefactory.snk
  6. 8
      ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj

4
ICSharpCode.Editor/ICSharpCode.Editor.csproj

@ -10,7 +10,7 @@
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile> <TargetFrameworkProfile>Client</TargetFrameworkProfile>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<SignAssembly>False</SignAssembly> <SignAssembly>True</SignAssembly>
<DelaySign>False</DelaySign> <DelaySign>False</DelaySign>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<DocumentationFile>bin\Debug\ICSharpCode.Editor.xml</DocumentationFile> <DocumentationFile>bin\Debug\ICSharpCode.Editor.xml</DocumentationFile>
@ -19,6 +19,8 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunCodeAnalysis>False</RunCodeAnalysis> <RunCodeAnalysis>False</RunCodeAnalysis>
<AssemblyOriginatorKeyFile>..\ICSharpCode.NRefactory.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' "> <PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>

53
ICSharpCode.Editor/IDocument.cs

@ -10,7 +10,7 @@ namespace ICSharpCode.Editor
/// Line and column counting starts at 1. /// Line and column counting starts at 1.
/// Offset counting starts at 0. /// Offset counting starts at 0.
/// </summary> /// </summary>
public interface IDocument : ITextSource, IServiceProvider public interface IDocument : ITextSource
{ {
/// <summary> /// <summary>
/// Gets/Sets the text of the whole document.. /// Gets/Sets the text of the whole document..
@ -18,20 +18,41 @@ namespace ICSharpCode.Editor
new string Text { get; set; } // hides TextBuffer.Text to add the setter new string Text { get; set; } // hides TextBuffer.Text to add the setter
/// <summary> /// <summary>
/// Is raised when the Text property changes. /// This event is called directly before a change is applied to the document.
/// </summary>
/// <remarks>
/// It is invalid to modify the document within this event handler.
/// Aborting the change (by throwing an exception) is likely to cause corruption of data structures
/// that listen to the Changing and Changed events.
/// </remarks>
event EventHandler<TextChangeEventArgs> TextChanging;
/// <summary>
/// This event is called directly after a change is applied to the document.
/// </summary>
/// <remarks>
/// It is invalid to modify the document within this event handler.
/// Aborting the event handler (by throwing an exception) is likely to cause corruption of data structures
/// that listen to the Changing and Changed events.
/// </remarks>
event EventHandler<TextChangeEventArgs> TextChanged;
/// <summary>
/// This event is called after a group of changes is completed.
/// </summary> /// </summary>
event EventHandler TextChanged; /// <seealso cref="EndUndoableAction"/>
event EventHandler ChangeCompleted;
/// <summary> /// <summary>
/// Gets the total number of lines in the document. /// Gets the number of lines in the document.
/// </summary> /// </summary>
int TotalNumberOfLines { get; } int LineCount { get; }
/// <summary> /// <summary>
/// Gets the document line with the specified number. /// Gets the document line with the specified number.
/// </summary> /// </summary>
/// <param name="lineNumber">The number of the line to retrieve. The first line has number 1.</param> /// <param name="lineNumber">The number of the line to retrieve. The first line has number 1.</param>
IDocumentLine GetLine(int lineNumber); IDocumentLine GetLineByNumber(int lineNumber);
/// <summary> /// <summary>
/// Gets the document line that contains the specified offset. /// Gets the document line that contains the specified offset.
@ -117,25 +138,5 @@ namespace ICSharpCode.Editor
/// </summary> /// </summary>
/// <inheritdoc cref="ITextAnchor" select="remarks|example"/> /// <inheritdoc cref="ITextAnchor" select="remarks|example"/>
ITextAnchor CreateAnchor(int offset); ITextAnchor CreateAnchor(int offset);
/// <summary>
/// This event is called directly before a change is applied to the document.
/// </summary>
/// <remarks>
/// It is invalid to modify the document within this event handler.
/// Aborting the change (by throwing an exception) is likely to cause corruption of data structures
/// that listen to the Changing and Changed events.
/// </remarks>
event EventHandler<TextChangeEventArgs> Changing;
/// <summary>
/// This event is called directly after a change is applied to the document.
/// </summary>
/// <remarks>
/// It is invalid to modify the document within this event handler.
/// Aborting the event handler (by throwing an exception) is likely to cause corruption of data structures
/// that listen to the Changing and Changed events.
/// </remarks>
event EventHandler<TextChangeEventArgs> Changed;
} }
} }

2
ICSharpCode.Editor/Properties/AssemblyInfo.cs

@ -29,3 +29,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can use the default the Revision and // You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below: // Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.*")]
[assembly: CLSCompliant(true)]

12
ICSharpCode.Editor/ReadOnlyDocument.cs

@ -48,7 +48,7 @@ namespace ICSharpCode.Editor
} }
/// <inheritdoc/> /// <inheritdoc/>
public IDocumentLine GetLine(int lineNumber) public IDocumentLine GetLineByNumber(int lineNumber)
{ {
if (lineNumber < 1 || lineNumber > lines.Length) if (lineNumber < 1 || lineNumber > lines.Length)
throw new ArgumentOutOfRangeException("lineNumber", lineNumber, "Value must be between 1 and " + lines.Length); throw new ArgumentOutOfRangeException("lineNumber", lineNumber, "Value must be between 1 and " + lines.Length);
@ -121,7 +121,7 @@ namespace ICSharpCode.Editor
/// <inheritdoc/> /// <inheritdoc/>
public IDocumentLine GetLineByOffset(int offset) public IDocumentLine GetLineByOffset(int offset)
{ {
return GetLine(GetLineNumberForOffset(offset)); return GetLineByNumber(GetLineNumberForOffset(offset));
} }
int GetLineNumberForOffset(int offset) int GetLineNumberForOffset(int offset)
@ -168,7 +168,7 @@ namespace ICSharpCode.Editor
} }
/// <inheritdoc/> /// <inheritdoc/>
public int TotalNumberOfLines { public int LineCount {
get { return lines.Length; } get { return lines.Length; }
} }
@ -181,11 +181,11 @@ namespace ICSharpCode.Editor
get { return textSource.TextLength; } get { return textSource.TextLength; }
} }
event EventHandler<TextChangeEventArgs> IDocument.Changing { add {} remove {} } event EventHandler<TextChangeEventArgs> IDocument.TextChanging { add {} remove {} }
event EventHandler<TextChangeEventArgs> IDocument.Changed { add {} remove {} } event EventHandler<TextChangeEventArgs> IDocument.TextChanged { add {} remove {} }
event EventHandler IDocument.TextChanged { add {} remove {} } event EventHandler IDocument.ChangeCompleted { add {} remove {} }
void IDocument.Insert(int offset, string text) void IDocument.Insert(int offset, string text)
{ {

BIN
ICSharpCode.NRefactory.snk

Binary file not shown.

8
ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj

@ -17,6 +17,10 @@
<NoWarn>1591,0618</NoWarn> <NoWarn>1591,0618</NoWarn>
<RunCodeAnalysis>False</RunCodeAnalysis> <RunCodeAnalysis>False</RunCodeAnalysis>
<CodeAnalysisRules>-Microsoft.Design#CA1026;-Microsoft.Security#CA2104</CodeAnalysisRules> <CodeAnalysisRules>-Microsoft.Design#CA1026;-Microsoft.Security#CA2104</CodeAnalysisRules>
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>..\ICSharpCode.NRefactory.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<AssemblyOriginatorKeyMode>File</AssemblyOriginatorKeyMode>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' "> <PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -407,10 +411,6 @@
<Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project> <Project>{D68133BD-1E63-496E-9EDE-4FBDBF77B486}</Project>
<Name>Mono.Cecil</Name> <Name>Mono.Cecil</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\ICSharpCode.Editor\ICSharpCode.Editor.csproj">
<Project>{F054A788-B591-4561-A8BA-AE745BBEB817}</Project>
<Name>ICSharpCode.Editor</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project> </Project>
Loading…
Cancel
Save