当前位置: 首页>>代码示例>>C#>>正文


C# ArrayList.ToString方法代码示例

本文整理汇总了C#中System.Collections.ArrayList.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ArrayList.ToString方法的具体用法?C# ArrayList.ToString怎么用?C# ArrayList.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Collections.ArrayList的用法示例。


在下文中一共展示了ArrayList.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IgnoreNotice

 public bool IgnoreNotice(List<ArrivalNoticeQuery> list)
 {
     ArrayList arrList = new ArrayList();
     string mailBody = string.Empty;
     MailHelper mailHelper = new MailHelper();
     try
     {
         for (int i = 0; i < list.Count; i++)
         {
             arrList.Add(_IArrivalNoticeDao.IgnoreNotice(list[i]));
         }
         //_mysqlDao.ExcuteSqls(arrList)
         if (_mysqlDao.ExcuteSqls(arrList))
         {
             return true;
         }
         else
         {
             return false;
         }
      
     }
     catch (Exception ex)
     {
         throw new Exception("ArrivalNoticeMgr-->IgnoreNotice-->" + arrList.ToString() + ex.Message, ex);
     }
 }
开发者ID:lxh2014,项目名称:gigade-net,代码行数:27,代码来源:ArrivalNoticeMgr.cs

示例2: DeleteMailGroup

 public bool DeleteMailGroup(List<MailGroupQuery> list)
 {
     ArrayList arrayList = new ArrayList();
     try
     {
         for (int i = 0; i < list.Count; i++)
         {
             arrayList.Add(_IMailGroupDao.DeleteMailGroup(list[i]));
         }
         return _mysqlDao.ExcuteSqls(arrayList);
     }
     catch (Exception ex)
     {
         throw new Exception("MailGroupMgr-->DeleteMailGroup-->"+arrayList.ToString()+ ex.Message, ex);
     }
 }
开发者ID:lxh2014,项目名称:gigade-net,代码行数:16,代码来源:MailGroupMgr.cs

示例3: AssignStartEndCity

 public void AssignStartEndCity(int TourId, ArrayList STARTENDCITY)
 {
     TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
     objempentity.AssignCountry(TourId, STARTENDCITY.ToString());
 }
开发者ID:pareshf,项目名称:testthailand,代码行数:5,代码来源:TourMasterWebService.asmx.cs

示例4: AssignCountry

        public void AssignCountry(int TourId, ArrayList Country)
        {
            TourmasterStoreprocedures objempentity = new TourmasterStoreprocedures();
            objempentity.AssignCountry(TourId, Country.ToString());

        }
开发者ID:pareshf,项目名称:testthailand,代码行数:6,代码来源:TourMasterWebService.asmx.cs

示例5: UpdateByVendor

 public bool UpdateByVendor(List<Model.PriceMasterTemp> priceMasterTempList, List<ItemPrice> itemPrices)
 {
     ArrayList sqls = new ArrayList();
     try
     {
         if (priceMasterTempList != null)
         {
             foreach (var item in priceMasterTempList)
             {
                 sqls.Add(_priceMasterTempDao.UpdateByVendor(item));
             }
         }
         //if (itemPrices != null)
         //{
         //    ItemPriceTempMgr itemPriceTempMgr = new ItemPriceTempMgr("");
         //    foreach (var item in itemPrices)
         //    {
         //        sqls.Add(itemPriceTempMgr.Update(item));
         //    }
         //}
         MySqlDao mySqlDao = new MySqlDao(connctionString);
         return mySqlDao.ExcuteSqls(sqls);
     }
     catch (Exception ex)
     {
         throw new Exception("PriceMasterTempMgr-->UpdateByVendor-->" + ex.Message + sqls.ToString(), ex);
     }
 }
开发者ID:lxh2014,项目名称:gigade-net,代码行数:28,代码来源:PriceMasterTempMgr.cs

示例6: SaveByVendor

        public bool SaveByVendor(List<Model.PriceMasterTemp> priceMasterTempList, List<List<ItemPrice>> itemPrices, ArrayList others)
        {
            if (priceMasterTempList == null)
            {
                return false;
            }
            if (itemPrices != null && itemPrices.Count > 0 && priceMasterTempList.Count != itemPrices.Count)
            {
                return false;
            }
            ArrayList sqls = new ArrayList();
            ArrayList prices = new ArrayList();
            try
            {
                ItemPriceTempMgr itemPriceTempMgr = new ItemPriceTempMgr("");
                foreach (var item in priceMasterTempList)
                {
                    sqls.Add(_priceMasterTempDao.SaveByVendor(item));

                    //if (itemPrices != null && itemPrices.Count > 0)
                    //{
                    //    ArrayList price = new ArrayList();
                    //    List<ItemPrice> items = itemPrices[priceMasterTempList.IndexOf(item)];
                    //    if (items != null)
                    //    {
                    //        foreach (var tp in items)
                    //        {
                    //            price.Add(itemPriceTempMgr.Save(tp));
                    //        }
                    //    }
                    //    prices.Add(price);
                    //}
                }
                return _priceMasterTempDao.Save(sqls, prices, others);
            }
            catch (Exception ex)
            {
                throw new Exception("PriceMasterTempMgr-->SaveByVendor-->" + ex.Message + sqls.ToString(), ex);
            }
        }
开发者ID:lxh2014,项目名称:gigade-net,代码行数:40,代码来源:PriceMasterTempMgr.cs

示例7: comboPriceDeleteByVendor

        /// <summary>
        /// 刪除組合商品的父商品和子商品價格數據
        /// </summary>
        /// <param name="delTemp"></param>
        /// <returns></returns>
        public bool comboPriceDeleteByVendor(ProductComboTemp delTemp)
        {
            ArrayList sqls = new ArrayList();
            try
            {
                //刪除item_price_temp子商品的數據中的數據
                ItemPriceTempMgr itemPriceMgr = new ItemPriceTempMgr("");
                sqls.Add(itemPriceMgr.DeleteByVendor(delTemp.Parent_Id, delTemp.Combo_Type, delTemp.Writer_Id));

                //刪除price_master_temp中的數據
                PriceMasterTempMgr priceMasterTempMgr = new PriceMasterTempMgr("");
                sqls.Add(priceMasterTempMgr.DeleteByVendor(new PriceMasterTemp { writer_Id = delTemp.Writer_Id, product_id = delTemp.Parent_Id, combo_type = delTemp.Combo_Type }));

                return _mySql.ExcuteSqls(sqls);
            }
            catch (Exception ex)
            {
                throw new Exception("ProductComboTempMgr.comboPriceDeleteByVendor-->" + ex.Message + sqls.ToString(), ex);
            }
        }
开发者ID:lxh2014,项目名称:gigade-net,代码行数:25,代码来源:ProductComboTempMgr.cs

示例8: CancelOrder

 public bool CancelOrder(List<TicketMasterQuery> list)
 {
     ArrayList arrList = new ArrayList();
     try
     {
         for (int i = 0; i < list.Count; i++)
         {
             arrList.Add(_tmDao.CancelOrderTM(list[i]));
             arrList.Add(_tmDao.CancelOrderTD(list[i]));
         }
       return     _tmDao.ExecSql(arrList);
     }
     catch(Exception ex)
     {
         throw new Exception("MailGroupMgr-->CancelOrder-->" + arrList.ToString() + ex.Message, ex);
     }
 }
开发者ID:lxh2014,项目名称:gigade-net,代码行数:17,代码来源:TicketMasterMgr.cs

示例9: GetWindow


//.........这里部分代码省略.........
                            GetControlCmdletBase cmdletCtrl =
                                new GetControlCmdletBase();
                            //cmdletCtrl.InputObject = (AutomationElement[])aeWndCollection.ToArray();
                            cmdletCtrl.InputObject =
                                // 20130316
                                //(AutomationElement[])aeWndCollection.ToArray(typeof(AutomationElement));
                                new AutomationElement[]{ window };
                            cmdletCtrl.SearchCriteria = cmdlet.WithControl;
                            cmdletCtrl.Timeout = 0;

                            cmdlet.WriteVerbose(cmdlet, "searching for one or more controls");

                            // 20130301
                            try {

                                ArrayList controlsList =
                                    GetControl(cmdletCtrl);

                                cmdlet.WriteVerbose(cmdlet, "after the search");

                                if (null != controlsList && 0 < controlsList.Count) {

                                    cmdlet.WriteVerbose(cmdlet, "ths list of controls that are on the window is not empty");

                                    filteredWindows.Add(window);
                                }

                            // 20130301
                            }

                            catch (Exception eWindowIsGone) {

                                // forcing to a next loop
                                aeWndCollection.Clear();
                                break;

                            }
                        }

                        aeWndCollection = filteredWindows;
                    }
                }

                // 20130529
                if (cmdlet.WaitNoWindow && wasFound && (null == aeWndCollection || 0 == aeWndCollection.Count)) {

                    cmdlet.Wait = false;
                }

                if (cmdlet.WaitNoWindow && !wasFound && null != aeWndCollection && 0 != aeWndCollection.Count) {

                    wasFound = true;
                    aeWndCollection = null;
                }

                if (null != aeWndCollection && aeWndCollection.Count > 0) {

                    cmdlet.WriteVerbose(cmdlet, "aeWndCollection != null");

                }
                // 20120123
                // checkTimeout(ref aeWnd, true);
                // 20120824
                //checkTimeout(cmdlet, aeWnd, true);
                checkTimeout(cmdlet, aeWndCollection, true);

                System.Threading.Thread.Sleep(Preferences.OnSleepDelay);

            } while (cmdlet.Wait);
            try {

                if (null != aeWndCollection && (int)((AutomationElement)aeWndCollection[0]).Current.ProcessId > 0) {

                    cmdlet.WriteVerbose(cmdlet, "" + aeWndCollection.ToString());
                    cmdlet.WriteVerbose(cmdlet,
                                        "aeWnd.Current.GetType() = " +
                                        ((AutomationElement)aeWndCollection[0]).GetType().Name);

                } // 20120127

                CurrentData.CurrentWindow = (AutomationElement)aeWndCollection[aeWndCollection.Count -1];
                // 20120824
                //return aeWnd;
                //return aeWndCollection;
            } catch (Exception eEvaluatingWindowAndWritingToPipeline) {

                //WriteDebug(cmdlet, "exception: " +
                cmdlet.WriteVerbose(
                    cmdlet,
                    "exception: " +
                    eEvaluatingWindowAndWritingToPipeline.Message);

                cmdlet.WriteVerbose(this, "<<<< ==  ==  writing/nullifying CurrentWindow  ==  == >>>>>");

                CurrentData.CurrentWindow = null;

            }

            return aeWndCollection;
        }
开发者ID:krukovskiy,项目名称:STUPS,代码行数:101,代码来源:HasTimeoutCmdletBase.cs

示例10: XMLRPCRequest

        private Hashtable XMLRPCRequest(Hashtable ReqParams, string method)
        {
            ArrayList SendParams = new ArrayList();
            SendParams.Add(ReqParams);

            XmlRpcResponse Resp;
            try
            {
                XmlRpcRequest Req = new XmlRpcRequest(method, SendParams);
                Resp = Req.Send(m_connectionString, 30000);
            }
            catch (WebException ex)
            {
                m_log.ErrorFormat(

                    "[UserLogModule]: XmlRpcDataConnector::WebException > Url:{0}, Method: {1}, Params: {2}, " +
                    "Exception: {3}", m_connectionString, method, SendParams.ToString(), ex);

                Hashtable ErrorHash = new Hashtable();
                ErrorHash["success"] = false;
                ErrorHash["errorMessage"] = "Unable to log User data at this time. ";
                ErrorHash["errorURI"] = "";

                return ErrorHash;
            }
            catch (SocketException ex)
            {
                m_log.ErrorFormat(
                        "[UserLogModule]: XmlRpcDataConnector::SocketException > Url:{0}, Method: {1}, Params: {2}, " +
                        "Exception: {3}", m_connectionString, method, SendParams.ToString(), ex);

                Hashtable ErrorHash = new Hashtable();
                ErrorHash["success"] = false;
                ErrorHash["errorMessage"] = "Unable to log user data at this time. ";
                ErrorHash["errorURI"] = "";

                return ErrorHash;
            }
            catch (XmlException ex)
            {
                m_log.ErrorFormat(
                        "[UserLogModule]: XmlRpcDataConnector::XmlException > Url:{0}, Method: {1}, Params: {2}, " +
                        "Exception: {3}", m_connectionString, method, SendParams.ToString(), ex);

                Hashtable ErrorHash = new Hashtable();
                ErrorHash["success"] = false;
                ErrorHash["errorMessage"] = "Unable to log user data at this time. ";
                ErrorHash["errorURI"] = "";

                return ErrorHash;
            }
            if (Resp.IsFault)
            {
                Hashtable ErrorHash = new Hashtable();
                ErrorHash["success"] = false;
                ErrorHash["errorMessage"] = "Unable to log user data at this time. ";
                ErrorHash["errorURI"] = "";
                return ErrorHash;
            }

            Hashtable RespData = (Hashtable)Resp.Value;
            return RespData;
        }
开发者ID:AlphaStaxLLC,项目名称:opensim-userlogmodule,代码行数:63,代码来源:XmlRpcData.cs

示例11: GetMatchingParameterListForSetters

		private IParameter[] GetMatchingParameterListForSetters(IPicoContainer container)
		{
			if (setters == null)
			{
				InitializeSetterAndTypeLists();
			}

			IParameter[] matchingParameterList = new IParameter[setters.Count];
			ArrayList nonMatchingParameterPositions = new ArrayList(); // was Set
			IParameter[] currentParameters = parameters != null ? parameters : CreateDefaultParameters(setterTypes);
			for (int i = 0; i < currentParameters.Length; i++)
			{
				IParameter parameter = currentParameters[i];
				bool failedDependency = true;
				for (int j = 0; j < setterTypes.Length; j++)
				{
					if (matchingParameterList[j] == null && parameter.IsResolvable(container, this, setterTypes[j]))
					{
						matchingParameterList[j] = parameter;
						failedDependency = false;
						break;
					}
				}
				if (failedDependency)
				{
					nonMatchingParameterPositions.Add(i);
				}
			}

			ArrayList unsatisfiableDependencyTypes = new ArrayList();
			for (int i = 0; i < matchingParameterList.Length; i++)
			{
				if (matchingParameterList[i] == null)
				{
					unsatisfiableDependencyTypes.Add(setterTypes[i]);
				}
			}
			if (unsatisfiableDependencyTypes.Count > 0)
			{
				throw new UnsatisfiableDependenciesException(this, unsatisfiableDependencyTypes);
			}
			else if (nonMatchingParameterPositions.Count > 0)
			{
				throw new PicoInitializationException("Following parameters do not match any of the setters for "
					+ ComponentImplementation + ": " + nonMatchingParameterPositions.ToString());
			}
			return matchingParameterList;
		}
开发者ID:smmckay,项目名称:picocontainer,代码行数:48,代码来源:SetterInjectionComponentAdapter.cs

示例12: getEnclosingInstanceStackString

 ///	<summary>
 /// If an instance of x is enclosed in a y which is in a z, return
 /// a String of these instance names in order from topmost to lowest;
 /// here that would be "[z y x]".
 /// </summary>
 public String getEnclosingInstanceStackString()
 {
     IList names = new ArrayList();
     StringTemplate p = this;
     while ( p!=null )
     {
         String name = p.getName();
         names.Insert(0,name+(p.passThroughAttributes?"(...)":""));
         p = p.enclosingInstance;
     }
     return names.ToString().Replace(",","");
 }
开发者ID:david-mcneil,项目名称:stringtemplate,代码行数:17,代码来源:StringTemplate.cs

示例13: Delete

        public bool Delete(List<PromotionsAmountDiscountCustom> list)
        {
            ArrayList arrList = new ArrayList();
            try
            {
                for (int i = 0; i < list.Count; i++)
                {
                    arrList.Add(string.Format("delete from promotions_amount_discount where id='{0}';", list[i].id));
                }
                return _mySql.ExcuteSqls(arrList);
            }
            catch (Exception ex)
            {
                throw new Exception("PromotionAmountDiscountsDao-->Delete-->+" + arrList.ToString() + ex.Message, ex);
            }

        }
开发者ID:lxh2014,项目名称:gigade-net,代码行数:17,代码来源:PromotionsAmountDiscountDao.cs

示例14: GetSpeaker


//.........这里部分代码省略.........
                       /* bFoundExactlyOne = true;*/
                    }
                    else if (output.Count > 1)
                    {
                        confidence = 0.08;
                    }
                }
            }

            if (output.Count == 1)
            {
                confidence = 0.90;

            }

            ///////////////////////////////////////////////
            //
            // Pronoun Replacement
            //
            // We replace pronouns with proper nouns
            //
            // so at this point we have hesaid with He, Her, et cetera
            // we replace each with a name
            //
            //
            //
            //////////////////////////////////////////////

            // a. If IsPronoun
            for (int matchCount = 0; matchCount < output.Count; matchCount++)
            {

                Relationship bestRelationship = kb.GetMostLikelyDeducedFact(
                     output[matchCount].ToString().ToLower(),
                     sContext,
                     GETSPEAKER_CONTEXTWEIGHT);

                 // now we REPLACE WITH a relationship match if there is one
                if (bestRelationship != null && output[matchCount].ToString() != bestRelationship.B)
                {
                    string sMes = "";// String.Format("Dialog: {0} Context: {1}", sSource, sContext);
                    lg.Instance.Line("WriteThink->GetSpeaker", ProblemType.MESSAGE,
                        output[matchCount] + " has been replaced by "+ bestRelationship.B + " "+
                        sMes
                        );
                    output[matchCount] = bestRelationship.B;
                    confidence = 0.03;
                }

            } // for

            /////////////////////////////////////////
            //
            // TOO MANY MATCHES
            //
            // 1. Now we isolate who might have (logically) spoken
            //
            //   A. Are they the same?
            //   B. Now the same? Pick most likely
            //
            ////////////////////////////////////////////

            // - Too many still? Consolidate down to one if possible
            if (output.Count > 1)
            {
                // Are they all the same? If so, pass with a reasonable confidence
开发者ID:BrentKnowles,项目名称:Addin_Proofread,代码行数:67,代码来源:WriteThink.cs

示例15: InsertCreated

		protected virtual void InsertCreated(object forObj, int exceptionLimit)
		{
			this.Context.LogManager.Debug(this, "Inserting objects that are up for creation", "");	 // do not localize			

			try
			{
				long cnt;
				int cntStale = 0;
				bool noCheck = false;
				IList stillDirty = new ArrayList() ;
				ArrayList insertObjects = new ArrayList();
				cnt = m_listCreated.Count;
				IObjectManager om = this.Context.ObjectManager;
				IPersistenceEngine pe = this.Context.PersistenceEngine;
				while (cnt > 0)
				{
					try
					{
						insertObjects.Clear();
						foreach (object obj in m_listCreated)
						{
							try
							{
								if (forObj != null)
								{
									if (obj == forObj)
									{
										insertObjects.Add(obj);
									}
								}
								else
								{
									if (noCheck)
									{							
										if (MayInsert(obj, true, true))
										{							
											insertObjects.Add(obj);
											noCheck = false;
										}
									}
									else
									{
										if (MayInsert(obj, true, false))
										{							
											insertObjects.Add(obj);
										}							
									}
								}							
							}
							catch (Exception ex)
							{
								if (exceptionLimit > 0 && exceptions.Count >= exceptionLimit - 1)
									throw ex;
								exceptions.Add(ex);
							}
						}
						foreach (object obj in insertObjects)
						{
							//this should be the only necessary try block in this 
							//method (and it ought only to be around the call to the
							//persistence engine, at that) but we add the other tries
							//to ensure that some exception from the framework doesn't
							//ruin the beautiful concept with collecting exceptions :-)
							try 
							{
								m_listCreated.Remove(obj);
								m_listInserted.Add(obj);
								stillDirty.Clear() ;
								pe.InsertObject(obj, stillDirty);
								om.SetObjectStatus(obj, ObjectStatus.Clean);
								this.Context.LogManager.Debug(this, "Inserted object", "Type: " + obj.GetType().ToString() + " Still dirty: " + stillDirty.ToString() ); // do not localize
								if (stillDirty.Count > 0)
								{
									IList cloneList = new ArrayList();
									foreach (object clone in stillDirty)
									{
										cloneList.Add(clone);
									}
									m_hashStillDirty[obj] = cloneList ;
								}
							}
							catch (Exception ex)
							{
								if (exceptionLimit > 0 && exceptions.Count >= exceptionLimit - 1)
									throw ex;
								exceptions.Add(ex);
							}
						}
						if (m_listCreated.Count == cnt)
						{
							noCheck = true;
							cntStale++;
							if (cntStale > 1)
							{
								throw new NPersistException("Cyclic dependency among objects up for creation could not be resolved!"); // do not localize
							}
						}
						else
						{
							cntStale = 0;
//.........这里部分代码省略.........
开发者ID:Dawn-of-Light,项目名称:Puzzle.NET,代码行数:101,代码来源:UnitOfWork.cs


注:本文中的System.Collections.ArrayList.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。