Browse Source

Added template for ASHX handler.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5707 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Justin Dearing 15 years ago
parent
commit
d21cbadbb0
  1. 65
      data/templates/file/CSharp/CSharp.Web.WebHandler.xft
  2. 1
      src/Setup/Files.wxs

65
data/templates/file/CSharp/CSharp.Web.WebHandler.xft

@ -0,0 +1,65 @@
<?xml version="1.0"?>
<Template author="Justin Dearing" version="1.0">
<Config
name = "${res:Templates.File.WebHandler.Name}"
icon = "C#.File.NewClass"
category = "C#"
subcategory = "ASP.NET"
defaultname = "WebHandler${Number}.ashx"
language = "C#"
/>
<Description>${res:Templates.File.WebHandler.Description}</Description>
<!--
Special new file templates:
${StandardNamespace} -> Standardnamespace of the current project or FileNameWithoutExtension
${FullName} -> Full generated path name
${FileName} -> File name with extension
${FileNameWithoutExtension} -> File name without extension
${Extension} -> Extension in the form ".cs"
${Path} -> Full path of the file
-->
<Files>
<File name="${Path}/${FileName}.cs" DependentUpon="${FileName}" language="C#"><![CDATA[${StandardHeader.C#}
using System;
using System.Web;
namespace ${StandardNamespace}
{
/// <summary>
/// Description of ${ClassName}
/// </summary>
public class ${ClassName} : IHttpHandler
{
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#region Process Request
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
context.Response.Write(@"Hello #Develop.");
context.Response.Flush();
context.Response.Close();
}
#endregion
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
public bool IsReusable
{
get { return true; }
}
}
}
]]></File>
<File name="${FullName}" language="HTML"><![CDATA[<%@ WebHandler
Language = "C#"
Class = "${StandardNamespace}.${ClassName}"
%>
]]> </File>
</Files>
<AdditionalOptions/>
</Template>

1
src/Setup/Files.wxs

@ -722,6 +722,7 @@
<File Source="..\..\data\templates\file\CSharp\CSharp.Web.WebControl.xft" Id="CSharp.Web.WebControl.xft" Name="CSharp.Web.WebControl.xft" /> <File Source="..\..\data\templates\file\CSharp\CSharp.Web.WebControl.xft" Id="CSharp.Web.WebControl.xft" Name="CSharp.Web.WebControl.xft" />
<File Source="..\..\data\templates\file\CSharp\CSharp.Web.WebForm.xft" Id="CSharp.Web.WebForm.xft" Name="CSharp.Web.WebForm.xft" /> <File Source="..\..\data\templates\file\CSharp\CSharp.Web.WebForm.xft" Id="CSharp.Web.WebForm.xft" Name="CSharp.Web.WebForm.xft" />
<File Source="..\..\data\templates\file\CSharp\CSharp.Web.WebService.xft" Id="CSharp.Web.WebService.xft" Name="CSharp.Web.WebService.xft" /> <File Source="..\..\data\templates\file\CSharp\CSharp.Web.WebService.xft" Id="CSharp.Web.WebService.xft" Name="CSharp.Web.WebService.xft" />
<File Source="..\..\data\templates\file\CSharp\CSharp.Web.WebHandler.xft" Id="CSharp.Web.WebHandler.xft" Name="CSharp.Web.WebHandler.xft" />
<File Source="..\..\data\templates\file\CSharp\CSharp.WPFFlowDocument.xft" Id="CSharp.WPFFlowDocument.xft" Name="CSharp.WPFFlowDocument.xft" /> <File Source="..\..\data\templates\file\CSharp\CSharp.WPFFlowDocument.xft" Id="CSharp.WPFFlowDocument.xft" Name="CSharp.WPFFlowDocument.xft" />
<File Source="..\..\data\templates\file\CSharp\CSharp.WPFPage.xft" Id="CSharp.WPFPage.xft" Name="CSharp.WPFPage.xft" /> <File Source="..\..\data\templates\file\CSharp\CSharp.WPFPage.xft" Id="CSharp.WPFPage.xft" Name="CSharp.WPFPage.xft" />
<File Source="..\..\data\templates\file\CSharp\CSharp.WPFPageFunction.xft" Id="CSharp.WPFPageFunction.xft" Name="CSharp.WPFPageFunction.xft" /> <File Source="..\..\data\templates\file\CSharp\CSharp.WPFPageFunction.xft" Id="CSharp.WPFPageFunction.xft" Name="CSharp.WPFPageFunction.xft" />

Loading…
Cancel
Save