6 changed files with 333 additions and 0 deletions
@ -0,0 +1,52 @@
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="03/08/2011" |
||||
lastModified="03/08/2011" |
||||
version="1.0"> |
||||
|
||||
<Config |
||||
name="WCF Service" |
||||
icon="C#.File.NewClass" |
||||
category="C#" |
||||
subcategory="WCF" |
||||
defaultname="Service${Number}.svc" |
||||
language="C#"/> |
||||
|
||||
<Description>WCF 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; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
[ServiceContract] |
||||
public interface I${ClassName} |
||||
{ |
||||
[OperationContract] |
||||
void MyOperation(); |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Description of ${ClassName}. |
||||
/// </summary> |
||||
public class ${ClassName} : I${ClassName} |
||||
{ |
||||
public void MyOperation() |
||||
{ |
||||
// implement the operation |
||||
} |
||||
} |
||||
} |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Template> |
@ -0,0 +1,47 @@
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="03/08/2011" |
||||
lastModified="03/08/2011" |
||||
version="1.0"> |
||||
|
||||
<Config |
||||
name="WCF Service" |
||||
icon="VBNet.File.NewClass" |
||||
category="VB" |
||||
subcategory="WCF" |
||||
defaultname="Service${Number}.svc" |
||||
language="VBNET"/> |
||||
|
||||
<Description>WCF 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 |
||||
|
||||
<ServiceContract> _ |
||||
Public Interface I${ClassName} |
||||
<OperationContract> _ |
||||
Sub MyOperation() |
||||
End Interface |
||||
|
||||
''' <summary> |
||||
''' Description of ${ClassName}. |
||||
''' </summary> |
||||
Public Class ${ClassName} |
||||
Implements I${ClassName} |
||||
Public Sub MyOperation() Implements I${ClassName}.MyOperation |
||||
' implement the operation |
||||
End Sub |
||||
End Class |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Template> |
@ -0,0 +1,112 @@
@@ -0,0 +1,112 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="03/08/2011" |
||||
lastModified="03/08/2011" |
||||
version="1.0"> |
||||
|
||||
<!-- Template Header --> |
||||
<TemplateConfiguration> |
||||
<Name>WCF Service</Name> |
||||
<Category>C#</Category> |
||||
<Subcategory>WCF</Subcategory> |
||||
<Icon>C#.Project.Form</Icon> |
||||
<Description>WCF Service</Description> |
||||
<SupportedTargetFrameworks>v3.0</SupportedTargetFrameworks> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename="ServiceCalculator.svc.cs"/> |
||||
</Actions> |
||||
|
||||
<Project language="C#"> |
||||
<ProjectItems> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.ServiceModel" /> |
||||
</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="ServiceCalculator.svc"> |
||||
<![CDATA[ |
||||
<%@ServiceHost language="C#" Debug="true" Service="${StandardNamespace}.ServiceCalculator"%> |
||||
]]> |
||||
</File> |
||||
<File name="ServiceCalculator.svc.cs" DependentUpon="ServiceCalculator.svc"> |
||||
<![CDATA[${StandardHeader.C#} |
||||
using System; |
||||
using System.ServiceModel; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
[ServiceContract] |
||||
public interface ICalculator |
||||
{ |
||||
[OperationContract] |
||||
double Add(double n1, double n2); |
||||
[OperationContract] |
||||
double Subtract(double n1, double n2); |
||||
[OperationContract] |
||||
double Multiply(double n1, double n2); |
||||
[OperationContract] |
||||
double Divide(double n1, double n2); |
||||
} |
||||
|
||||
public class ServiceCalculator : ICalculator |
||||
{ |
||||
public double Add(double n1, double n2) |
||||
{ |
||||
return n1 + n2; |
||||
} |
||||
public double Subtract(double n1, double n2) |
||||
{ |
||||
return n1 - n2; |
||||
} |
||||
public double Multiply(double n1, double n2) |
||||
{ |
||||
return n1 * n2; |
||||
} |
||||
public double Divide(double n1, double n2) |
||||
{ |
||||
return n1 / n2; |
||||
} |
||||
} |
||||
} |
||||
]]> |
||||
</File> |
||||
<File name="web.config"> |
||||
<![CDATA[<?xml version="1.0" encoding="utf-8" ?> |
||||
<configuration> |
||||
<system.serviceModel> |
||||
<services> |
||||
<!-- This section is optional with the default configuration model introduced in .NET Framework 4 --> |
||||
<service name="${StandardNamespace}.ServiceCalculator"> |
||||
<!-- This endpoint is exposed at the base address provided by host: http://localhost/${ProjectName}/ServiceCalculator.svc --> |
||||
<endpoint address="" |
||||
binding="wsHttpBinding" |
||||
contract="${StandardNamespace}.ICalculator" /> |
||||
</service> |
||||
</services> |
||||
</system.serviceModel> |
||||
|
||||
</configuration> |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
@ -0,0 +1,104 @@
@@ -0,0 +1,104 @@
|
||||
<?xml version="1.0"?> |
||||
<Template |
||||
author="Eusebiu Marcu" |
||||
created="03/08/2011" |
||||
lastModified="03/08/2011" |
||||
version="1.0"> |
||||
|
||||
<!-- Template Header --> |
||||
<TemplateConfiguration> |
||||
<Name>WCF Service</Name> |
||||
<Category>VB</Category> |
||||
<Subcategory>WCF</Subcategory> |
||||
<Icon>VBNet.Project.Form</Icon> |
||||
<Description>WCF Service</Description> |
||||
<SupportedTargetFrameworks>v3.0</SupportedTargetFrameworks> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename="ServiceCalculator.svc.vb"/> |
||||
</Actions> |
||||
|
||||
<Project language="VBNet"> |
||||
<ProjectItems> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.ServiceModel" /> |
||||
</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="ServiceCalculator.svc"> |
||||
<![CDATA[ |
||||
<%@ServiceHost language="VB" Debug="true" Service="${StandardNamespace}.ServiceCalculator"%> |
||||
]]> |
||||
</File> |
||||
<File name="ServiceCalculator.svc.vb" DependentUpon="ServiceCalculator.svc"> |
||||
<![CDATA[${StandardHeader.VBNET} |
||||
Imports System |
||||
Imports System.ServiceModel |
||||
|
||||
<ServiceContract> _ |
||||
Public Interface ICalculator |
||||
<OperationContract> _ |
||||
Function Add(n1 As Double, n2 As Double) As Double |
||||
<OperationContract> _ |
||||
Function Subtract(n1 As Double, n2 As Double) As Double |
||||
<OperationContract> _ |
||||
Function Multiply(n1 As Double, n2 As Double) As Double |
||||
<OperationContract> _ |
||||
Function Divide(n1 As Double, n2 As Double) As Double |
||||
End Interface |
||||
|
||||
Public Class ServiceCalculator |
||||
Implements ICalculator |
||||
Public Function Add(n1 As Double, n2 As Double) As Double Implements ICalculator.Add |
||||
Return n1 + n2 |
||||
End Function |
||||
Public Function Subtract(n1 As Double, n2 As Double) As Double Implements ICalculator.Subtract |
||||
Return n1 - n2 |
||||
End Function |
||||
Public Function Multiply(n1 As Double, n2 As Double) As Double Implements ICalculator.Multiply |
||||
Return n1 * n2 |
||||
End Function |
||||
Public Function Divide(n1 As Double, n2 As Double) As Double Implements ICalculator.Divide |
||||
Return n1 / n2 |
||||
End Function |
||||
End Class |
||||
]]> |
||||
</File> |
||||
<File name="web.config"> |
||||
<![CDATA[<?xml version="1.0" encoding="utf-8" ?> |
||||
<configuration> |
||||
<system.serviceModel> |
||||
<services> |
||||
<!-- This section is optional with the default configuration model introduced in .NET Framework 4 --> |
||||
<service name="${StandardNamespace}.ServiceCalculator"> |
||||
<!-- This endpoint is exposed at the base address provided by host: http://localhost/${ProjectName}/ServiceCalculator.svc --> |
||||
<endpoint address="" |
||||
binding="wsHttpBinding" |
||||
contract="${StandardNamespace}.ICalculator" /> |
||||
</service> |
||||
</services> |
||||
</system.serviceModel> |
||||
|
||||
</configuration> |
||||
]]> |
||||
</File> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
Loading…
Reference in new issue