Browse Source
Added support for ImportProjectItems. Reworked NRefactory to use List<AttributeSection> instead of ArrayList for attributes and List<ParameterDeclarationExpression> instead of ArrayList for parameter declarations. Added Ctrl+'.' debug code completion. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@220 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
91 changed files with 1448 additions and 2448 deletions
@ -1,296 +0,0 @@
@@ -1,296 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Mike Krueger" version="1.0"> |
||||
|
||||
<Config |
||||
name = "${res:Templates.File.TypedCollection.Name}" |
||||
icon = "C#.File.FullFile" |
||||
category = "C#" |
||||
defaultname = "TypedCollection${Number}.cs" |
||||
language = "C#" |
||||
/> |
||||
|
||||
<Description>${res:Templates.File.TypedCollection.Description}</Description> |
||||
|
||||
<Properties> |
||||
<Property |
||||
name = "ItemType" |
||||
localizedName = "${res:Templates.File.Properties.TypedCollectionWizard.ItemType}" |
||||
type = "System.String" |
||||
category = "${res:Templates.File.Properties.ContextCategory}" |
||||
description = "${res:Templates.File.Properties.TypedCollectionWizard.ItemType.Description}" |
||||
/> |
||||
<Property |
||||
name = "Accessibility" |
||||
localizedName = "${res:Templates.File.Properties.Accessibility}" |
||||
type = "Types:Accessibility" |
||||
category = "${res:Templates.File.Properties.OptionCategory}" |
||||
defaultValue = "public" |
||||
description = "${res:Templates.File.Properties.Accessibility.Description}" |
||||
/> |
||||
<Property |
||||
name = "GenerateDocumentation" |
||||
localizedName = "${res:Templates.File.Properties.GenerateDocumentation}" |
||||
type = "System.Boolean" |
||||
category = "${res:Templates.File.Properties.OptionCategory}" |
||||
defaultValue = "True" |
||||
description = "${res:Templates.File.Properties.GenerateDocumentation}" |
||||
/> |
||||
</Properties> |
||||
|
||||
<Types> |
||||
<Type name = "Accessibility"> |
||||
<Enum name = "Public" value = "public"/> |
||||
<Enum name = "Protected" value = "protected"/> |
||||
<Enum name = "Private" value = "private"/> |
||||
<Enum name = "Internal" value = "internal"/> |
||||
<Enum name = "Protected Internal" value = "protected internal"/> |
||||
<Enum name = "Internal Protected" value = "internal protected"/> |
||||
</Type> |
||||
</Types> |
||||
|
||||
<!-- |
||||
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 ".cs" |
||||
${Path} -> Full path of the file |
||||
--> |
||||
<Files> |
||||
<File name="${FullName}" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Collections; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// A collection that stores <see cref='${Properties.ItemType}'/> objects. |
||||
/// </summary> |
||||
<%}%> [Serializable()] |
||||
${Properties.Accessibility} class ${ClassName} : CollectionBase { |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Initializes a new instance of <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
<%}%> public ${ClassName}() |
||||
{ |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Initializes a new instance of <see cref='${ClassName}'/> based on another <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
/// <param name='val'> |
||||
/// A <see cref='${ClassName}'/> from which the contents are copied |
||||
/// </param> |
||||
<%}%> public ${ClassName}(${ClassName} val) |
||||
{ |
||||
this.AddRange(val); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Initializes a new instance of <see cref='${ClassName}'/> containing any array of <see cref='${Properties.ItemType}'/> objects. |
||||
/// </summary> |
||||
/// <param name='val'> |
||||
/// A array of <see cref='${Properties.ItemType}'/> objects with which to intialize the collection |
||||
/// </param> |
||||
<%}%> public ${ClassName}(${Properties.ItemType}[] val) |
||||
{ |
||||
this.AddRange(val); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Represents the entry at the specified index of the <see cref='${Properties.ItemType}'/>. |
||||
/// </summary> |
||||
/// <param name='index'>The zero-based index of the entry to locate in the collection.</param> |
||||
/// <value>The entry at the specified index of the collection.</value> |
||||
/// <exception cref='ArgumentOutOfRangeException'><paramref name='index'/> is outside the valid range of indexes for the collection.</exception> |
||||
<%}%> public ${Properties.ItemType} this[int index] { |
||||
get { |
||||
return ((${Properties.ItemType})(List[index])); |
||||
} |
||||
set { |
||||
List[index] = value; |
||||
} |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Adds a <see cref='${Properties.ItemType}'/> with the specified value to the |
||||
/// <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
/// <param name='val'>The <see cref='${Properties.ItemType}'/> to add.</param> |
||||
/// <returns>The index at which the new element was inserted.</returns> |
||||
/// <seealso cref='${ClassName}.AddRange'/> |
||||
<%}%> public int Add(${Properties.ItemType} val) |
||||
{ |
||||
return List.Add(val); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Copies the elements of an array to the end of the <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
/// <param name='val'> |
||||
/// An array of type <see cref='${Properties.ItemType}'/> containing the objects to add to the collection. |
||||
/// </param> |
||||
/// <seealso cref='${ClassName}.Add'/> |
||||
<%}%> public void AddRange(${Properties.ItemType}[] val) |
||||
{ |
||||
for (int i = 0; i < val.Length; i++) { |
||||
this.Add(val[i]); |
||||
} |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Adds the contents of another <see cref='${ClassName}'/> to the end of the collection. |
||||
/// </summary> |
||||
/// <param name='val'> |
||||
/// A <see cref='${ClassName}'/> containing the objects to add to the collection. |
||||
/// </param> |
||||
/// <seealso cref='${ClassName}.Add'/> |
||||
<%}%> public void AddRange(${ClassName} val) |
||||
{ |
||||
for (int i = 0; i < val.Count; i++) |
||||
{ |
||||
this.Add(val[i]); |
||||
} |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Gets a value indicating whether the |
||||
/// <see cref='${ClassName}'/> contains the specified <see cref='${Properties.ItemType}'/>. |
||||
/// </summary> |
||||
/// <param name='val'>The <see cref='${Properties.ItemType}'/> to locate.</param> |
||||
/// <returns> |
||||
/// <see langword='true'/> if the <see cref='${Properties.ItemType}'/> is contained in the collection; |
||||
/// otherwise, <see langword='false'/>. |
||||
/// </returns> |
||||
/// <seealso cref='${ClassName}.IndexOf'/> |
||||
<%}%> public bool Contains(${Properties.ItemType} val) |
||||
{ |
||||
return List.Contains(val); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Copies the <see cref='${ClassName}'/> values to a one-dimensional <see cref='Array'/> instance at the |
||||
/// specified index. |
||||
/// </summary> |
||||
/// <param name='array'>The one-dimensional <see cref='Array'/> that is the destination of the values copied from <see cref='${ClassName}'/>.</param> |
||||
/// <param name='index'>The index in <paramref name='array'/> where copying begins.</param> |
||||
/// <exception cref='ArgumentException'> |
||||
/// <para><paramref name='array'/> is multidimensional.</para> |
||||
/// <para>-or-</para> |
||||
/// <para>The number of elements in the <see cref='${ClassName}'/> is greater than |
||||
/// the available space between <paramref name='arrayIndex'/> and the end of |
||||
/// <paramref name='array'/>.</para> |
||||
/// </exception> |
||||
/// <exception cref='ArgumentNullException'><paramref name='array'/> is <see langword='null'/>. </exception> |
||||
/// <exception cref='ArgumentOutOfRangeException'><paramref name='arrayIndex'/> is less than <paramref name='array'/>'s lowbound. </exception> |
||||
/// <seealso cref='Array'/> |
||||
<%}%> public void CopyTo(${Properties.ItemType}[] array, int index) |
||||
{ |
||||
List.CopyTo(array, index); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Returns the index of a <see cref='${Properties.ItemType}'/> in |
||||
/// the <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
/// <param name='val'>The <see cref='${Properties.ItemType}'/> to locate.</param> |
||||
/// <returns> |
||||
/// The index of the <see cref='${Properties.ItemType}'/> of <paramref name='val'/> in the |
||||
/// <see cref='${ClassName}'/>, if found; otherwise, -1. |
||||
/// </returns> |
||||
/// <seealso cref='${ClassName}.Contains'/> |
||||
<%}%> public int IndexOf(${Properties.ItemType} val) |
||||
{ |
||||
return List.IndexOf(val); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Inserts a <see cref='${Properties.ItemType}'/> into the <see cref='${ClassName}'/> at the specified index. |
||||
/// </summary> |
||||
/// <param name='index'>The zero-based index where <paramref name='val'/> should be inserted.</param> |
||||
/// <param name='val'>The <see cref='${Properties.ItemType}'/> to insert.</param> |
||||
/// <seealso cref='${ClassName}.Add'/> |
||||
<%}%> public void Insert(int index, ${Properties.ItemType} val) |
||||
{ |
||||
List.Insert(index, val); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Returns an enumerator that can iterate through the <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
/// <seealso cref='IEnumerator'/> |
||||
<%}%> public new ${Properties.ItemType}Enumerator GetEnumerator() |
||||
{ |
||||
return new ${Properties.ItemType}Enumerator(this); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Removes a specific <see cref='${Properties.ItemType}'/> from the <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
/// <param name='val'>The <see cref='${Properties.ItemType}'/> to remove from the <see cref='${ClassName}'/>.</param> |
||||
/// <exception cref='ArgumentException'><paramref name='val'/> is not found in the Collection.</exception> |
||||
<%}%> public void Remove(${Properties.ItemType} val) |
||||
{ |
||||
List.Remove(val); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Enumerator that can iterate through a ${ClassName}. |
||||
/// </summary> |
||||
/// <seealso cref='IEnumerator'/> |
||||
/// <seealso cref='${ClassName}'/> |
||||
/// <seealso cref='${Properties.ItemType}'/> |
||||
<%}%> public class ${Properties.ItemType}Enumerator : IEnumerator |
||||
{ |
||||
IEnumerator baseEnumerator; |
||||
IEnumerable temp; |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Initializes a new instance of <see cref='${Properties.ItemType}Enumerator'/>. |
||||
/// </summary> |
||||
<%}%> public ${Properties.ItemType}Enumerator(${ClassName} mappings) |
||||
{ |
||||
this.temp = ((IEnumerable)(mappings)); |
||||
this.baseEnumerator = temp.GetEnumerator(); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Gets the current <see cref='${Properties.ItemType}'/> in the <seealso cref='${ClassName}'/>. |
||||
/// </summary> |
||||
<%}%> public ${Properties.ItemType} Current { |
||||
get { |
||||
return ((${Properties.ItemType})(baseEnumerator.Current)); |
||||
} |
||||
} |
||||
|
||||
object IEnumerator.Current { |
||||
get { |
||||
return baseEnumerator.Current; |
||||
} |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Advances the enumerator to the next <see cref='${Properties.ItemType}'/> of the <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
<%}%> public bool MoveNext() |
||||
{ |
||||
return baseEnumerator.MoveNext(); |
||||
} |
||||
|
||||
<%if (GenerateDocumentation) {%> /// <summary> |
||||
/// Sets the enumerator to its initial position, which is before the first element in the <see cref='${ClassName}'/>. |
||||
/// </summary> |
||||
<%}%> public void Reset() |
||||
{ |
||||
baseEnumerator.Reset(); |
||||
} |
||||
} |
||||
} |
||||
}]]></File> |
||||
</Files> |
||||
|
||||
<AdditionalOptions/> |
||||
</Template> |
||||
@ -1,350 +0,0 @@
@@ -1,350 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Mike Krueger" version="1.0"> |
||||
|
||||
<Config |
||||
name = "${res:Templates.File.TypedHashTable.Name}" |
||||
icon = "C#.File.FullFile" |
||||
category = "C#" |
||||
defaultname = "Class${Number}.cs" |
||||
language = "C#" |
||||
/> |
||||
|
||||
<Description>${res:Templates.File.TypedHashTable.Description}</Description> |
||||
|
||||
<Properties> |
||||
<Property |
||||
name = "KeyType" |
||||
localizedName = "${res:Templates.File.Properties.TypedHashtableWizard.KeyType}" |
||||
type = "System.String" |
||||
category = "${res:Templates.File.Properties.ContextCategory}" |
||||
description = "${res:Templates.File.Properties.TypedHashtableWizard.KeyType.Description}" |
||||
/> |
||||
<Property |
||||
name = "ValueType" |
||||
localizedName = "${res:Templates.File.Properties.TypedHashtableWizard.ValueType}" |
||||
type = "System.String" |
||||
category = "${res:Templates.File.Properties.ContextCategory}" |
||||
description = "${res:Templates.File.Properties.TypedHashtableWizard.ValueType.Description}" |
||||
/> |
||||
<Property |
||||
name = "Accessibility" |
||||
localizedName = "${res:Templates.File.Properties.Accessibility}" |
||||
type = "Types:Accessibility" |
||||
category = "${res:Templates.File.Properties.OptionCategory}" |
||||
defaultValue = "public" |
||||
description = "${res:Templates.File.Properties.Accessibility.Description}" |
||||
/> |
||||
</Properties> |
||||
|
||||
<Types> |
||||
<Type name = "Accessibility"> |
||||
<Enum name = "Public" value = "public"/> |
||||
<Enum name = "Protected" value = "protected"/> |
||||
<Enum name = "Private" value = "private"/> |
||||
<Enum name = "Internal" value = "internal"/> |
||||
<Enum name = "Protected Internal" value = "protected internal"/> |
||||
<Enum name = "Internal Protected" value = "internal protected"/> |
||||
</Type> |
||||
</Types> |
||||
|
||||
<!-- |
||||
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 ".cs" |
||||
${Path} -> Full path of the file |
||||
--> |
||||
<Files> |
||||
<File name="${FullName}" language="C#"><![CDATA[${StandardHeader.C#} |
||||
|
||||
using System; |
||||
using System.Collections; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
${Properties.Accessibility} class ${ClassName} : IDictionary, ICollection, IEnumerable, ICloneable |
||||
{ |
||||
protected Hashtable innerHash; |
||||
|
||||
#region "Constructors" |
||||
public ${ClassName}() |
||||
{ |
||||
innerHash = new Hashtable(); |
||||
} |
||||
|
||||
public ${ClassName}(${ClassName} original) |
||||
{ |
||||
innerHash = new Hashtable(original.innerHash); |
||||
} |
||||
|
||||
public ${ClassName}(IDictionary dictionary) |
||||
{ |
||||
innerHash = new Hashtable(dictionary); |
||||
} |
||||
|
||||
public ${ClassName}(int capacity) |
||||
{ |
||||
innerHash = new Hashtable(capacity); |
||||
} |
||||
|
||||
public ${ClassName}(IDictionary dictionary, float loadFactor) |
||||
{ |
||||
innerHash = new Hashtable(dictionary, loadFactor); |
||||
} |
||||
|
||||
public ${ClassName}(IHashCodeProvider codeProvider, IComparer comparer) |
||||
{ |
||||
innerHash = new Hashtable(codeProvider, comparer); |
||||
} |
||||
|
||||
public ${ClassName}(int capacity, int loadFactor) |
||||
{ |
||||
innerHash = new Hashtable(capacity, loadFactor); |
||||
} |
||||
|
||||
public ${ClassName}(IDictionary dictionary, IHashCodeProvider codeProvider, IComparer comparer) |
||||
{ |
||||
innerHash = new Hashtable(dictionary, codeProvider, comparer); |
||||
} |
||||
|
||||
public ${ClassName}(int capacity, IHashCodeProvider codeProvider, IComparer comparer) |
||||
{ |
||||
innerHash = new Hashtable(capacity, codeProvider, comparer); |
||||
} |
||||
|
||||
public ${ClassName}(IDictionary dictionary, float loadFactor, IHashCodeProvider codeProvider, IComparer comparer) |
||||
{ |
||||
innerHash = new Hashtable(dictionary, loadFactor, codeProvider, comparer); |
||||
} |
||||
|
||||
public ${ClassName}(int capacity, float loadFactor, IHashCodeProvider codeProvider, IComparer comparer) |
||||
{ |
||||
innerHash = new Hashtable(capacity, loadFactor, codeProvider, comparer); |
||||
} |
||||
#endregion |
||||
|
||||
#region Implementation of IDictionary |
||||
public ${ClassName}Enumerator GetEnumerator() |
||||
{ |
||||
return new ${ClassName}Enumerator(this); |
||||
} |
||||
|
||||
System.Collections.IDictionaryEnumerator IDictionary.GetEnumerator() |
||||
{ |
||||
return new ${ClassName}Enumerator(this); |
||||
} |
||||
|
||||
IEnumerator IEnumerable.GetEnumerator() |
||||
{ |
||||
return GetEnumerator(); |
||||
} |
||||
|
||||
public void Remove(${Properties.KeyType} key) |
||||
{ |
||||
innerHash.Remove(key); |
||||
} |
||||
|
||||
void IDictionary.Remove(object key) |
||||
{ |
||||
Remove ((${Properties.KeyType})key); |
||||
} |
||||
|
||||
public bool Contains(${Properties.KeyType} key) |
||||
{ |
||||
return innerHash.Contains(key); |
||||
} |
||||
|
||||
bool IDictionary.Contains(object key) |
||||
{ |
||||
return Contains((${Properties.KeyType})key); |
||||
} |
||||
|
||||
public void Clear() |
||||
{ |
||||
innerHash.Clear(); |
||||
} |
||||
|
||||
public void Add(${Properties.KeyType} key, ${Properties.ValueType} value) |
||||
{ |
||||
innerHash.Add(key, value); |
||||
} |
||||
|
||||
void IDictionary.Add(object key, object value) |
||||
{ |
||||
Add ((${Properties.KeyType})key, (${Properties.ValueType})value); |
||||
} |
||||
|
||||
public bool IsReadOnly { |
||||
get { |
||||
return innerHash.IsReadOnly; |
||||
} |
||||
} |
||||
|
||||
public ${Properties.ValueType} this[${Properties.KeyType} key] { |
||||
get { |
||||
return (${Properties.ValueType}) innerHash[key]; |
||||
} |
||||
set { |
||||
innerHash[key] = value; |
||||
} |
||||
} |
||||
|
||||
object IDictionary.this[object key] { |
||||
get { |
||||
return this[(${Properties.KeyType})key]; |
||||
} |
||||
set { |
||||
this[(${Properties.KeyType})key] = (${Properties.ValueType})value; |
||||
} |
||||
} |
||||
|
||||
public System.Collections.ICollection Values { |
||||
get { |
||||
return innerHash.Values; |
||||
} |
||||
} |
||||
|
||||
public System.Collections.ICollection Keys { |
||||
get { |
||||
return innerHash.Keys; |
||||
} |
||||
} |
||||
|
||||
public bool IsFixedSize { |
||||
get { |
||||
return innerHash.IsFixedSize; |
||||
} |
||||
} |
||||
#endregion |
||||
|
||||
#region Implementation of ICollection |
||||
public void CopyTo(System.Array array, int index) |
||||
{ |
||||
innerHash.CopyTo (array, index); |
||||
} |
||||
|
||||
public bool IsSynchronized { |
||||
get { |
||||
return innerHash.IsSynchronized; |
||||
} |
||||
} |
||||
|
||||
public int Count { |
||||
get { |
||||
return innerHash.Count; |
||||
} |
||||
} |
||||
|
||||
public object SyncRoot { |
||||
get { |
||||
return innerHash.SyncRoot; |
||||
} |
||||
} |
||||
#endregion |
||||
|
||||
#region Implementation of ICloneable |
||||
public ${ClassName} Clone() |
||||
{ |
||||
${ClassName} clone = new ${ClassName}(); |
||||
clone.innerHash = (Hashtable) innerHash.Clone(); |
||||
return clone; |
||||
} |
||||
|
||||
object ICloneable.Clone() |
||||
{ |
||||
return Clone(); |
||||
} |
||||
#endregion |
||||
|
||||
#region "HashTable Methods" |
||||
public bool ContainsKey(${Properties.KeyType} key) |
||||
{ |
||||
return innerHash.ContainsKey(key); |
||||
} |
||||
|
||||
public bool ContainsValue(${Properties.ValueType} value) |
||||
{ |
||||
return innerHash.ContainsValue(value); |
||||
} |
||||
|
||||
public static ${ClassName} Synchronized(${ClassName} nonSync) |
||||
{ |
||||
${ClassName} sync = new ${ClassName}(); |
||||
sync.innerHash = Hashtable.Synchronized(nonSync.innerHash); |
||||
return sync; |
||||
} |
||||
#endregion |
||||
|
||||
internal Hashtable InnerHash { |
||||
get { |
||||
return innerHash; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public class ${ClassName}Enumerator : IDictionaryEnumerator |
||||
{ |
||||
private IDictionaryEnumerator innerEnumerator; |
||||
|
||||
internal ${ClassName}Enumerator(${ClassName} enumerable) |
||||
{ |
||||
innerEnumerator = enumerable.InnerHash.GetEnumerator(); |
||||
} |
||||
|
||||
#region Implementation of IDictionaryEnumerator |
||||
public ${Properties.KeyType} Key { |
||||
get { |
||||
return (${Properties.KeyType})innerEnumerator.Key; |
||||
} |
||||
} |
||||
|
||||
object IDictionaryEnumerator.Key { |
||||
get { |
||||
return Key; |
||||
} |
||||
} |
||||
|
||||
public ${Properties.ValueType} Value { |
||||
get { |
||||
return (${Properties.ValueType})innerEnumerator.Value; |
||||
} |
||||
} |
||||
|
||||
object IDictionaryEnumerator.Value { |
||||
get { |
||||
return Value; |
||||
} |
||||
} |
||||
|
||||
public System.Collections.DictionaryEntry Entry { |
||||
get { |
||||
return innerEnumerator.Entry; |
||||
} |
||||
} |
||||
#endregion |
||||
|
||||
#region Implementation of IEnumerator |
||||
public void Reset() |
||||
{ |
||||
innerEnumerator.Reset(); |
||||
} |
||||
|
||||
public bool MoveNext() |
||||
{ |
||||
return innerEnumerator.MoveNext(); |
||||
} |
||||
|
||||
public object Current { |
||||
get { |
||||
return innerEnumerator.Current; |
||||
} |
||||
} |
||||
#endregion |
||||
} |
||||
}]]></File> |
||||
</Files> |
||||
|
||||
<AdditionalOptions/> |
||||
</Template> |
||||
@ -0,0 +1,54 @@
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Mike Krueger" version="1.0"> |
||||
|
||||
<Config |
||||
name = "${res:Templates.File.MyExtensionClass.Name}" |
||||
icon = "VBNet.File.NewClass" |
||||
category = "VB" |
||||
defaultname = "Extension${Number}.vb" |
||||
language = "VBNET" |
||||
/> |
||||
|
||||
<Description>${res:Templates.File.EmptyClass.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 ".cs" |
||||
${Path} -> Full path of the file |
||||
--> |
||||
<Files> |
||||
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET} |
||||
|
||||
Namespace My |
||||
<HideModuleName> _ |
||||
Friend Class My${ClassName}Class |
||||
' The methods of this class are shown when typing "My.${ClassName}." |
||||
|
||||
Public Sub TestMethod() |
||||
|
||||
End Sub |
||||
End Class |
||||
|
||||
' Register extension in my namespace |
||||
<HideModuleName> _ |
||||
Friend Module My${ClassName}Module |
||||
Private instance As New My${ClassName}Class |
||||
|
||||
Public ReadOnly Property ${ClassName}() As My${ClassName}Class |
||||
<DebuggerHidden> _ |
||||
Get |
||||
Return instance |
||||
End Get |
||||
End Property |
||||
End Module |
||||
End Namespace |
||||
]]></File> |
||||
</Files> |
||||
|
||||
<AdditionalOptions/> |
||||
</Template> |
||||
|
||||
@ -1,304 +0,0 @@
@@ -1,304 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Mike Krueger" version="1.0"> |
||||
|
||||
<Config |
||||
name = "${res:Templates.File.TypedCollection.Name}" |
||||
icon = "VBNet.File.FullFile" |
||||
category = "VB" |
||||
defaultname = "TypedCollection${Number}.vb" |
||||
language = "VBNET" |
||||
/> |
||||
|
||||
<Description>${res:Templates.File.TypedCollection.Description}</Description> |
||||
|
||||
<Properties> |
||||
<Property |
||||
name = "ItemType" |
||||
localizedName = "${res:Templates.File.Properties.TypedCollectionWizard.ItemType}" |
||||
type = "System.String" |
||||
category = "${res:Templates.File.Properties.ContextCategory}" |
||||
description = "${res:Templates.File.Properties.TypedCollectionWizard.ItemType.Description}" |
||||
/> |
||||
<Property |
||||
name = "Accessibility" |
||||
localizedName = "${res:Templates.File.Properties.Accessibility}" |
||||
type = "Types:Accessibility" |
||||
category = "${res:Templates.File.Properties.OptionCategory}" |
||||
defaultValue = "Public" |
||||
description = "${res:Templates.File.Properties.Accessibility.Description}" |
||||
/> |
||||
<Property |
||||
name = "GenerateDocumentation" |
||||
localizedName = "${res:Templates.File.Properties.GenerateDocumentation}" |
||||
type = "System.Boolean" |
||||
category = "${res:Templates.File.Properties.OptionCategory}" |
||||
defaultValue = "True" |
||||
description = "${res:Templates.File.Properties.GenerateDocumentation}" |
||||
/> |
||||
</Properties> |
||||
|
||||
<Types> |
||||
<Type name = "Accessibility"> |
||||
<Enum name = "Public" value = "Public"/> |
||||
<Enum name = "Protected" value = "Protected"/> |
||||
<Enum name = "Private" value = "Private"/> |
||||
<Enum name = "Friend" value = "Friend"/> |
||||
<Enum name = "Protected Friend" value = "Protected Friend"/> |
||||
</Type> |
||||
</Types> |
||||
|
||||
<!-- |
||||
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 ".cs" |
||||
${Path} -> Full path of the file |
||||
--> |
||||
<Files> |
||||
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET} |
||||
|
||||
Imports System |
||||
Imports System.Collections |
||||
|
||||
Namespace ${StandardNamespace} |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para> |
||||
' A collection that stores <see cref='.${Properties.ItemType}'/> objects. |
||||
' </para> |
||||
'</summary> |
||||
'<seealso cref='.${ClassName}'/> |
||||
<%}%> <Serializable()> _ |
||||
${Properties.Accessibility} Class ${ClassName} |
||||
Inherits CollectionBase |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para> |
||||
' Initializes a new instance of <see cref='.${ClassName}'/>. |
||||
' </para> |
||||
'</summary> |
||||
<%}%> Public Sub New() |
||||
MyBase.New |
||||
End Sub |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para> |
||||
' Initializes a new instance of <see cref='.${ClassName}'/> based on another <see cref='.${ClassName}'/>. |
||||
' </para> |
||||
'</summary> |
||||
'<param name='value'> |
||||
' A <see cref='.${ClassName}'/> from which the contents are copied |
||||
'</param> |
||||
<%}%> Public Sub New(ByVal value As ${ClassName}) |
||||
MyBase.New |
||||
Me.AddRange(value) |
||||
End Sub |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para> |
||||
' Initializes a new instance of <see cref='.${ClassName}'/> containing any array of <see cref='.${Properties.ItemType}'/> objects. |
||||
' </para> |
||||
'</summary> |
||||
'<param name='value'> |
||||
' A array of <see cref='.${Properties.ItemType}'/> objects with which to intialize the collection |
||||
'</param> |
||||
<%}%> Public Sub New(ByVal value() As ${Properties.ItemType}) |
||||
MyBase.New |
||||
Me.AddRange(value) |
||||
End Sub |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
'<para>Represents the entry at the specified index of the <see cref='.${Properties.ItemType}'/>.</para> |
||||
'</summary> |
||||
'<param name='index'><para>The zero-based index of the entry to locate in the collection.</para></param> |
||||
'<value> |
||||
' <para> The entry at the specified index of the collection.</para> |
||||
'</value> |
||||
'<exception cref='System.ArgumentOutOfRangeException'><paramref name='index'/> is outside the valid range of indexes for the collection.</exception> |
||||
<%}%> Public Default Property Item(ByVal index As Integer) As ${Properties.ItemType} |
||||
Get |
||||
Return CType(List(index),${Properties.ItemType}) |
||||
End Get |
||||
Set |
||||
List(index) = value |
||||
End Set |
||||
End Property |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para>Adds a <see cref='.${Properties.ItemType}'/> with the specified value to the |
||||
' <see cref='.${ClassName}'/> .</para> |
||||
'</summary> |
||||
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to add.</param> |
||||
'<returns> |
||||
' <para>The index at which the new element was inserted.</para> |
||||
'</returns> |
||||
'<seealso cref='.${ClassName}.AddRange'/> |
||||
<%}%> Public Function Add(ByVal value As ${Properties.ItemType}) As Integer |
||||
Return List.Add(value) |
||||
End Function |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
'<para>Copies the elements of an array to the end of the <see cref='.${ClassName}'/>.</para> |
||||
'</summary> |
||||
'<param name='value'> |
||||
' An array of type <see cref='.${Properties.ItemType}'/> containing the objects to add to the collection. |
||||
'</param> |
||||
'<returns> |
||||
' <para>None.</para> |
||||
'</returns> |
||||
'<seealso cref='.${ClassName}.Add'/> |
||||
<%}%> Public Overloads Sub AddRange(ByVal value() As ${Properties.ItemType}) |
||||
Dim i As Integer = 0 |
||||
Do While (i < value.Length) |
||||
Me.Add(value(i)) |
||||
i = (i + 1) |
||||
Loop |
||||
End Sub |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para> |
||||
' Adds the contents of another <see cref='.${ClassName}'/> to the end of the collection. |
||||
' </para> |
||||
'</summary> |
||||
'<param name='value'> |
||||
' A <see cref='.${ClassName}'/> containing the objects to add to the collection. |
||||
'</param> |
||||
'<returns> |
||||
' <para>None.</para> |
||||
'</returns> |
||||
'<seealso cref='.${ClassName}.Add'/> |
||||
<%}%> Public Overloads Sub AddRange(ByVal value As ${ClassName}) |
||||
Dim i As Integer = 0 |
||||
Do While (i < value.Count) |
||||
Me.Add(value(i)) |
||||
i = (i + 1) |
||||
Loop |
||||
End Sub |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
'<para>Gets a value indicating whether the |
||||
' <see cref='.${ClassName}'/> contains the specified <see cref='.${Properties.ItemType}'/>.</para> |
||||
'</summary> |
||||
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to locate.</param> |
||||
'<returns> |
||||
'<para><see langword='true'/> if the <see cref='.${Properties.ItemType}'/> is contained in the collection; |
||||
' otherwise, <see langword='false'/>.</para> |
||||
'</returns> |
||||
'<seealso cref='.${ClassName}.IndexOf'/> |
||||
<%}%> Public Function Contains(ByVal value As ${Properties.ItemType}) As Boolean |
||||
Return List.Contains(value) |
||||
End Function |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
'<para>Copies the <see cref='.${ClassName}'/> values to a one-dimensional <see cref='System.Array'/> instance at the |
||||
' specified index.</para> |
||||
'</summary> |
||||
'<param name='array'><para>The one-dimensional <see cref='System.Array'/> that is the destination of the values copied from <see cref='.${ClassName}'/> .</para></param> |
||||
'<param name='index'>The index in <paramref name='array'/> where copying begins.</param> |
||||
'<returns> |
||||
' <para>None.</para> |
||||
'</returns> |
||||
'<exception cref='System.ArgumentException'><para><paramref name='array'/> is multidimensional.</para> <para>-or-</para> <para>The number of elements in the <see cref='.${ClassName}'/> is greater than the available space between <paramref name='arrayIndex'/> and the end of <paramref name='array'/>.</para></exception> |
||||
'<exception cref='System.ArgumentNullException'><paramref name='array'/> is <see langword='null'/>. </exception> |
||||
'<exception cref='System.ArgumentOutOfRangeException'><paramref name='arrayIndex'/> is less than <paramref name='array'/>'s lowbound. </exception> |
||||
'<seealso cref='System.Array'/> |
||||
<%}%> Public Sub CopyTo(ByVal array() As ${Properties.ItemType}, ByVal index As Integer) |
||||
List.CopyTo(array, index) |
||||
End Sub |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para>Returns the index of a <see cref='.${Properties.ItemType}'/> in |
||||
' the <see cref='.${ClassName}'/> .</para> |
||||
'</summary> |
||||
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to locate.</param> |
||||
'<returns> |
||||
'<para>The index of the <see cref='.${Properties.ItemType}'/> of <paramref name='value'/> in the |
||||
'<see cref='.${ClassName}'/>, if found; otherwise, -1.</para> |
||||
'</returns> |
||||
'<seealso cref='.${ClassName}.Contains'/> |
||||
<%}%> Public Function IndexOf(ByVal value As ${Properties.ItemType}) As Integer |
||||
Return List.IndexOf(value) |
||||
End Function |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
'<para>Inserts a <see cref='.${Properties.ItemType}'/> into the <see cref='.${ClassName}'/> at the specified index.</para> |
||||
'</summary> |
||||
'<param name='index'>The zero-based index where <paramref name='value'/> should be inserted.</param> |
||||
'<param name=' value'>The <see cref='.${Properties.ItemType}'/> to insert.</param> |
||||
'<returns><para>None.</para></returns> |
||||
'<seealso cref='.${ClassName}.Add'/> |
||||
<%}%> Public Sub Insert(ByVal index As Integer, ByVal value As ${Properties.ItemType}) |
||||
List.Insert(index, value) |
||||
End Sub |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para>Returns an enumerator that can iterate through |
||||
' the <see cref='.${ClassName}'/> .</para> |
||||
'</summary> |
||||
'<returns><para>None.</para></returns> |
||||
'<seealso cref='System.Collections.IEnumerator'/> |
||||
<%}%> Public Shadows Function GetEnumerator() As ${Properties.ItemType}Enumerator |
||||
Return New ${Properties.ItemType}Enumerator(Me) |
||||
End Function |
||||
|
||||
<%if (GenerateDocumentation) {%> '<summary> |
||||
' <para> Removes a specific <see cref='.${Properties.ItemType}'/> from the |
||||
' <see cref='.${ClassName}'/> .</para> |
||||
'</summary> |
||||
'<param name='value'>The <see cref='.${Properties.ItemType}'/> to remove from the <see cref='.${ClassName}'/> .</param> |
||||
'<returns><para>None.</para></returns> |
||||
'<exception cref='System.ArgumentException'><paramref name='value'/> is not found in the Collection. </exception> |
||||
<%}%> Public Sub Remove(ByVal value As ${Properties.ItemType}) |
||||
List.Remove(value) |
||||
End Sub |
||||
|
||||
Public Class ${Properties.ItemType}Enumerator |
||||
Implements IEnumerator |
||||
|
||||
Private baseEnumerator As IEnumerator |
||||
|
||||
Private temp As IEnumerable |
||||
|
||||
Public Sub New(ByVal mappings As ${ClassName}) |
||||
MyBase.New |
||||
Me.temp = CType(mappings,IEnumerable) |
||||
Me.baseEnumerator = temp.GetEnumerator |
||||
End Sub |
||||
|
||||
Public ReadOnly Property Current As ${Properties.ItemType} |
||||
Get |
||||
Return CType(baseEnumerator.Current,${Properties.ItemType}) |
||||
End Get |
||||
End Property |
||||
|
||||
ReadOnly Property IEnumerator_Current As Object Implements IEnumerator.Current |
||||
Get |
||||
Return baseEnumerator.Current |
||||
End Get |
||||
End Property |
||||
|
||||
Public Function MoveNext() As Boolean |
||||
Return baseEnumerator.MoveNext |
||||
End Function |
||||
|
||||
Function IEnumerator_MoveNext() As Boolean Implements IEnumerator.MoveNext |
||||
Return baseEnumerator.MoveNext |
||||
End Function |
||||
|
||||
Public Sub Reset() |
||||
baseEnumerator.Reset |
||||
End Sub |
||||
|
||||
Sub IEnumerator_Reset() Implements IEnumerator.Reset |
||||
baseEnumerator.Reset |
||||
End Sub |
||||
End Class |
||||
End Class |
||||
End Namespace |
||||
]]></File> |
||||
</Files> |
||||
|
||||
<AdditionalOptions/> |
||||
</Template> |
||||
@ -1,327 +0,0 @@
@@ -1,327 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<Template author="Mike Krueger" version="1.0"> |
||||
|
||||
<Config |
||||
name = "${res:Templates.File.TypedHashTable.Name}" |
||||
icon = "VBNet.File.FullFile" |
||||
category = "VB" |
||||
defaultname = "Class${Number}.vb" |
||||
language = "VBNET" |
||||
/> |
||||
|
||||
<Description>${res:Templates.File.TypedHashTable.Description}</Description> |
||||
|
||||
<Properties> |
||||
<Property |
||||
name = "KeyType" |
||||
localizedName = "${res:Templates.File.Properties.TypedHashtableWizard.KeyType}" |
||||
type = "System.String" |
||||
category = "${res:Templates.File.Properties.ContextCategory}" |
||||
description = "${res:Templates.File.Properties.TypedHashtableWizard.KeyType.Description}" |
||||
/> |
||||
<Property |
||||
name = "ValueType" |
||||
localizedName = "${res:Templates.File.Properties.TypedHashtableWizard.ValueType}" |
||||
type = "System.String" |
||||
category = "${res:Templates.File.Properties.ContextCategory}" |
||||
description = "${res:Templates.File.Properties.TypedHashtableWizard.ValueType.Description}" |
||||
/> |
||||
<Property |
||||
name = "Accessibility" |
||||
localizedName = "${res:Templates.File.Properties.Accessibility}" |
||||
type = "Types:Accessibility" |
||||
category = "${res:Templates.File.Properties.OptionCategory}" |
||||
defaultValue = "Public" |
||||
description = "${res:Templates.File.Properties.Accessibility.Description}" |
||||
/> |
||||
</Properties> |
||||
|
||||
<Types> |
||||
<Type name = "Accessibility"> |
||||
<Enum name = "Public" value = "Public"/> |
||||
<Enum name = "Protected" value = "Protected"/> |
||||
<Enum name = "Private" value = "Private"/> |
||||
<Enum name = "Friend" value = "Friend"/> |
||||
<Enum name = "Protected Friend" value = "Protected Friend"/> |
||||
</Type> |
||||
</Types> |
||||
|
||||
<!-- |
||||
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 ".cs" |
||||
${Path} -> Full path of the file |
||||
--> |
||||
<Files> |
||||
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET} |
||||
|
||||
Option Strict On |
||||
|
||||
Imports System |
||||
Imports System.Collections |
||||
|
||||
Namespace ${StandardNamespace} |
||||
|
||||
Public Class ${ClassName} |
||||
Implements IDictionary |
||||
Implements ICollection |
||||
Implements IEnumerable |
||||
Implements ICloneable |
||||
Protected innerHashtable As Hashtable |
||||
|
||||
#Region "Constructors" |
||||
Public Sub New() |
||||
innerHashtable = New Hashtable() |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal original As ${ClassName}) |
||||
innerHashtable = New Hashtable(original.innerHash) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal dictionary As IDictionary) |
||||
innerHashtable = New Hashtable(dictionary) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal capacity As Integer) |
||||
innerHashtable = New Hashtable(capacity) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal dictionary As IDictionary, ByVal loadFactor As Single) |
||||
innerHashtable = New Hashtable(dictionary, loadFactor) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal codeProvider As IHashCodeProvider, ByVal comparer As IComparer) |
||||
innerHashtable = New Hashtable(codeProvider, comparer) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal capacity As Integer, ByVal loadFactor As Integer) |
||||
innerHashtable = New Hashtable(capacity, loadFactor) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal dictionary As IDictionary, ByVal codeProvider As IHashCodeProvider, ByVal comparer As IComparer) |
||||
innerHashtable = New Hashtable(dictionary, codeProvider, comparer) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal capacity As Integer, ByVal codeProvider As IHashCodeProvider, ByVal comparer As IComparer) |
||||
innerHashtable = New Hashtable(capacity, codeProvider, comparer) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal dictionary As IDictionary, ByVal loadFactor As Single, ByVal codeProvider As IHashCodeProvider, ByVal comparer As IComparer) |
||||
innerHashtable = New Hashtable(dictionary, loadFactor, codeProvider, comparer) |
||||
End Sub |
||||
|
||||
Public Sub New(ByVal capacity As Integer, ByVal loadFactor As Integer, ByVal codeProvider As IHashCodeProvider, ByVal comparer As IComparer) |
||||
innerHashtable = New Hashtable(capacity, loadFactor, codeProvider, comparer) |
||||
End Sub |
||||
#End Region |
||||
|
||||
#Region "Implementation of IDictionary" |
||||
|
||||
Private Function _GetEnumerator() As IDictionaryEnumerator |
||||
Return New ${ClassName}Enumerator(Me) |
||||
End Function |
||||
|
||||
Public Function IDictionary_GetEnumerator() As IDictionaryEnumerator Implements IDictionary.GetEnumerator |
||||
Return _GetEnumerator() |
||||
End Function |
||||
|
||||
Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator |
||||
Return _GetEnumerator() |
||||
End Function |
||||
|
||||
Public Sub Remove(ByVal key As ${Properties.KeyType}) |
||||
innerHashtable.Remove(key) |
||||
End Sub |
||||
|
||||
Public Sub Remove(ByVal key As Object) Implements IDictionary.Remove |
||||
Remove(CType(key, ${Properties.KeyType})) |
||||
End Sub |
||||
|
||||
Public Function Contains(ByVal key As ${Properties.KeyType}) As Boolean |
||||
Return innerHashtable.Contains(key) |
||||
End Function |
||||
|
||||
Public Function Contains(ByVal key As Object) As Boolean Implements IDictionary.Contains |
||||
Return Contains(CType(key, ${Properties.KeyType})) |
||||
End Function |
||||
|
||||
Public Sub Clear() Implements IDictionary.Clear |
||||
innerHashtable.Clear() |
||||
End Sub |
||||
|
||||
Public Sub Add(ByVal key As ${Properties.KeyType}, ByVal value As ${Properties.ValueType}) |
||||
innerHashtable.Add(key, value) |
||||
End Sub |
||||
|
||||
Public Sub Add(ByVal key As Object, ByVal value As Object) Implements IDictionary.Add |
||||
Add(CType(key, ${Properties.KeyType}), CType(value, ${Properties.ValueType})) |
||||
End Sub |
||||
|
||||
Public ReadOnly Property IsReadOnly() As Boolean Implements IDictionary.IsReadOnly |
||||
Get |
||||
Return innerHashtable.IsReadOnly |
||||
End Get |
||||
End Property |
||||
|
||||
Default Public Property Item(ByVal key As ${Properties.KeyType}) As ${Properties.ValueType} |
||||
Get |
||||
Return CType(innerHashtable(key), ${Properties.ValueType}) |
||||
End Get |
||||
Set(ByVal Value As ${Properties.ValueType}) |
||||
innerHashtable(key) = value |
||||
End Set |
||||
End Property |
||||
|
||||
Default Public Property Item(ByVal key As Object) As Object Implements IDictionary.Item |
||||
Get |
||||
Return item(CType(key, ${Properties.KeyType})) |
||||
End Get |
||||
Set(ByVal Value As Object) |
||||
item(CType(key, ${Properties.KeyType})) = CType(value, ${Properties.ValueType}) |
||||
End Set |
||||
End Property |
||||
|
||||
Public ReadOnly Property Values() As System.Collections.ICollection Implements IDictionary.Values |
||||
Get |
||||
Return innerHashtable.Values |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property Keys() As System.Collections.ICollection Implements IDictionary.Keys |
||||
Get |
||||
Return innerHashtable.Keys |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property IsFixedSize() As Boolean Implements IDictionary.IsFixedSize |
||||
Get |
||||
Return innerHashtable.IsFixedSize |
||||
End Get |
||||
End Property |
||||
#End Region |
||||
|
||||
#Region "Implementation of ICollection" |
||||
Public Sub CopyTo(ByVal array As System.Array, ByVal index As Integer) Implements ICollection.CopyTo |
||||
innerHashtable.CopyTo(array, index) |
||||
End Sub |
||||
|
||||
Public ReadOnly Property IsSynchronized() As Boolean Implements System.Collections.ICollection.IsSynchronized |
||||
Get |
||||
Return innerHashtable.IsSynchronized |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property Count() As Integer Implements System.Collections.ICollection.Count |
||||
Get |
||||
Return innerHashtable.Count |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property SyncRoot() As Object Implements System.Collections.ICollection.SyncRoot |
||||
Get |
||||
Return innerHashtable.SyncRoot |
||||
End Get |
||||
End Property |
||||
#End Region |
||||
|
||||
#Region "Implementation of ICloneable" |
||||
Public Function Clone() As ${ClassName} |
||||
Dim innerClone As ${ClassName} = New ${ClassName}() |
||||
innerClone.innerHashtable = CType(innerHashtable.Clone(), Hashtable) |
||||
Return innerClone |
||||
End Function |
||||
|
||||
Public Function ICloneable_Clone() As Object Implements ICloneable.Clone |
||||
Return Clone() |
||||
End Function |
||||
#End Region |
||||
|
||||
#Region "HashTable Methods" |
||||
Public Function ContainsKey(ByVal key As ${Properties.KeyType}) As Boolean |
||||
Return innerHashtable.ContainsKey(key) |
||||
End Function |
||||
|
||||
Public Function ContainsValue(ByVal value As ${Properties.ValueType}) As Boolean |
||||
Return innerHashtable.ContainsValue(value) |
||||
End Function |
||||
|
||||
Public Shared Function Synchronized(ByVal nonSync As ${ClassName}) As ${ClassName} |
||||
Dim sync As ${ClassName} = New ${ClassName}() |
||||
sync.innerHashtable = Hashtable.Synchronized(nonSync.innerHash) |
||||
Return sync |
||||
End Function |
||||
#End Region |
||||
|
||||
Friend ReadOnly Property InnerHash() As Hashtable |
||||
Get |
||||
Return innerHashtable |
||||
End Get |
||||
End Property |
||||
End Class |
||||
|
||||
Public Class ${ClassName}Enumerator |
||||
Implements IDictionaryEnumerator |
||||
|
||||
Private innerEnumerator As IDictionaryEnumerator |
||||
|
||||
Friend Sub New(ByVal enumerable As ${ClassName}) |
||||
innerEnumerator = enumerable.InnerHash.GetEnumerator() |
||||
End Sub |
||||
|
||||
#Region "Implementation of IDictionaryEnumerator" |
||||
Public ReadOnly Property Key() As ${Properties.KeyType} |
||||
Get |
||||
Return CType(innerEnumerator.Key, ${Properties.KeyType}) |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property IDictionaryEnumerator_Key() As Object Implements IDictionaryEnumerator.Key |
||||
Get |
||||
Return Key |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property Value() As ${Properties.ValueType} |
||||
Get |
||||
Return CType(innerEnumerator.Value, ${Properties.ValueType}) |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property IDictionaryEnumerator_Value() As Object Implements IDictionaryEnumerator.Value |
||||
Get |
||||
Return Value |
||||
End Get |
||||
End Property |
||||
|
||||
Public ReadOnly Property Entry() As System.Collections.DictionaryEntry Implements IDictionaryEnumerator.Entry |
||||
Get |
||||
Return innerEnumerator.Entry |
||||
End Get |
||||
End Property |
||||
#End Region |
||||
|
||||
#Region "Implementation of IEnumerator" |
||||
Public Sub Reset() Implements IDictionaryEnumerator.Reset |
||||
innerEnumerator.Reset() |
||||
End Sub |
||||
|
||||
Public Function MoveNext() As Boolean Implements IDictionaryEnumerator.MoveNext |
||||
Return innerEnumerator.MoveNext() |
||||
End Function |
||||
|
||||
Public ReadOnly Property Current() As Object Implements IDictionaryEnumerator.Current |
||||
Get |
||||
Return innerEnumerator.Current |
||||
End Get |
||||
End Property |
||||
#End Region |
||||
End Class |
||||
End Namespace |
||||
]]></File> |
||||
</Files> |
||||
|
||||
<AdditionalOptions/> |
||||
</Template> |
||||
@ -1,24 +1,45 @@
@@ -1,24 +1,45 @@
|
||||
// <file>
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
// <version value="$version"/>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
public interface IAttribute: IComparable |
||||
public interface IAttribute : IComparable |
||||
{ |
||||
AttributeTarget AttributeTarget { |
||||
get; |
||||
} |
||||
|
||||
string Name { |
||||
get; |
||||
} |
||||
|
||||
ArrayList PositionalArguments { // [expression]
|
||||
get; |
||||
} |
||||
|
||||
SortedList NamedArguments { // string/expression
|
||||
get; |
||||
} |
||||
} |
||||
|
||||
public enum AttributeTarget |
||||
{ |
||||
None, |
||||
Assembly, |
||||
Field, |
||||
Event, |
||||
Method, |
||||
Module, |
||||
Param, |
||||
Property, |
||||
Return, |
||||
Type |
||||
} |
||||
} |
||||
|
||||
@ -1,37 +0,0 @@
@@ -1,37 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
// <version value="$version"/>
|
||||
// </file>
|
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Dom |
||||
{ |
||||
public interface IAttributeSection: IComparable |
||||
{ |
||||
AttributeTarget AttributeTarget { |
||||
get; |
||||
} |
||||
List<IAttribute> Attributes { |
||||
get; |
||||
} |
||||
} |
||||
|
||||
public enum AttributeTarget |
||||
{ |
||||
None, |
||||
Assembly, |
||||
Field, |
||||
Event, |
||||
Method, |
||||
Module, |
||||
Param, |
||||
Property, |
||||
Return, |
||||
Type |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
/* |
||||
* Created by SharpDevelop. |
||||
* User: Daniel Grunwald |
||||
* Date: 19.07.2005 |
||||
* Time: 23:34 |
||||
*/ |
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Project |
||||
{ |
||||
/// <summary>
|
||||
/// Description of ImportProjectItem.
|
||||
/// </summary>
|
||||
public class ImportProjectItem : ProjectItem |
||||
{ |
||||
public ImportProjectItem(IProject project) : base(project) |
||||
{ |
||||
} |
||||
|
||||
public override ItemType ItemType { |
||||
get { |
||||
return ItemType.Import; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Project |
||||
{ |
||||
public class ProjectItemEventArgs : ProjectEventArgs |
||||
{ |
||||
ProjectItem projectItem; |
||||
|
||||
public ProjectItem ProjectItem { |
||||
get { |
||||
return projectItem; |
||||
} |
||||
} |
||||
|
||||
public ProjectItemEventArgs(IProject project, ProjectItem projectItem) : base(project) |
||||
{ |
||||
this.projectItem = projectItem; |
||||
} |
||||
} |
||||
} |
||||
@ -1,30 +0,0 @@
@@ -1,30 +0,0 @@
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.SharpDevelop.Project |
||||
{ |
||||
public delegate void ProjectReferenceEventHandler(object sender, ProjectReferenceEventArgs e); |
||||
|
||||
public class ProjectReferenceEventArgs |
||||
{ |
||||
IProject project; |
||||
ReferenceProjectItem referenceProjectItem; |
||||
public IProject Project { |
||||
get { |
||||
return project; |
||||
} |
||||
} |
||||
public ReferenceProjectItem ReferenceProjectItem { |
||||
get { |
||||
return referenceProjectItem; |
||||
} |
||||
} |
||||
|
||||
public ProjectReferenceEventArgs(IProject project, ReferenceProjectItem referenceProjectItem) |
||||
{ |
||||
this.project = project; |
||||
this.referenceProjectItem = referenceProjectItem; |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
Loading…
Reference in new issue