Browse Source

I cleaned up the tabs for the ConfigurationElement.cs(Section|Collection|Element) xtf files. Cleaned up the comments in the associated .cs files. Also added contructor code to ConfigurationSection to all the section to appear in user.app.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2307 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Justin Dearing 19 years ago
parent
commit
a1a53eeb43
  1. 14
      data/templates/file/CSharp/CSharp.ConfigurationElement.xft
  2. 14
      data/templates/file/CSharp/CSharp.ConfigurationElementCollection.xft
  3. 12
      data/templates/file/CSharp/CSharp.ConfigurationSection.xft
  4. 4
      data/templates/file/CSharp/ConfigurationElement.cs
  5. 4
      data/templates/file/CSharp/ConfigurationElementCollection.cs
  6. 16
      data/templates/file/CSharp/ConfigurationSection.cs

14
data/templates/file/CSharp/CSharp.ConfigurationElement.xft

@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
<?xml version="1.0"?>
<Template author="Justin Dearing" version="1.0">
<Template author="Justin Dearing" version="1.1">
<Config
name = "${res:Templates.File.ConfigurationElement.Name}"
icon = "C#.File.NewClass"
category = "C#"
defaultname = "Class${Number}.cs"
defaultname = "Class${Number}.cs"
language = "C#"/>
<Description>${res:Templates.File.ConfigurationElement.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
${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 ".cs"
${Path} -> Full path of the file
${Path} -> Full path of the file
${ClassName} -> Class name (generally FileNameWithoutExtension w/o 'bad' characters)
-->
<Files>

14
data/templates/file/CSharp/CSharp.ConfigurationElementCollection.xft

@ -1,20 +1,20 @@ @@ -1,20 +1,20 @@
<?xml version="1.0"?>
<Template author="Justin Dearing" version="1.0">
<Template author="Justin Dearing" version="1.1">
<Config
name = "${res:Templates.File.ConfigurationElementCollection.Name}"
icon = "C#.File.NewClass"
category = "C#"
defaultname = "Class${Number}.cs"
defaultname = "Class${Number}.cs"
language = "C#"/>
<Description>${res:Templates.File.ConfigurationElementCollection.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
${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 ".cs"
${Path} -> Full path of the file
${Path} -> Full path of the file
${ClassName} -> Class name (generally FileNameWithoutExtension w/o 'bad' characters)
-->
<Files>

12
data/templates/file/CSharp/CSharp.ConfigurationSection.xft

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<?xml version="1.0"?>
<Template author="Justin Dearing" version="1.0">
<Template author="Justin Dearing" version="1.1">
<Config
name = "${res:Templates.File.ConfigurationSection.Name}"
icon = "C#.File.NewClass"
@ -9,12 +9,12 @@ @@ -9,12 +9,12 @@
<Description>${res:Templates.File.ConfigurationSection.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
${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 ".cs"
${Path} -> Full path of the file
${Path} -> Full path of the file
${ClassName} -> Class name (generally FileNameWithoutExtension w/o 'bad' characters)
-->
<Files>

4
data/templates/file/CSharp/ConfigurationElement.cs

@ -5,6 +5,10 @@ using System.Configuration; @@ -5,6 +5,10 @@ using System.Configuration;
namespace ${StandardNamespace}
{
/// <summary>
/// Represents a single XML tag inside a ConfigurationSection
/// or a ConfigurationElementCollection.
/// </summary>
public sealed class ${ClassName}Element : ConfigurationElement
{
/// <summary>

4
data/templates/file/CSharp/ConfigurationElementCollection.cs

@ -7,9 +7,9 @@ using System.Configuration; @@ -7,9 +7,9 @@ using System.Configuration;
namespace ${StandardNamespace}
{
/// <summary>
/// Description of ${ClassName}.
/// A collection of ${ClassName}Element(s).
/// </summary>
public sealed class ${ClassName}Collection : ConfigurationElementCollection
public class ${ClassName}Collection : ConfigurationElementCollection
{
#region Properties

16
data/templates/file/CSharp/ConfigurationSection.cs

@ -8,17 +8,27 @@ namespace ${StandardNamespace} @@ -8,17 +8,27 @@ namespace ${StandardNamespace}
/// <summary>
/// Configuration settings for ${ClassName}.
/// </summary>
public class ${ClassName}Section : ConfigurationSection
public class ${ClassName}Section : ConfigurationSection
{
/// <summary>
/// Collection of tables (auctually views) to generate
/// reports from.
/// A custom XML section for an applications configuration file.
/// </summary>
[ConfigurationProperty("customSection", IsDefaultCollection = true)]
public ${ClassName}Collection ${ClassName}
{
get { return (${ClassName}Collection) base["customSection"]; }
}
/// <summary>
/// Default Constructor.
/// </summary>
public PlaneDisasterSection () : base () {
//Allow this section to be stored in user.app. By default this is forbidden.
this.SectionInformation.AllowExeDefinition =
ConfigurationAllowExeDefinition.MachineToLocalUser;
}
}
}

Loading…
Cancel
Save