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

  1. <?xml version="1.0"?>
  2. <Template author="Mike Krueger" version="1.0">
  3.     
  4.     <Config
  5.         name        = "${res:Templates.File.SingletonClass.Name}"
  6.         icon        = "C#.File.NewClass"
  7.         category    = "C#"
  8.         defaultname = "SingletonClass${Number}.cs"
  9.         language    = "C#"
  10.     />
  11.      
  12.     <Description>${res:Templates.File.SingletonClass.Description}</Description>
  13.     
  14.     <!-- 
  15.     Special new file templates:
  16.         ${StandardNamespace}        -> Standardnamespace of the current project or FileNameWithoutExtension
  17.         ${FullName}                 -> Full generated path name
  18.         ${FileName}                 -> File name with extension
  19.         ${FileNameWithoutExtension} -> File name without extension
  20.         ${Extension}                -> Extension in the form ".cs"
  21.         ${Path}                     -> Full path of the file
  22.      -->
  23.     <Files>
  24.         <File name="${FullName}" language="C#"><![CDATA[${StandardHeader.C#}
  25.  
  26. using System;
  27.  
  28. namespace ${StandardNamespace}
  29. {
  30.     /// <summary>
  31.     /// Description of ${ClassName}.
  32.     /// </summary>
  33.     public sealed class ${ClassName}
  34.     {
  35.         private static ${ClassName} instance = new ${ClassName}();
  36.         
  37.         public static ${ClassName} Instance {
  38.             get {
  39.                 return instance;
  40.             }
  41.         }
  42.         
  43.         private ${ClassName}()
  44.         {
  45.         }
  46.     }
  47. }
  48. ]]></File>
  49.     </Files>
  50.     
  51.     <AdditionalOptions/>
  52. </Template>
  53.  
  54.  
  55.