Browse Source

Added ASP.NET Web Service project template by Justin Dearing. Added missing project and file templates to SharpDevelop's installer.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1782 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 19 years ago
parent
commit
1c325355a7
  1. 127
      data/templates/project/CSharp/WebService.xpt
  2. 10
      src/Setup/Files.wxs
  3. 3
      src/Setup/Setup.wxs

127
data/templates/project/CSharp/WebService.xpt

@ -0,0 +1,127 @@ @@ -0,0 +1,127 @@
<?xml version="1.0"?>
<Template originator = "Jusin Dearing"
created = "06/09/2006"
lastModified = "06/09/2006">
<!-- Template Header -->
<TemplateConfiguration>
<Name>${res:Templates.Project.WebService.Name}</Name>
<Category>C#</Category>
<Subcategory>ASP.NET</Subcategory>
<Icon>C#.Project.Form</Icon>
<LanguageName>C#</LanguageName>
<Description>${res:Templates.Project.WebService.Description}</Description>
</TemplateConfiguration>
<!-- Actions -->
<Actions>
<Open filename = "Default.asmx" />
<Open filename = "Soap.cs" />
</Actions>
<Combine name = "${ProjectName}" directory = ".">
<Options>
<StartupProject>${ProjectName}</StartupProject>
</Options>
<Project name = "${ProjectName}" directory = ".">
<Options OutputType = "Library" />
<ProjectItems>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml" />
</ProjectItems>
<PropertyGroup>
<OutputPath>bin\</OutputPath>
</PropertyGroup>
<Files>
<File name="Soap.cs" dependentUpon="Default.asmx"><![CDATA[${StandardHeader.C#}
using System;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
namespace ${StandardNamespace}
{
[WebService]
public class Soap : System.Web.Services.WebService
{
/// <summary>
/// Logs into the web service
/// </summary>
/// <param name="userName">The User Name to login in as</param>
/// <param name="password">User's password</param>
/// <returns>True on successful login.</returns>
[WebMethod(EnableSession=true)]
public bool Login(string userName, string password)
{
//NOTE: There are better ways of doing authentication. This is just illustrates Session usage.
UserName = userName;
return true;
}
/// <summary>
/// Logs out of the Session.
/// </summary>
[WebMethod(EnableSession=true)]
public void Logout()
{
Context.Session.Abandon();
}
/// <summary>
/// UserName of the logged in user.
/// </summary>
private string UserName {
get {return (string)Context.Session["User"];}
set {Context.Session["User"] = value;}
}
}
}
]]></File>
<File name="Default.asmx" language="XML"><![CDATA[<%@ WebService Language="C#" Class="${StandardNamespace}.Soap,Soap" %>]]></File>
<!--*************************************************************************-->
<File name="Web.config" language="XML"><![CDATA[<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm ">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>]]></File>
<File name="AssemblyInfo.cs" src="DefaultAssemblyInfo.cs" />
</Files>
</Project>
</Combine>
</Template>

10
src/Setup/Files.wxs

@ -639,6 +639,9 @@ @@ -639,6 +639,9 @@
<File Source="..\..\data\templates\file\CSharp\CSharp.WPFUserControl.xft" Name="CSHAR_16.XFT" Id="CSharp.WPFUserControl.xft" LongName="CSharp.WPFUserControl.xft" />
<File Source="..\..\data\templates\file\CSharp\CSharp.WPFWindow.xft" Name="CSHAR_17.XFT" Id="CSharp.WPFWindow.xft" LongName="CSharp.WPFWindow.xft" />
</Component>
<Component Guid="16055582-32EE-4418-A06B-488AC5EC79E4" Id="CSharpStructTemplate" DiskId="1">
<File Source="..\..\data\templates\file\CSharp\CSharp.Struct.xft" Name="CSSTRUCT.XFT" Id="CSharp.Struct.xft" LongName="CSharp.Struct.xft"/>
</Component>
</Directory>
<Directory Id="MiscFileTemplatesFolder" Name="Misc">
<Component Guid="2BDF0836-B3D9-4B96-8F9F-59477B0C6F21" Id="MiscFileTemplates" DiskId="1">
@ -701,6 +704,13 @@ @@ -701,6 +704,13 @@
<File Source="..\..\data\templates\project\CSharp\WebpageProject.xpt" Name="WEBPAG_1.XPT" Id="CSharpWebpageProject.xpt" LongName="WebpageProject.xpt" />
<File Source="..\..\data\templates\project\CSharp\WPFApplication.xpt" Name="WPFAPP_1.XPT" Id="CSharpWPFApplication.xpt" LongName="WPFApplication.xpt" />
</Component>
<Component Guid="2EBDC2FE-A2C9-4023-BC86-0E688B5897A3" Id="CSharpNotifyIconProjectTemplate" DiskId="1">
<File Source="..\..\data\templates\project\CSharp\NotifyIcon.xpt" Name="NOTIFY.XPT" Id="NotifyIcon.xpt" LongName="NotifyIcon.xpt" />
<File Source="..\..\data\templates\project\CSharp\NotifyIconResources.resx" Name="NOTIFY.RES" Id="NotifyIconResources.resx" LongName="NotifyIconResources.resx" />
</Component>
<Component Guid="7D1DCA03-CB13-4516-B232-028F53B096BF" Id="CSharpWebServiceProjectTemplate" DiskId="1">
<File Source="..\..\data\templates\project\CSharp\WebService.xpt" Name="WEBSRVC.XPT" Id="WebService.xpt" LongName="WebService.xpt"/>
</Component>
</Directory>
<Directory Id="MiscProjectTemplatesFolder" Name="Misc">
<Component Guid="F9A7F832-6EC8-4B15-A037-146BD028C9D5" Id="MiscProjectTemplates" DiskId="1">

3
src/Setup/Setup.wxs

@ -228,6 +228,9 @@ @@ -228,6 +228,9 @@
<ComponentRef Id="MiscFileTemplates"/>
<ComponentRef Id="SharpDevelopFileTemplates"/>
<ComponentRef Id="CSharpProjectTemplates"/>
<ComponentRef Id="CSharpWebServiceProjectTemplate"/>
<ComponentRef Id="CSharpNotifyIconProjectTemplate"/>
<ComponentRef Id="CSharpStructTemplate"/>
<ComponentRef Id="MiscProjectTemplates"/>
<ComponentRef Id="VBNetProjectTemplates"/>
<ComponentRef Id="ExampleProjectTemplate"/>

Loading…
Cancel
Save