home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Programare / Sharp / SharpDevelop_1.0.3.1761_Setup.exe / VBNet.Patterns.Singleton.xft < prev    next >
Encoding:
Extensible Markup Language  |  2004-10-06  |  1.3 KB  |  51 lines

  1. <?xml version="1.0"?>
  2. <Template author="Markus Palme" version="1.0">
  3.     
  4.     <Config
  5.           name        = "${res:Templates.File.SingletonClass.Name}"
  6.           icon        = "VB.File.NewClass"
  7.           category    = "VB"
  8.           defaultname = "SingletonClass${Number}.vb"
  9.           language    = "VBNET"/>
  10.      
  11.     <Description>${res:Templates.File.SingletonClass.Description}</Description>
  12.     
  13.     <!-- 
  14.     Special new file templates:
  15.         ${StandardNamespace}        -> Standardnamespace of the current project or FileNameWithoutExtension
  16.         ${FullName}                 -> Full generated path name
  17.         ${FileName}                 -> File name with extension
  18.         ${FileNameWithoutExtension} -> File name without extension
  19.         ${Extension}                -> Extension in the form ".vb"
  20.         ${Path}                     -> Full path of the file
  21.      -->
  22.     <Files>
  23.         <File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
  24.  
  25. Imports System
  26.  
  27. Namespace ${StandardNamespace}
  28.     ' Description of ${ClassName}.
  29.     Public NotInheritable Class ${ClassName}
  30.     
  31.         Private Shared _instance As ${ClassName} = New ${ClassName}()
  32.         
  33.         Public ReadOnly Shared Property Instance As ${ClassName}
  34.             Get
  35.                 Return _instance
  36.             End Get
  37.         End Property
  38.         
  39.         Private Sub New()
  40.         
  41.         End Sub
  42.     End Class
  43. End Namespace
  44. ]]></File>
  45.     </Files>
  46.     
  47.     <AdditionalOptions/>
  48. </Template>
  49.  
  50.  
  51.