System.Collections.ArrayList.ToArray()

Here are the examples of the csharp api class System.Collections.ArrayList.ToArray() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

200 Examples 7

1. Example

Project: NCache
Source File: BulkDeleteCommand.cs
private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager)
        {
            CommandInfo cmdInfo = new CommandInfo();

            Alachisoft.NCache.Common.Protobuf.BulkDeleteCommand bulkRemoveCommand = command.bulkDeleteCommand;
            cmdInfo.Keys = new ArrayList(bulkRemoveCommand.keys).ToArray();
            cmdInfo.FlagMap = new BitSet((byte)bulkRemoveCommand.flag);
            cmdInfo.RequestId = bulkRemoveCommand.requestId.ToString();
            cmdInfo.ClientLastViewId = command.clientLastViewId;
            return cmdInfo;
        }

2. Example

Project: NCache
Source File: BulkRemoveCommand.cs
private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager)
        {
            CommandInfo cmdInfo = new CommandInfo();

            Alachisoft.NCache.Common.Protobuf.BulkRemoveCommand bulkRemoveCommand = command.bulkRemoveCommand;
            cmdInfo.Keys = new ArrayList(bulkRemoveCommand.keys).ToArray();
            cmdInfo.FlagMap = new BitSet((byte)bulkRemoveCommand.flag);
            cmdInfo.RequestId = bulkRemoveCommand.requestId.ToString();
            cmdInfo.ClientLastViewId = command.clientLastViewId;
            cmdInfo.CommandVersion = command.commandVersion;
            return cmdInfo;
        }

3. Example

Project: fdotoolbox
Source File: FdoJoinCriteriaCtl.cs
private void btnEdit_Click(object sender, EventArgs e)
        {
            var criteria = (FdoJoinCriteriaInfo)lstJoins.SelectedItem;
            var cls = this.SelectedClass;
            var schema = (FeatureSchema)cls.Parent;
            using (var diag = new FdoJoinDialog(this.Connection, schema.Name, cls.Name, txtClassAlias.Text, criteria))
            {
                if (diag.ShowDialog() == DialogResult.OK)
                {
                    var items = new System.Collections.ArrayList(lstJoins.Items);
                    lstJoins.Items.Clear();
                    lstJoins.Items.AddRange(items.ToArray());
                    btnEdit.Enabled = btnRemoveJoin.Enabled = false;
                }
            }
        }

4. Example

Project: referencesource
Source File: arraylist.cs
public override Object[] ToArray() {
                lock(_root) {
                    return _list.ToArray();
                }
            }

5. Example

Project: referencesource
Source File: arraylist.cs
public override Object[] ToArray() {
                return _list.ToArray();
            }

6. Example

Project: CommunityServer
Source File: Exp.cs
public static Exp In(string column, ICollection values)
        {
            return new InExp(column, new ArrayList(values).ToArray());
        }

7. Example

Project: CommunityServer
Source File: MessageVector.cs
public object[] ToArray()
        {
            return _innerList.ToArray();
        }

8. Example

Project: Pash
Source File: SetVariableCommand.cs
private object GetVariableValue()
        {
            if (_values.Count == 1)
            {
                return _values[0];
            }
            else if (_values.Count == 0)
            {
                return null;
            }

            return _values.ToArray();
        }

9. Example

Project: spring-net
Source File: StockAppHandler.cs
public TradeResponse Handle(TradeRequest tradeRequest)
        {
            TradeResponse tradeResponse;
            ArrayList errors = new ArrayList();
            if (creditCheckService.CanExecute(tradeRequest, errors))
            {
                tradeResponse = executionVenueService.ExecuteTradeRequest(tradeRequest);
            }
            else
            {
                tradeResponse = new TradeResponse();
                tradeResponse.Error = true;
                tradeResponse.ErrorMessage = StringUtils.ArrayToCommaDelimitedString(errors.ToArray());
                
            }
            tradingService.ProcessTrade(tradeRequest, tradeResponse);
            return tradeResponse;
        }

10. Example

Project: spring-net
Source File: StockAppHandler.cs
public TradeResponse Handle(TradeRequest tradeRequest)
        {
            TradeResponse tradeResponse;
            ArrayList errors = new ArrayList();
            if (creditCheckService.CanExecute(tradeRequest, errors))
            {
                tradeResponse = executionVenueService.ExecuteTradeRequest(tradeRequest);
            }
            else
            {
                tradeResponse = new TradeResponse();
                tradeResponse.Error = true;
                tradeResponse.ErrorMessage = StringUtils.ArrayToCommaDelimitedString(errors.ToArray());
                
            }
            tradingService.ProcessTrade(tradeRequest, tradeResponse);
            return tradeResponse;
        }

11. Example

Project: spring-net
Source File: ExpressionEvaluatorTests.cs
[Test]
        public void TestReverseProcessor()
        {
            object[] arr = new object[] { "0", 1, 2.1m, "3", 4.1f };
            object[] result = new ArrayList( (ICollection) ExpressionEvaluator.GetValue(arr, "reverse()") ).ToArray();
            Assert.AreEqual(new object[] { 4.1f, "3", 2.1m, 1, "0" }, result);
        }

12. Example

Project: swicli
Source File: BaseAssemblyResolver.cs
public string [] GetSearchDirectories ()
		{
			return (string []) m_directories.ToArray ();
		}

13. Example

Project: SharpLang
Source File: ArrayList.cs
public override Object[] ToArray() {
                lock(_root) {
                    return _list.ToArray();
                }
            }

14. Example

Project: SharpLang
Source File: ArrayList.cs
public override Object[] ToArray() {
                return _list.ToArray();
            }

15. Example

Project: prologdotnet
Source File: StaticAssemblyCompiler.cs
public void LinkLibrary()
        {
            ILMerge merger = new ILMerge();

            merger.OutputFile = _outputFile;
            _inputAssemblies.Insert(0, _inputFile);
            merger.SetInputAssemblies((string[])_inputAssemblies.ToArray());
            merger.SetSearchDirectories(new string[] { "..\\runtime", "..\\library" });
            merger.TargetKind = ILMerge.Kind.Dll;
            merger.Merge();
        }

16. Example

Project: prologdotnet
Source File: StaticAssemblyCompiler.cs
public void LinkExecutable()
        {
            ILMerge merger = new ILMerge();

            merger.OutputFile = _outputFile;
            _inputAssemblies.Insert(0, _inputFile);
            merger.SetInputAssemblies((string[])_inputAssemblies.ToArray());
            merger.SetSearchDirectories(new string[] { "..\\runtime", "..\\library" });
            merger.TargetKind = ILMerge.Kind.Exe;
            merger.Merge();
        }

17. Example

Project: Novell.Directory.Ldap.NETStandard
Source File: RespControlVector.cs
public Type findResponseControl(string searchOID)
        {
            lock (this)
            {
                RegisteredControl ctl = null;

                /* loop through the contents of the vector */
                for (var i = 0; i < Count; i++)
                {
                    /* Get next registered control */
                    if ((ctl = (RegisteredControl) ToArray()[i]) == null)
                    {
                        throw new FieldAccessException();
                    }

                    /* Does the stored OID match with whate we are looking for */
                    if (ctl.myOID.CompareTo(searchOID) == 0)
                    {
                        /* Return the class name if we have match */
                        return ctl.myClass;
                    }
                }
                /* The requested control does not have a registered response class */
                return null;
            }
        }

18. Example

Project: Novell.Directory.Ldap.NETStandard
Source File: MessageVector.cs
internal virtual object[] RemoveAll()
        {
            lock (this)
            {
                var results = ToArray();
                Clear();
                return results;
            }
        }

19. Example

Project: NosDB
Source File: JSONDocument.cs
private bool TryGetArray(object value, out Array array)
        {
            Array sourceArray = array = null;

            if (value is Array)
                sourceArray = (Array)value;
            else if (value is ArrayList)
                sourceArray = ((ArrayList)value).ToArray();

            if (sourceArray != null)
            {
                //temporary fix
                array = sourceArray.Clone() as Array;
                //Array.Copy(sourceArray, array, sourceArray.Length);
                return true;
            }
            return false;
        }

20. Example

Project: NCache
Source File: SequencedReplicationOperation.cs
public void Compile(out Array opCodes, out Array info, out Array userPayload, out ArrayList compilationInfo)
        {
            ArrayList opCodesToBeReplicated = new ArrayList();
            ArrayList infoToBeReplicated = new ArrayList();
            ArrayList payLoad = new ArrayList();
            compilationInfo = new ArrayList();            

            foreach (ReplicationOperation operation in _operations)
            {
                DictionaryEntry entry = (DictionaryEntry)operation.Data;
                opCodesToBeReplicated.Add(entry.Key);
                infoToBeReplicated.Add(entry.Value);

                if (operation.UserPayLoad != null)
                {
                    for (int j = 0; j < operation.UserPayLoad.Length; j++)
                    {
                        payLoad.Add(operation.UserPayLoad.GetValue(j));
                    }
                }
                compilationInfo.Add(operation.PayLoadSize);                
            }

            opCodes = opCodesToBeReplicated.ToArray();
            info = infoToBeReplicated.ToArray();
            userPayload = payLoad.ToArray();
        }

21. Example

Project: NCache
Source File: LocalCacheBase.cs
private Hashtable GetFromCache(ArrayList keys, OperationContext operationContext)
        {
            if (keys == null) return null;

            return GetEntries(keys.ToArray(), operationContext);
        }

22. Example

Project: NCache
Source File: LocalCacheBase.cs
private Hashtable RemoveFromCache(ArrayList keys, bool notify, OperationContext operationContext)
        {
            if (keys == null) return null;

            return Remove(keys.ToArray(), ItemRemoveReason.Removed, notify, operationContext);

        }

23. Example

Project: csharp-ldap
Source File: RespControlVector.cs
public System.Type findResponseControl(System.String searchOID)
		{
			lock (this)
			{
				RegisteredControl ctl = null;
				
				/* loop through the contents of the vector */
				for (int i = 0; i < Count; i++)
				{
					
					/* Get next registered control */
					if ((ctl = (RegisteredControl) ToArray()[i]) == null)
					{
						throw new System.FieldAccessException();
					}
					
					/* Does the stored OID match with whate we are looking for */
					if (ctl.myOID.CompareTo(searchOID) == 0)
					{
						
						
						/* Return the class name if we have match */
						return ctl.myClass;
					}
				}
				/* The requested control does not have a registered response class */
				return null;
			}
		}

24. Example

Project: tesvsnip
Source File: SearchCriteriaList.cs
public static SearchCriteriaXmlSettings ToXml(SearchCriteriaSettings setting)
        {
            var criteria = new ArrayList();
            foreach (var child in setting.Items.OfType<SearchSubrecord>().Where(x => x.Checked))
            {
                criteria.Add(new SearchSubrecordXml { SubRecord = child.Record.name, Type = child.Type });
            }

            foreach (var elem in setting.Items.OfType<SearchElement>().Where(x => x.Checked))
            {
                var par = elem.Parent;
                criteria.Add(new SearchElementXml { SubRecord = par.Record.name, Element = elem.Record.name, Type = elem.Type, Value = elem.Value != null ? elem.Value.ToString() : null });
            }

            return new SearchCriteriaXmlSettings { Name = setting.ToString(), Type = setting.Type, Items = criteria.ToArray() };
        }

25. Example

Project: falloutsnip
Source File: SearchCriteriaList.cs
public static SearchCriteriaXmlSettings ToXml(SearchCriteriaSettings setting)
        {
            var criteria = new ArrayList();
            foreach (var child in setting.Items.OfType<SearchSubrecord>().Where(x => x.Checked))
            {
                criteria.Add(new SearchSubrecordXml { SubRecord = child.Record.name, Type = child.Type });
            }

            foreach (var elem in setting.Items.OfType<SearchElement>().Where(x => x.Checked))
            {
                var par = elem.Parent;
                criteria.Add(new SearchElementXml { SubRecord = par.Record.name, Element = elem.Record.name, Type = elem.Type, Value = elem.Value != null ? elem.Value.ToString() : null });
            }

            return new SearchCriteriaXmlSettings { Name = setting.ToString(), Type = setting.Type, Items = criteria.ToArray() };
        }

26. Example

Project: DriverStoreExplorer
Source File: DSEForm.cs
private void contextMenuStrip_Opening(object sender, CancelEventArgs e)
        {
            // Che/n ..... /n //View Source file for more details /n }

27. Example

Project: nHydrate
Source File: ReferenceCollection.cs
public Array FindReferencedObject(string key)
        {
            var retval = new ArrayList();
            foreach (INHydrateModelObject element in this)
            {
                if (StringHelper.Match(((Reference)element).Object.Key, key, true))
                    retval.Add(element);
            }
            return retval.ToArray();
        }

28. Example

Project: CommunityServer
Source File: RespControlVector.cs
public Type findResponseControl(string searchOID)
        {
            lock (this)
            {
                RegisteredControl ctl = null;

                /* loop through the contents of the vector */
                for (int i = 0; i < Count; i++)
                {

                    /* Get next registered control */
                    if ((ctl = (RegisteredControl)ToArray()[i]) == null)
                    {
                        throw new FieldAccessException();
                    }

                    /* Does the stored OID match with whate we are looking for */
                    if (ctl.myOID.CompareTo(searchOID) == 0)
                    {
                        /* Return the class name if we have match */
                        return ctl.myClass;
                    }
                }
                /* The requested control does not have a registered response class */
                return null;
            }
        }

29. Example

Project: OpenLiveWriter
Source File: HashSet.cs
public object[] ToArray()
        {
            return ToArrayList().ToArray();
        }

30. Example

Project: OpenLiveWriter
Source File: TreeSet.cs
public object[] ToArray()
        {
            return _ToArrayList().ToArray();
        }

31. Example

Project: OpenLiveWriter
Source File: SharedPropertiesController.cs
private object[] ConvertAuthors(AuthorInfo[] authorList)
        {
            ArrayList authors = new ArrayList();
            foreach (AuthorInfo author in authorList)
            {
                authors.Add(new PostIdAndNameField(author.Id, author.Name));
            }
            return authors.ToArray();
        }

32. Example

Project: mongodb-csharp
Source File: CollectionMemberMap.cs
public override object GetValue(object instance)
        {
            var elements = _collectionAdapter.GetElementsFromCollection(base.GetValue(instance));
            var list = new ArrayList();
            
            foreach (var element in elements)
                list.Add(element);

            return list.ToArray();
        }

33. Example

Project: FieldWorks
Source File: BarAdapterBase.cs
private void FillCombo(ChoiceGroup choice)
		{
			UIItemDisplayProperties groupDisplay = choice.GetD/n ..... /n //View Source file for more details /n }

34. Example

Project: spring-net
Source File: StockAppHandler.cs
public TradeResponse Handle(TradeRequest tradeRequest)
        {
            log.Info("received trade request - sleeping 2s to simulate long-running task");
            TradeResponse tradeResponse;
            ArrayList errors = new ArrayList();
            if (creditCheckService.CanExecute(tradeRequest, errors))
            {
                tradeResponse = executionVenueService.ExecuteTradeRequest(tradeRequest);
            }
            else
            {
                tradeResponse = new TradeResponse();
                tradeResponse.Error = true;
                tradeResponse.ErrorMessage = StringUtils.ArrayToCommaDelimitedString(errors.ToArray());
                
            }
            tradingService.ProcessTrade(tradeRequest, tradeResponse);

            Thread.Sleep(2000);
            return tradeResponse;
        }

35. Example

Project: spring-net
Source File: NonNullProcessor.cs
public object Process(ICollection source, object[] args)
        {
            if (source == null)
            {
                return null;
            }

            ArrayList list = new ArrayList();
            foreach (object item in source)
            {
                if (item != null)
                {
                    list.Add(item);
                }
            }
            return list.ToArray();
        }

36. Example

Project: surveyproject
Source File: Answer.cs
public void DeleteAnswer(int answerId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@AnswerID", answerId).SqlValue);
            }

            DbConnection.db.ExecuteNonQuery("vts_spAnswerDelete", sqlParams.ToArray());
        }

37. Example

Project: surveyproject
Source File: Answer.cs
public void DeleteAnswerFile(int fileId, string groupGuid)
        {
            //SqlParameter[] commandParameters = new SqlParameter[5];
            //commandParameters[0] = new SqlParameter("@FileId", SqlDbType.Int, 4);
            //commandParameters[0].Value = fileId;
            //commandParameters[1] = new SqlParameter("@GroupGuid", SqlDbType.NVarChar, 40);
            //commandParameters[1].Value = groupGuid;

            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@FileId", fileId).SqlValue);
                sqlParams.Add(new SqlParameter("@GroupGuid", groupGuid).SqlValue);
            }

            DbConnection.db.ExecuteNonQuery("vts_spFileDelete", sqlParams.ToArray());
        }

38. Example

Project: surveyproject
Source File: Answer.cs
public void DeleteAnswerProperties(int answerId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@AnswerId", answerId).SqlValue);
            }

            DbConnection.db.ExecuteScalar("vts_spAnswerPropertyDelete", sqlParams.ToArray());
        }

39. Example

Project: surveyproject
Source File: Answer.cs
public void DeleteMatrixAnswer(int answerId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@AnswerId", answerId).SqlValue);
            }

            DbConnection.db.ExecuteNonQuery("vts_spAnswerMatrixDelete", sqlParams.ToArray());
        }

40. Example

Project: surveyproject
Source File: Answer.cs
public AnswerData GetAnswerById(int answerId, string languageCode)
        {
            //SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@AnswerId", answerId), new SqlParameter("@LanguageCode", languageCode) };

            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@AnswerId", answerId).SqlValue);
                sqlParams.Add(new SqlParameter("@LanguageCode", languageCode).SqlValue);
            }
            
            AnswerData dataSet = new AnswerData();
            DbConnection.db.LoadDataSet("vts_spAnswerGetDetails", dataSet, new string[] { "Answers" }, sqlParams.ToArray());
            return dataSet;
        }

41. Example

Project: surveyproject
Source File: Answer.cs
public FileData GetAnswerFile(int fileId, string groupGuid)
        {
            FileData dataSet = new FileData();

            //SqlParameter[] commandParameters = new SqlParameter[2];
            //commandParameters[0] = new SqlParameter("@FileId", SqlDbType.Int, 4);
            //commandParameters[0].Value = fileId;
            //commandParameters[1] = new SqlParameter("@GroupGuid", SqlDbType.NVarChar, 40);
            //commandParameters[1].Value = groupGuid;

            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@FileId", fileId).SqlValue);
                sqlParams.Add(new SqlParameter("@GroupGuid", groupGuid).SqlValue);
            }

            DbConnection.db.LoadDataSet("vts_spFileGetDetails", dataSet, new string[] { "Files" }, sqlParams.ToArray());
            return dataSet;
        }

42. Example

Project: surveyproject
Source File: Answer.cs
public byte[] GetAnswerFileData(int fileId, string groupGuid)
        {
            //SqlParameter[] commandParameters = new SqlParameter[2];
            //commandParameters[0] = new SqlParameter("@FileId", SqlDbType.Int, 4);
            //commandParameters[0].Value = fileId;
            //commandParameters[1] = new SqlParameter("@GroupGuid", SqlDbType.NVarChar, 40);
            //commandParameters[1].Value = groupGuid;

            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@FileId", fileId).SqlValue);
                sqlParams.Add(new SqlParameter("@GroupGuid", groupGuid).SqlValue);
            }

            object obj2 = DbConnection.db.ExecuteScalar("vts_spFileGetData", sqlParams.ToArray());
            if (obj2 != null)
            {
                return (byte[]) obj2;
            }
            return new byte[0];
        }

43. Example

Project: surveyproject
Source File: Answer.cs
public AnswerData GetAnswers(int questionId, string languageCode)
        {
            //SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@QuestionId", questionId), new SqlParameter("@LanguageCode", languageCode) };

            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@QuestionId", questionId).SqlValue);
                sqlParams.Add(new SqlParameter("@LanguageCode", languageCode).SqlValue);
            }
            
            AnswerData dataSet = new AnswerData();
            DbConnection.db.LoadDataSet("vts_spQuestionGetAnswers", dataSet, new string[] { "Answers" }, sqlParams.ToArray());
            return dataSet;
        }

44. Example

Project: surveyproject
Source File: Answer.cs
public AnswerData GetAnswersList(int questionId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@QuestionId", questionId).SqlValue);
            }

            AnswerData dataSet = new AnswerData();
            DbConnection.db.LoadDataSet("vts_spQuestionGetAnswersList", dataSet, new string[] { "Answers" }, sqlParams.ToArray());
            return dataSet;
        }

45. Example

Project: surveyproject
Source File: Answer.cs
public int GetAnswerTypeMode(int answerId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@AnswerId", answerId).SqlValue);
            }

            object obj2 = DbConnection.db.ExecuteScalar("vts_spAnswerGetAnswerTypeMode", sqlParams.ToArray());
            if (obj2 != null)
            {
                return (int) obj2;
            }
            return 0;
        }

46. Example

Project: surveyproject
Source File: Answer.cs
public FileData GetGuidFiles(string groupGuid)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@GroupGuid", groupGuid).SqlValue);
            }

            FileData dataSet = new FileData();
            DbConnection.db.LoadDataSet("vts_spFileGetListForGuid", dataSet, new string[] { "Files" }, sqlParams.ToArray());
            return dataSet;
        }

47. Example

Project: surveyproject
Source File: Answer.cs
public AnswerData GetPublishersList(int answerId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@AnswerId", answerId).SqlValue);
            }

            AnswerData dataSet = new AnswerData();
            DbConnection.db.LoadDataSet("vts_spAnswerGetPublishersList", dataSet, new string[] { "Answers" }, sqlParams.ToArray());
            return dataSet;
        }

48. Example

Project: surveyproject
Source File: Answer.cs
public AnswerData GetSelectableAnswers(int questionId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@QuestionID", questionId).SqlValue);
            }

            AnswerData dataSet = new AnswerData();
            DbConnection.db.LoadDataSet("vts_spQuestionGetSelectableAnswers", dataSet, new string[] { "Answers" }, sqlParams.ToArray());
            return dataSet;
        }

49. Example

Project: surveyproject
Source File: Answer.cs
public AnswerData GetSubscriptionList(int answerId)
        {
            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@AnswerId", answerId).SqlValue);
            }

            AnswerData dataSet = new AnswerData();
            DbConnection.db.LoadDataSet("vts_spAnswerGetSubscriptionList", dataSet, new string[] { "Answers" }, sqlParams.ToArray());
            return dataSet;
        }

50. Example

Project: surveyproject
Source File: Answer.cs
public FileData GetUnValidatedFileAnswers(int surveyId, int pageNumber, int pageSize, out int totalRecords)
        {
            FileData dataSet = new FileData();
            
            //SqlParameter[] commandParameters = new SqlParameter[] 
            //{   new SqlParameter("@SurveyID", surveyId), 
            //    new SqlParameter("@CurrentPage", pageNumber), 
            //    new SqlParameter("@PageSize", pageSize), 
            //    new SqlParameter("@TotalRecords", SqlDbType.Int) 
            //};

            //commandParameters[3].Direction = ParameterDirection.Output;

            ArrayList sqlParams = new ArrayList();
            {
                sqlParams.Add(new SqlParameter("@SurveyID", surveyId).SqlValue);
                sqlParams.Add(new SqlParameter("@CurrentPage", pageNumber).SqlValue);
                sqlParams.Add(new SqlParameter("@PageSize", pageSize).SqlValue);
                sqlParams.Add(new SqlParameter("@TotalRecords", SqlDbType.Int){Direction = ParameterDirection.Output }.SqlValue);
            }
            
            DbConnection.db.LoadDataSet("vts_spFileUnValidatedGetAll", dataSet, new string[] { "Files" }, sqlParams.ToArray());

            totalRecords = dataSet.Files.Rows.Count;
            //totalRecords = int.Parse(sqlParams[3].ToString());
            return dataSet;
        }