From 2455f778f8df621895b6efa38f21ea5484e044b3 Mon Sep 17 00:00:00 2001 From: Peter Forstmeier Date: Mon, 16 Jan 2006 10:54:49 +0000 Subject: [PATCH] Small change in Collections.cs git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@997 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- src/AddIns/Misc/SharpQuery/Src/Collections.cs | 73 +++++++++++++------ 1 file changed, 50 insertions(+), 23 deletions(-) diff --git a/src/AddIns/Misc/SharpQuery/Src/Collections.cs b/src/AddIns/Misc/SharpQuery/Src/Collections.cs index 0a020b317f..d911d1ad39 100644 --- a/src/AddIns/Misc/SharpQuery/Src/Collections.cs +++ b/src/AddIns/Misc/SharpQuery/Src/Collections.cs @@ -1,33 +1,60 @@ -// -// -// -// -// $Revision$ -// - using System; using System.Collections.Generic; using SharpQuery.SchemaClass; namespace SharpQuery.Collections { - [Serializable()] - public class SharpQuerySchemaClassCollection : List - { - } + [Serializable()] + public class SharpQuerySchemaClassCollection : List + { + } - [Serializable()] - public class SharpQueryListDictionary : Dictionary - { - } + [Serializable()] + public class SharpQueryListDictionary : Dictionary + { + } - [Serializable()] - public class SharpQueryParameterCollection : List - { - } + [Serializable()] + public class SharpQueryParameterCollection : List{ + + public SharpQueryParameterCollection () { + } + /// + /// + /// Initializes a new instance of based on another . + /// + /// + /// + /// A from which the contents are copied + /// + public SharpQueryParameterCollection(SharpQueryParameterCollection value) { + this.AddRange(value); + } + + /// + /// + /// Initializes a new instance of containing any array of objects. + /// + /// + /// + /// A array of objects with which to intialize the collection + /// + public SharpQueryParameterCollection(SharpQueryParameter[] value) { + this.AddRange(value); + } + + + public SharpQuerySchemaClassCollection ToBaseSchemaCollection(){ + SharpQuerySchemaClassCollection returnValues = new SharpQuerySchemaClassCollection(); + foreach( SharpQueryParameter par in this ){ + returnValues.Add( par ); + } + return returnValues; + } + } - [Serializable()] - public class SharpQueryStringDictionary : Dictionary - { - } + [Serializable()] + public class SharpQueryStringDictionary : Dictionary + { + } }