8 changed files with 349 additions and 61 deletions
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="13/09/2011" |
||||
lastModified="13/09/2011" |
||||
version="1.0"> |
||||
|
||||
<Config |
||||
name="WCF REST Service" |
||||
icon="C#.File.NewClass" |
||||
category="C#" |
||||
subcategory="WCF" |
||||
defaultname="Service${Number}.svc" |
||||
language="C#"/> |
||||
|
||||
<Description>WCF REST Service</Description> |
||||
|
||||
<Files> |
||||
<File name="${FullName}"> |
||||
<![CDATA[ |
||||
<%@ServiceHost language="C#" Debug="true" Service="${StandardNamespace}.${ClassName}"%> |
||||
]]> |
||||
</File> |
||||
<File name="${FullName}.cs" language="C#" DependentUpon="${FullName}"> |
||||
<![CDATA[${StandardHeader.C#} |
||||
using System; |
||||
using System.ServiceModel; |
||||
using System.ServiceModel.Web; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
[ServiceContract] |
||||
public interface I${ClassName} |
||||
{ |
||||
[OperationContract] |
||||
[WebGet(UriTemplate = "operation/{name}")] |
||||
string MyOperation(string name); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Description of ${ClassName}. |
||||
/// </summary> |
||||
public class ${ClassName} : I${ClassName} |
||||
{ |
||||
public string MyOperation(string name) |
||||
{ |
||||
// implement the operation |
||||
return string.Format("Operation name: {0}", name); |
||||
} |
||||
} |
||||
} |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Template> |
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="13/09/2011" |
||||
lastModified="01/09/2011" |
||||
version="1.0"> |
||||
|
||||
<Config |
||||
name="WCF REST Service" |
||||
icon="VBNet.File.NewClass" |
||||
category="VB" |
||||
subcategory="WCF" |
||||
defaultname="Service${Number}.svc" |
||||
language="VBNET"/> |
||||
|
||||
<Description>WCF REST Service</Description> |
||||
|
||||
<Files> |
||||
<File name="${FullName}"> |
||||
<![CDATA[ |
||||
<%@ServiceHost language="VB" Debug="true" Service="${StandardNamespace}.${ClassName}"%> |
||||
]]> |
||||
</File> |
||||
<File name="${FullName}.vb" language="VBNET" DependentUpon="${FullName}"> |
||||
<![CDATA[${StandardHeader.VBNET} |
||||
Imports System |
||||
Imports System.ServiceModel |
||||
Imports System.ServiceModel.Web |
||||
|
||||
<ServiceContract> _ |
||||
Public Interface I${ClassName} |
||||
<OperationContract> _ |
||||
<WebGet(UriTemplate := "operation/{name}")> _ |
||||
Function MyOperation(name As String) As String |
||||
End Interface |
||||
|
||||
''' <summary> |
||||
''' Description of ${ClassName}. |
||||
''' </summary> |
||||
Public Class ${ClassName} |
||||
Implements I${ClassName} |
||||
Function MyOperation(name As String) As String Implements I${ClassName}.MyOperation |
||||
' implement the operation |
||||
Return String.Format("Operation name: {0}", name) |
||||
End Sub |
||||
End Class |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Template> |
@ -0,0 +1,104 @@
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="13/09/2011" |
||||
lastModified="13/09/2011" |
||||
version="1.0"> |
||||
|
||||
<!-- Template Header --> |
||||
<TemplateConfiguration> |
||||
<Name>WCF REST Service</Name> |
||||
<Category>C#</Category> |
||||
<Subcategory>WCF</Subcategory> |
||||
<Icon>C#.Project.Form</Icon> |
||||
<Description>WCF REST Service</Description> |
||||
<SupportedTargetFrameworks>v3.5</SupportedTargetFrameworks> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename="Service.svc.cs"/> |
||||
</Actions> |
||||
|
||||
<Project language="C#"> |
||||
<ProjectItems> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.ServiceModel" /> |
||||
<Reference Include="System.ServiceModel.Web" /> |
||||
</ProjectItems> |
||||
|
||||
<PropertyGroup escapeValue="False"> |
||||
<OutputType>Library</OutputType> |
||||
<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
</PropertyGroup> |
||||
|
||||
<PropertyGroup configuration="Debug"> |
||||
<OutputPath>bin\</OutputPath> |
||||
</PropertyGroup> |
||||
|
||||
<PropertyGroup configuration="Release"> |
||||
<OutputPath>bin\</OutputPath> |
||||
</PropertyGroup> |
||||
|
||||
<Files> |
||||
<File name="Properties\AssemblyInfo.cs" src="DefaultAssemblyInfo.cs" /> |
||||
<File name="Service.svc"> |
||||
<![CDATA[ |
||||
<%@ServiceHost language="C#" Debug="true" Service="${StandardNamespace}.Service"%> |
||||
]]> |
||||
</File> |
||||
<File name="Service.svc.cs" DependentUpon="Service.svc"> |
||||
<![CDATA[${StandardHeader.C#} |
||||
using System; |
||||
using System.ServiceModel; |
||||
using System.ServiceModel.Web; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
[ServiceContract] |
||||
public interface IService |
||||
{ |
||||
[OperationContract] |
||||
[WebGet(UriTemplate = "operation/{name}")] |
||||
string MyOperation(string name); |
||||
} |
||||
|
||||
public class Service : IService |
||||
{ |
||||
public string MyOperation(string name) |
||||
{ |
||||
// implement the operation |
||||
return string.Format("Operation name: {0}", name); |
||||
} |
||||
} |
||||
} |
||||
]]> |
||||
</File> |
||||
<File name="web.config"> |
||||
<![CDATA[<?xml version="1.0" encoding="utf-8" ?> |
||||
<configuration> |
||||
<system.serviceModel> |
||||
<services> |
||||
<service name="${StandardNamespace}.Service"> |
||||
<endpoint address="" |
||||
binding="webHttpBinding" |
||||
contract="${StandardNamespace}.IService" |
||||
behaviorConfiguration="webHttp" /> |
||||
</service> |
||||
</services> |
||||
<behaviors> |
||||
<endpointBehaviors> |
||||
<behavior name="webHttp"> |
||||
<webHttp/> |
||||
</behavior> |
||||
</endpointBehaviors> |
||||
</behaviors> |
||||
</system.serviceModel> |
||||
|
||||
</configuration> |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
@ -0,0 +1,99 @@
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="13/09/2011" |
||||
lastModified="13/09/2011" |
||||
version="1.0"> |
||||
|
||||
<!-- Template Header --> |
||||
<TemplateConfiguration> |
||||
<Name>WCF REST Service</Name> |
||||
<Category>VB</Category> |
||||
<Subcategory>WCF</Subcategory> |
||||
<Icon>VBNet.Project.Form</Icon> |
||||
<Description>WCF REST Service</Description> |
||||
<SupportedTargetFrameworks>v3.5</SupportedTargetFrameworks> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename="Service.svc.vb"/> |
||||
</Actions> |
||||
|
||||
<Project language="VBNet"> |
||||
<ProjectItems> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.ServiceModel" /> |
||||
<Reference Include="System.ServiceModel.Web" /> |
||||
</ProjectItems> |
||||
|
||||
<PropertyGroup escapeValue="False"> |
||||
<OutputType>Library</OutputType> |
||||
<ProjectTypeGuids>{3D9AD99F-2412-4246-B90B-4EAA41C64699};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
</PropertyGroup> |
||||
|
||||
<PropertyGroup configuration="Debug"> |
||||
<OutputPath>bin\</OutputPath> |
||||
</PropertyGroup> |
||||
|
||||
<PropertyGroup configuration="Release"> |
||||
<OutputPath>bin\</OutputPath> |
||||
</PropertyGroup> |
||||
|
||||
<Files> |
||||
<File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb" /> |
||||
<File name="Service.svc"> |
||||
<![CDATA[ |
||||
<%@ServiceHost language="VB" Debug="true" Service="${StandardNamespace}.Service"%> |
||||
]]> |
||||
</File> |
||||
<File name="Service.svc.vb" DependentUpon="Service.svc"> |
||||
<![CDATA[${StandardHeader.VBNET} |
||||
Imports System |
||||
Imports System.ServiceModel |
||||
Imports System.ServiceModel.Web |
||||
|
||||
<ServiceContract> _ |
||||
Public Interface IService |
||||
<OperationContract> _ |
||||
<WebGet(UriTemplate := "operation/{name}")> _ |
||||
Function MyOperation(name As String) As String |
||||
End Interface |
||||
|
||||
Public Class Service |
||||
Implements IService |
||||
Function MyOperation(name As String) As String Implements IService.MyOperation |
||||
' implement the operation |
||||
Return String.Format("Operation name: {0}", name) |
||||
End Function |
||||
End Class |
||||
]]> |
||||
</File> |
||||
<File name="web.config"> |
||||
<![CDATA[<?xml version="1.0" encoding="utf-8" ?> |
||||
<configuration> |
||||
<system.serviceModel> |
||||
<services> |
||||
<service name="${StandardNamespace}.Service"> |
||||
<endpoint address="" |
||||
binding="webHttpBinding" |
||||
contract="${StandardNamespace}.IService" |
||||
behaviorConfiguration="webHttp" /> |
||||
</service> |
||||
</services> |
||||
<behaviors> |
||||
<endpointBehaviors> |
||||
<behavior name="webHttp"> |
||||
<webHttp/> |
||||
</behavior> |
||||
</endpointBehaviors> |
||||
</behaviors> |
||||
</system.serviceModel> |
||||
|
||||
</configuration> |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
Loading…
Reference in new issue