Browse Source

added some missing VB .NET templates

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/vbnet@6164 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Siegfried Pammer 15 years ago
parent
commit
7482ad64a2
  1. 14
      data/templates/file/VBNet/VBNet.Exception.xft
  2. 70
      data/templates/file/VBNet/VBNet.Structure.xft
  3. 63
      data/templates/file/VBNet/VBNet.Web.WebHandler.xft

14
data/templates/file/VBNet/VBNet.Exception.xft

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
icon = "VBNet.File.NewClass"
category = "VB"
defaultname = "Exception.vb"
language = "VBNET"/>
language = "VBNet"/>
<Description>${res:Templates.File.Exception.Description}</Description>
@ -16,9 +16,19 @@ @@ -16,9 +16,19 @@
${FullName} -> Full generated path name
${FileName} -> File name with extension
${FileNameWithoutExtension} -> File name without extension
${Extension} -> Extension in the form ".cs"
${Extension} -> Extension in the form ".vb"
${Path} -> Full path of the file
-->
<!--<Properties>
<Property
name = "IsSealed"
localizedName = "${res:Templates.File.Properties.IsSealed}"
type = "System.Boolean"
defaultValue = "False"
category = "${res:Templates.File.Properties.ContextCategory}"
description = "${res:Templates.File.Properties.IsSealed.Description}"
/>
</Properties>-->
<Files>
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}

70
data/templates/file/VBNet/VBNet.Structure.xft

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
<?xml version="1.0"?>
<Template author="Siegfried Pammer" version="1.0">
<Config
name = "${res:Templates.File.Structure.Name}"
icon = "VBNet.File.NewClass"
category = "VB"
defaultname = "Structure${Number}.vb"
language = "VBNET"/>
<Description>${res:Templates.File.Structure.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 ".vb"
${Path} -> Full path of the file
${ClassName} -> Structure name (generally FileNameWithoutExtension w/o 'bad' characters)
-->
<Files>
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
Imports System
''' <summary>
''' Description of ${ClassName}.
''' </summary>
Public Structure ${ClassName}
Implements IEquatable(Of ${ClassName})
Private member As Integer
' this is just an example member, replace it with your own struct members!
#Region "Equals and GetHashCode implementation"
' The code in this region is useful if you want to use this structure in collections.
' If you don't need it, you can just remove the region and the "Implements IEquatable(Of ${ClassName})" declaration.
Public Overrides Function Equals(obj As Object) As Boolean
If TypeOf obj Is ${ClassName} Then
Return Equals(CType(obj, ${ClassName}))
Else
' use Equals method below
Return False
End If
End Function
Public Overloads Function Equals(other As ${ClassName}) As Boolean
' add comparisions for all members here
Return Me.member = other.member
End Function
Public Overrides Function GetHashCode() As Integer
' combine the hash codes of all members here (e.g. with XOr operator)
Return member.GetHashCode()
End Function
Public Shared Operator =(left As ${ClassName}, right As ${ClassName}) As Boolean
Return left.Equals(right)
End Operator
Public Shared Operator <>(left As ${ClassName}, right As ${ClassName}) As Boolean
Return Not left.Equals(right)
End Operator
#End Region
End Structure
]]></File>
</Files>
<AdditionalOptions/>
</Template>

63
data/templates/file/VBNet/VBNet.Web.WebHandler.xft

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
<?xml version="1.0"?>
<Template author="Siegfried Pammer" version="1.0">
<Config
name = "${res:Templates.File.WebHandler.Name}"
icon = "VBNet.File.NewClass"
category = "VB"
subcategory = "ASP.NET"
defaultname = "WebHandler${Number}.ashx"
language = "VBNET"
/>
<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 ".vb"
${Path} -> Full path of the file
-->
<Files>
<File name="${Path}/${FileName}.vb" DependentUpon="${FileName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
Imports System
Imports System.Web
Namespace ${StandardNamespace}
''' <summary>
''' Description of ${ClassName}
''' </summary>
Public Class ${ClassName}
Implements IHttpHandler
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#Region "Process Request"
Public Sub ProcessRequest(context As HttpContext)
context.Response.ContentType = "text/plain"
context.Response.Write("Hello #Develop.")
context.Response.Flush()
context.Response.Close()
End Sub
#End Region
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Public ReadOnly Property IsReusable() As Boolean
Get
Return True
End Get
End Property
End Class
End Namespace]]></File>
<File name="${FullName}" language="HTML"><![CDATA[<%@ WebHandler
Language = "VB"
Class = "${StandardNamespace}.${ClassName}"
%>
]]> </File>
</Files>
<AdditionalOptions/>
</Template>
Loading…
Cancel
Save