Browse Source

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6421 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61

pull/1/head
Christoph Wille 15 years ago
parent
commit
88ac00af24
  1. 41
      samples/CodeConverter/Source/CCClient/CodeConvertServiceClient.csproj
  2. 4
      samples/CodeConverter/Source/CCClient/Properties/Resources.Designer.cs
  3. 4
      samples/CodeConverter/Source/CCClient/Properties/Settings.Designer.cs
  4. 16
      samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/Reference.cs
  5. 11
      samples/CodeConverter/Source/CCClient/app.config
  6. 42
      samples/CodeConverter/Source/CCSite/CCSite.csproj
  7. 265
      samples/CodeConverter/Source/CCSite/Code/HtmlWriter.cs
  8. 21
      samples/CodeConverter/Source/CCSite/CodeFormatService.asmx.cs
  9. 4
      samples/CodeConverter/Source/CCSite/Default.aspx
  10. 3
      samples/CodeConverter/Source/CCSite/Default.aspx.designer.cs
  11. 10
      samples/CodeConverter/Source/CCSite/FormatCode.aspx.cs
  12. 57
      samples/CodeConverter/Source/CCSite/Web.Config
  13. 13
      samples/CodeConverter/Source/CCSite/clientaccesspolicy.xml
  14. 40
      samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatServiceClient.csproj
  15. 4
      samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Resources.Designer.cs
  16. 4
      samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Settings.Designer.cs
  17. 20
      samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/Reference.cs
  18. 43
      samples/CodeConverter/Source/ICSharpCode.CodeConversion/ICSharpCode.CodeConversion.csproj

41
samples/CodeConverter/Source/CCClient/CodeConvertServiceClient.csproj

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -11,9 +12,26 @@ @@ -11,9 +12,26 @@
<AssemblyName>CodeConvertServiceClient</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -23,6 +41,7 @@ @@ -23,6 +41,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -31,6 +50,7 @@ @@ -31,6 +50,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@ -102,6 +122,23 @@ @@ -102,6 +122,23 @@
<CachedSettingsPropName>CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService</CachedSettingsPropName>
</WebReferenceUrl>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

4
samples/CodeConverter/Source/CCClient/Properties/Resources.Designer.cs generated

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -19,7 +19,7 @@ namespace CodeConvertServiceClient.Properties { @@ -19,7 +19,7 @@ namespace CodeConvertServiceClient.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {

4
samples/CodeConverter/Source/CCClient/Properties/Settings.Designer.cs generated

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -12,7 +12,7 @@ namespace CodeConvertServiceClient.Properties { @@ -12,7 +12,7 @@ namespace CodeConvertServiceClient.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

16
samples/CodeConverter/Source/CCClient/Web References/ICSharpCode.OnlineConverter/Reference.cs

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -9,21 +9,21 @@ @@ -9,21 +9,21 @@
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.1433.
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1.
//
#pragma warning disable 1591
namespace CodeConvertServiceClient.ICSharpCode.OnlineConverter {
using System.Diagnostics;
using System;
using System.Web.Services;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services.Protocols;
using System;
using System.ComponentModel;
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="ConvertServiceSoap", Namespace="http://developer.sharpdevelop.net/CodeConverter.NET/")]
@ -125,11 +125,11 @@ namespace CodeConvertServiceClient.ICSharpCode.OnlineConverter { @@ -125,11 +125,11 @@ namespace CodeConvertServiceClient.ICSharpCode.OnlineConverter {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
public delegate void PerformConversionCompletedEventHandler(object sender, PerformConversionCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class PerformConversionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

11
samples/CodeConverter/Source/CCClient/app.config

@ -1,16 +1,15 @@ @@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CodeConvertServiceClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="CodeConvertServiceClient.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections>
<applicationSettings>
<CodeConvertServiceClient.Properties.Settings>
<setting name="CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService"
serializeAs="String">
<setting name="CodeConvertServiceClient_ICSharpCode_OnlineConverter_ConvertService" serializeAs="String">
<value>http://codeconverter.sharpdevelop.net/ConvertService.asmx</value>
</setting>
</CodeConvertServiceClient.Properties.Settings>
</applicationSettings>
</configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

42
samples/CodeConverter/Source/CCSite/CCSite.csproj

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -12,10 +13,11 @@ @@ -12,10 +13,11 @@
<AssemblyName>CCSite</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -25,6 +27,7 @@ @@ -25,6 +27,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -33,36 +36,25 @@ @@ -33,36 +36,25 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.TextEditor, Version=2.1.0.2520, Culture=neutral, PublicKeyToken=4d61825e8dd49f1a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\Dependencies\ICSharpCode.TextEditor.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Extensions.Design" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Mobile" />
<Reference Include="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="About.aspx.cs">
@ -140,6 +132,7 @@ @@ -140,6 +132,7 @@
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="clientaccesspolicy.xml" />
<Content Include="ProzacAfternoon.master" />
<Content Include="Web.Config" />
</ItemGroup>
@ -187,7 +180,7 @@ @@ -187,7 +180,7 @@
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" Condition="" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
@ -206,6 +199,9 @@ @@ -206,6 +199,9 @@
<IISUrl>
</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>

265
samples/CodeConverter/Source/CCSite/Code/HtmlWriter.cs

@ -1,266 +1,29 @@ @@ -1,266 +1,29 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <author name="Daniel Grunwald"/>
// <version>$Revision: 2522 $</version>
// </file>
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using ICSharpCode.TextEditor;
using ICSharpCode.TextEditor.Document;
/*
using ICSharpCode.AvalonEdit;
using ICSharpCode.AvalonEdit.Document;
using ICSharpCode.AvalonEdit.Highlighting;
*/
namespace ICSharpCode.HtmlSyntaxColorizer
{
public class HtmlWriter
{
public bool AlternateLineBackground;
public bool ShowLineNumbers;
public string MainStyle = "font-size: small; font-family: Consolas, \"Courier New\", Courier, Monospace;";
public string LineStyle = "margin: 0em;";
public string AlternateLineStyle = "margin: 0em; width: 100%; background-color: #f0f0f0;";
#region Stylesheet cache
/// <summary>
/// Specifies whether a CSS stylesheet should be created to reduce the size of the created code.
/// The default value is true.
/// </summary>
public bool CreateStylesheet = true;
/// <summary>
/// Specifies the prefix to use in front of generate style class names.
/// </summary>
public string StyleClassPrefix = "code";
Dictionary<string, string> stylesheetCache = new Dictionary<string, string>();
/// <summary>
/// Resets the CSS stylesheet cache. Stylesheet classes will be cached on GenerateHtml calls.
/// If you want to reuse the HtmlWriter for multiple
/// </summary>
public void ResetStylesheetCache()
{
stylesheetCache.Clear();
}
string GetClass(string style)
{
return stylesheetCache[style];
}
void CacheClass(string style, StringBuilder b)
{
if (style == null) return;
if (!stylesheetCache.ContainsKey(style))
{
string styleName = StyleClassPrefix + stylesheetCache.Count;
stylesheetCache[style] = styleName;
b.Append('.');
b.Append(styleName);
b.Append(" { ");
b.Append(style);
b.AppendLine(" }");
}
}
#endregion
public string GenerateHtml(string code, string highlighterName)
{
IDocument doc = new DocumentFactory().CreateDocument();
doc.HighlightingStrategy = HighlightingManager.Manager.FindHighlighter(highlighterName);
doc.TextContent = code;
return GenerateHtml(doc);
}
HighlightColor currentDefaultTextColor;
public string GenerateHtml(IDocument document)
{
string myMainStyle = MainStyle;
currentDefaultTextColor = document.HighlightingStrategy.GetColorFor("Default");
myMainStyle += " color: " + ColorToString(currentDefaultTextColor.Color) + ";"
+ " background-color: " + ColorToString(currentDefaultTextColor.BackgroundColor) + ";";
string LineNumberStyle;
HighlightColor lineNumbersColor = document.HighlightingStrategy.GetColorFor("LineNumbers");
if (lineNumbersColor != null)
{
LineNumberStyle = "color: " + ColorToString(lineNumbersColor.Color) + ";"
+ " background-color: " + ColorToString(lineNumbersColor.BackgroundColor) + ";";
}
else
{
LineNumberStyle = "color: #606060;";
}
StringBuilder b = new StringBuilder();
if (CreateStylesheet)
{
b.AppendLine("<style type=\"text/css\">");
if (ShowLineNumbers || AlternateLineBackground)
{
CacheClass(myMainStyle, b);
CacheClass(LineStyle, b);
}
else
{
CacheClass(myMainStyle + LineStyle, b);
}
if (AlternateLineBackground) CacheClass(AlternateLineStyle, b);
if (ShowLineNumbers) CacheClass(LineNumberStyle, b);
foreach (LineSegment ls in document.LineSegmentCollection)
{
foreach (TextWord word in ls.Words)
{
CacheClass(GetStyle(word), b);
}
}
b.AppendLine("</style>");
}
if (ShowLineNumbers || AlternateLineBackground)
{
b.Append("<div");
WriteStyle(myMainStyle, b);
b.AppendLine(">");
/*
TextDocument doc = new TextDocument(code);
IHighlightingDefinition def = HighlightingManager.Instance.GetDefinition("C#");
DocumentHighlighter highlighter = new DocumentHighlighter(doc, def.MainRuleSet);
string html = HtmlClipboard.CreateHtmlFragment(doc, highlighter, null, new HtmlOptions());
*/
int longestNumberLength = 1 + (int)Math.Log10(document.TotalNumberOfLines);
int lineNumber = 1;
foreach (LineSegment lineSegment in document.LineSegmentCollection)
{
b.Append("<pre");
if (AlternateLineBackground && (lineNumber % 2) == 0)
{
WriteStyle(AlternateLineStyle, b);
}
else
{
WriteStyle(LineStyle, b);
}
b.Append(">");
if (ShowLineNumbers)
{
b.Append("<span");
WriteStyle(LineNumberStyle, b);
b.Append('>');
b.Append(lineNumber.ToString().PadLeft(longestNumberLength));
b.Append(": ");
b.Append("</span>");
}
if (lineSegment.Words.Count == 0)
{
b.Append("&nbsp;");
}
else
{
PrintWords(lineSegment, b);
}
b.AppendLine("</pre>");
lineNumber++;
}
b.AppendLine("</div>");
}
else
{
b.Append("<pre");
WriteStyle(myMainStyle + LineStyle, b);
b.AppendLine(">");
foreach (LineSegment lineSegment in document.LineSegmentCollection)
{
PrintWords(lineSegment, b);
b.AppendLine();
}
b.AppendLine("</pre>");
}
return b.ToString();
}
void PrintWords(LineSegment lineSegment, StringBuilder b)
{
string currentSpan = null;
foreach (TextWord word in lineSegment.Words)
{
if (word.Type == TextWordType.Space)
{
b.Append(' ');
}
else if (word.Type == TextWordType.Tab)
{
b.Append('\t');
}
else
{
string newSpan = GetStyle(word);
if (currentSpan != newSpan)
{
if (currentSpan != null) b.Append("</span>");
if (newSpan != null)
{
b.Append("<span");
WriteStyle(newSpan, b);
b.Append('>');
}
currentSpan = newSpan;
}
b.Append(HtmlEncode(word.Word));
}
}
if (currentSpan != null) b.Append("</span>");
}
static string HtmlEncode(string word)
{
return word.Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;");
}
void WriteStyle(string style, StringBuilder b)
{
if (CreateStylesheet)
{
b.Append(" class=\"");
b.Append(GetClass(style));
b.Append('"');
}
else
{
b.Append(" style='");
b.Append(style);
b.Append("'");
}
}
string GetStyle(TextWord word)
{
if (word.SyntaxColor == null || word.SyntaxColor.ToString() == currentDefaultTextColor.ToString())
return null;
string style = "color: " + ColorToString(word.Color) + ";";
if (word.Bold)
{
style += " font-weight: bold;";
}
if (word.Italic)
{
style += " font-style: italic;";
}
if (word.SyntaxColor.HasBackground)
{
style += " background-color: " + ColorToString(word.SyntaxColor.BackgroundColor) + ";";
}
return style;
}
static string ColorToString(System.Drawing.Color color)
{
return "#" + color.R.ToString("x2") + color.G.ToString("x2") + color.B.ToString("x2");
return "";
}
}
}

21
samples/CodeConverter/Source/CCSite/CodeFormatService.asmx.cs

@ -6,9 +6,6 @@ using System.Web.Services; @@ -6,9 +6,6 @@ using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using ICSharpCode.HtmlSyntaxColorizer;
using ICSharpCode.TextEditor.Document;
namespace CCSite
{
/// <summary>
@ -23,27 +20,13 @@ namespace CCSite @@ -23,27 +20,13 @@ namespace CCSite
[WebMethod]
public string Format(string Document, string HighlighterName, bool IncludeLineNumbers)
{
HtmlWriter writer = new HtmlWriter();
writer.ShowLineNumbers = IncludeLineNumbers;
writer.AlternateLineBackground = false;
string generatedHtml = writer.GenerateHtml(Document, HighlighterName);
return "<html><body>" + generatedHtml + "</body></html>";
throw new NotImplementedException("This feature has been removed");
}
[WebMethod]
public string[] RetrieveAvailableHighlighters()
{
Hashtable ht = HighlightingManager.Manager.HighlightingDefinitions;
string[] highlighters = new string[ht.Count];
int currentElement = 0;
foreach (DictionaryEntry de in ht)
{
highlighters[currentElement++] = de.Key.ToString();
}
return highlighters;
throw new NotImplementedException("This feature has been removed");
}
}
}

4
samples/CodeConverter/Source/CCSite/Default.aspx

@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
Go directly to the <a href="SnippetConverter.aspx">converter</a> (supports C#, VB.NET and Boo)
</p>
<!--
<p class="page_title">The Code Formatter</p>
<p>
Go directly to the <a href="FormatCode.aspx">Code Formatter</a> (supports ASP/XHTML, BAT, Boo, Coco, C++.NET, C#,
@ -19,7 +20,8 @@ @@ -19,7 +20,8 @@
The code formatting capability is also exposed as a Web service. A <a href="CodeFormatClient.aspx">sample client application</a> is available
for download. Please note: SharpDevelop ships with \Samples\HtmlSyntaxColorizer on which this Web service is built upon.
</p>
-->
<p class="page_title">Code Conversion as a Web Service</p>
<p>
If you want to use code conversion in your code, you can call the <a href="ConvertService.asmx">

3
samples/CodeConverter/Source/CCSite/Default.aspx.designer.cs generated

@ -1,10 +1,9 @@ @@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

10
samples/CodeConverter/Source/CCSite/FormatCode.aspx.cs

@ -9,8 +9,6 @@ using System.Web.UI.WebControls; @@ -9,8 +9,6 @@ using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ICSharpCode.HtmlSyntaxColorizer;
using ICSharpCode.TextEditor.Document;
namespace CCSite
{
@ -18,6 +16,11 @@ namespace CCSite @@ -18,6 +16,11 @@ namespace CCSite
{
protected void Page_Load(object sender, EventArgs e)
{
// this feature is currently disabled
Response.Redirect("default.aspx");
Response.End();
/*
if (Page.IsPostBack) return;
Hashtable ht = HighlightingManager.Manager.HighlightingDefinitions;
@ -28,10 +31,12 @@ namespace CCSite @@ -28,10 +31,12 @@ namespace CCSite
}
languageChoice.Items.FindByValue("C#").Selected = true;
*/
}
protected void formatCode_Click(object sender, EventArgs e)
{
/*
HtmlWriter writer = new HtmlWriter();
writer.ShowLineNumbers = ShowLineNumbers.Checked;
writer.AlternateLineBackground = UseAlternatingBackground.Checked;
@ -42,6 +47,7 @@ namespace CCSite @@ -42,6 +47,7 @@ namespace CCSite
outputTextBox.Text = codeHtmlDocument;
inlineCodePreview.Text = generatedHtml;
PreviewPane.Visible = true;
*/
}
}
}

57
samples/CodeConverter/Source/CCSite/Web.Config

@ -8,15 +8,7 @@ @@ -8,15 +8,7 @@
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><appSettings/>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
@ -25,12 +17,8 @@ @@ -25,12 +17,8 @@
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
<compilation debug="true" targetFramework="4.0">
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
@ -49,40 +37,5 @@ @@ -49,40 +37,5 @@
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules></system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></handlers></system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/></system.web>
</configuration>

13
samples/CodeConverter/Source/CCSite/clientaccesspolicy.xml

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="SOAPAction">
<domain uri="*"/>
</allow-from>
<grant-to>
<resource include-subpaths="true" path="/"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>

40
samples/CodeConverter/Source/CodeFormatServiceClient/CodeFormatServiceClient.csproj

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -11,9 +12,25 @@ @@ -11,9 +12,25 @@
<AssemblyName>CodeFormatServiceClient</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>2.0</OldToolsVersion>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -23,6 +40,7 @@ @@ -23,6 +40,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -31,6 +49,7 @@ @@ -31,6 +49,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@ -105,6 +124,23 @@ @@ -105,6 +124,23 @@
<LastGenOutput>Reference.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

4
samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Resources.Designer.cs generated

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -19,7 +19,7 @@ namespace CodeFormatServiceClient.Properties { @@ -19,7 +19,7 @@ namespace CodeFormatServiceClient.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {

4
samples/CodeConverter/Source/CodeFormatServiceClient/Properties/Settings.Designer.cs generated

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -12,7 +12,7 @@ namespace CodeFormatServiceClient.Properties { @@ -12,7 +12,7 @@ namespace CodeFormatServiceClient.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

20
samples/CodeConverter/Source/CodeFormatServiceClient/Web References/ICSharpCode.CodeFormat/Reference.cs

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Runtime Version:4.0.30319.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -9,21 +9,21 @@ @@ -9,21 +9,21 @@
//------------------------------------------------------------------------------
//
// This source code was auto-generated by Microsoft.VSDesigner, Version 2.0.50727.1433.
// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1.
//
#pragma warning disable 1591
namespace CodeFormatServiceClient.ICSharpCode.CodeFormat {
using System.Diagnostics;
using System;
using System.Web.Services;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services.Protocols;
using System;
using System.ComponentModel;
using System.Xml.Serialization;
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="CodeFormatServiceSoap", Namespace="http://codeconverter.sharpdevelop.net/")]
@ -157,11 +157,11 @@ namespace CodeFormatServiceClient.ICSharpCode.CodeFormat { @@ -157,11 +157,11 @@ namespace CodeFormatServiceClient.ICSharpCode.CodeFormat {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
public delegate void FormatCompletedEventHandler(object sender, FormatCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class FormatCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
@ -183,11 +183,11 @@ namespace CodeFormatServiceClient.ICSharpCode.CodeFormat { @@ -183,11 +183,11 @@ namespace CodeFormatServiceClient.ICSharpCode.CodeFormat {
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
public delegate void RetrieveAvailableHighlightersCompletedEventHandler(object sender, RetrieveAvailableHighlightersCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433")]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class RetrieveAvailableHighlightersCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {

43
samples/CodeConverter/Source/ICSharpCode.CodeConversion/ICSharpCode.CodeConversion.csproj

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -10,8 +10,28 @@ @@ -10,8 +10,28 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ICSharpCode.CodeConversion</RootNamespace>
<AssemblyName>ICSharpCode.CodeConversion</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -21,6 +41,7 @@ @@ -21,6 +41,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@ -29,6 +50,7 @@ @@ -29,6 +50,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="Boo.Lang, Version=2.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67, processorArchitecture=MSIL">
@ -82,6 +104,23 @@ @@ -82,6 +104,23 @@
<Compile Include="RubyHelpers.cs" />
<Compile Include="SnippetConversion.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

Loading…
Cancel
Save