• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# StringCollection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中StringCollection的典型用法代码示例。如果您正苦于以下问题:C# StringCollection类的具体用法?C# StringCollection怎么用?C# StringCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StringCollection类属于命名空间,在下文中一共展示了StringCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: BCCAgentIndicator

    private void BCCAgentIndicator()
    {
        try
        {
            StringCollection serviceList = new StringCollection();
            serviceList.Add(ConfigurationManager.AppSettings["BCCAgentName"].ToString());

            if (serviceList != null && serviceList.Count > 0)
            {
                BCCOperator bccOperator = new BCCOperator();
                DataTable dtService = bccOperator.GetServiceStatus(serviceList);

                if (dtService != null && dtService.Rows != null && dtService.Rows.Count > 0)
                {
                    string agent = "BCC Agent";
                    agentName.Text = agent;
                    agentStatus.Status = dtService.Rows[0][1].ToString();
                    agentStatus.ToolTip = dtService.Rows[0][1].ToString();
                    agentName.ToolTip = agent + " - " + dtService.Rows[0][1].ToString();
                }
            }
        }
        catch (Exception ex)
        {
            System.Diagnostics.Debug.Write(ex.Message + ex.StackTrace, "Controls_AgentIndicator");
        }
    }
开发者ID:navkar,项目名称:BizTalkControlCenter,代码行数:27,代码来源:AgentIndicator.ascx.cs


示例2: GetTargetIds

    public StringCollection GetTargetIds(string parameterValues)
    {
      StringCollection ids = new StringCollection();

      try
      {
        Configuration.LayerFunctionRow layerFunction = GetLayerFunctionRows().First(o => o.FunctionName == "targetparams");

        using (OleDbCommand command = layerFunction.GetDatabaseCommand())
        {
          string[] p = parameterValues.Split(',');

          for (int i = 0; i < command.Parameters.Count - 1; ++i)
          {
            command.Parameters[i].Value = p[i];
          }

          command.Parameters[command.Parameters.Count - 1].Value = AppUser.GetRole();

          using (OleDbDataReader reader = command.ExecuteReader())
          {
            while (reader.Read())
            {
              ids.Add(reader.GetValue(0).ToString());
            }
          }
        }
      }
      catch { }

      return ids;
    }
开发者ID:ClaireBrill,项目名称:GPV,代码行数:32,代码来源:LayerRow.cs


示例3: GetProductSearchResults

        public void GetProductSearchResults()
        {
            this.apiContext.Timeout = 360000;
            GetProductSearchResultsCall api = new GetProductSearchResultsCall(this.apiContext);
            ProductSearchType ps = new ProductSearchType();
            //ps.AttributeSetID = 1785;// Cell phones
            ps.MaxChildrenPerFamily = 20; ps.MaxChildrenPerFamilySpecified = true;
            ps.AvailableItemsOnly = false; ps.AvailableItemsOnlySpecified = true;
            ps.QueryKeywords = "Nokia";
            StringCollection ids = new StringCollection();
            ids.Add("1785");
            ps.CharacteristicSetIDs = ids;
            // Pagination
            PaginationType pt = new PaginationType();
            pt.EntriesPerPage = 50; pt.EntriesPerPageSpecified = true;
            pt.PageNumber = 1; pt.PageNumberSpecified = true;
            ps.Pagination = pt;

            ProductSearchTypeCollection pstc = new ProductSearchTypeCollection();
            pstc.Add(ps);
            // Make API call.
            ProductSearchResultTypeCollection results = api.GetProductSearchResults(pstc);
            Assert.IsNotNull(results);
            Assert.IsTrue(results.Count > 0);
            TestData.ProductSearchResults = results;
            Assert.IsNotNull(TestData.ProductSearchResults);
            Assert.IsTrue(TestData.ProductSearchResults.Count > 0);
        }
开发者ID:fudder,项目名称:cs493,代码行数:28,代码来源:T_040_GetProductSearchResultsLibrary.cs


示例4: BindData

    private void BindData()
    {
        string SessionIDName = "CAM051_" + PageTimeStamp.Value;
        MaintainStoreTransfer bco = new MaintainStoreTransfer(ConntionDB);

        DataTable dt = bco.QueryStoreTransfer(chkLike.Checked, txtGroup.Text, txtStore.Text,
                            txtProfit.Text, txtZO.Text, txtSalID.Text, txtAcctUID.Text,
                            ddlIOType.SelectedValue, txtTransferDate.StartDate, txtTransferDate.EndDate,
                            txtBusDate.StartDate, txtBusDate.EndDate, txtTransferNo.Text,
                            txtChainSourceNo.Text, txtInAcctNo.Text, rblTaxType.Text,
                            txtRootNo.Text, rblIsSchedule.SelectedValue, ddlACStatus.Text,
                            txtACBalanceDateS.Text, txtACBalanceDate.Text, txtItem.Text,
                            txtPeriod.Text, txtAdjQty.Text, txtAdjQty.Operator, TextBoxRowCountLimit.Text, SLP_CreateUID.Text, SLP_UpdateUID.Text,
                            slpPROMOTE_ID_S.Text, slpPROMOTE_ID_E.Text);

        Session[SessionIDName] = dt;
        GridView1.DataSource = dt;
        GridView1.PageSize = (TextBoxPagesize.Text == "") ? 10 : (int.Parse(TextBoxPagesize.Text) < 0) ? 10 : int.Parse(TextBoxPagesize.Text);
        GridView1.PageIndex = 0;
        GridView1.DataBind();

        if (dt.Rows.Count > 0)
        {
            StringCollection sc = new StringCollection();
            foreach (DataRow dr in dt.Rows)
            {
                sc.Add(dr["ID"].ToString());
            }
            Session["CAM05CodeCollection"] = sc;
        }
        else
        {
            ErrorMsgLabel.Text = "查無資料";
        }
    }
开发者ID:ChiangHanLung,项目名称:PIC_VDS,代码行数:35,代码来源:CAM051.aspx.cs


示例5: Say

	public static void Say(this ChatClient chat, string to, StringCollection lines)
	{
		foreach (string line in lines)
		{
			chat.Say(to, line);
		}
	}
开发者ID:nobled,项目名称:mono,代码行数:7,代码来源:gtest-exmethod-12.cs


示例6: Main

	static void Main ()
	{
		AppDomainSetup setup = new AppDomainSetup ();
		setup.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;
		setup.ApplicationName = "test";

		AppDomain newDomain = AppDomain.CreateDomain ("test",
			AppDomain.CurrentDomain.Evidence, setup);

		StringCollection probePaths = new StringCollection ();
		probePaths.Add (Path.Combine (AppDomain.CurrentDomain.BaseDirectory, "lib"));

		// create an instance of our custom Assembly Resolver in the target domain.
		newDomain.CreateInstanceFrom (Assembly.GetExecutingAssembly ().CodeBase,
			typeof (AssemblyResolveHandler).FullName,
			false,
			BindingFlags.Public | BindingFlags.Instance,
			null,
			new object[] { probePaths },
			CultureInfo.InvariantCulture,
			null,
			AppDomain.CurrentDomain.Evidence);

		Helper helper = new Helper ();
		newDomain.DoCallBack (new CrossAppDomainDelegate (helper.Test));
	}
开发者ID:mono,项目名称:gert,代码行数:26,代码来源:test.cs


示例7: RelistItemFull

		public void RelistItemFull()
		{

			Assert.IsNotNull(TestData.EndedItem2);
			
			TestData.EndedItem2.ApplicationData="this is new appilcation data which is specified by "+DateTime.Now.ToShortDateString();
			RelistItemCall rviCall = new RelistItemCall(this.apiContext);
			ItemType item = TestData.EndedItem2;
			item.CategoryMappingAllowed=true;
			item.CategoryMappingAllowed=true;

			rviCall.Item=item;
			StringCollection fields =new StringCollection();
			String field="Item.ApplicationData";
			fields.Add(field);
			rviCall.DeletedFieldList=fields;
			rviCall.Execute();

			//check whether the call is success.
			Assert.IsTrue(rviCall.AbstractResponse.Ack==AckCodeType.Success || rviCall.AbstractResponse.Ack==AckCodeType.Warning,"do not success!");
			Assert.IsNotNull(rviCall.FeeList,"the Fees is null");
			/*
			foreach(FeeType fee in rviCall.FeeList)
			{
				isTherePropertyNull=ReflectHelper.IsProperteValueNotNull(fee,out nullPropertyNums,out nullPropertyNames);
				Assert.IsTrue(isTherePropertyNull,"there are" +nullPropertyNums.ToString()+ " properties value is null. (" +nullPropertyNames+ ")");
			}*/
			Assert.IsNotNull(rviCall.ItemID,"the ItemID is null");
			Assert.IsNotNull(rviCall.StartTime ,"the StartTime is null");

			//Assert.IsTrue(false,"NewItem:"+TestData.NewItem.ItemID+";EndedItem:"+TestData.EndedItem.ItemID+";NewItem2:"+TestData.NewItem2.ItemID+";EndedItem2:"+TestData.EndedItem2.ItemID);

		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:33,代码来源:T_130_RelistItemLibrary.cs


示例8: GetOrderTransactions

		public void GetOrderTransactions()
		{
			//
			GetOrderTransactionsCall api = new GetOrderTransactionsCall(
			this.apiContext);
			StringCollection idArray = new StringCollection();
			api.OrderIDArrayList = idArray;
			idArray.Add("1111111111");
			//ItemTransactionIDTypeCollection tIdArray = new ItemTransactionIDTypeCollection();
			//api.ItemTransactionIDArrayList = tIdArray;
			//ItemTransactionIDType tId = new ItemTransactionIDType();
			//tIdArray.Add(tId);
			//String itemId = "2222222222";
			//tId.ItemID = itemId;
			//tId.TransactionID = "test transaction id";
			// Make API call.
			ApiException gotException = null;
			try {
			OrderTypeCollection orders = api.GetOrderTransactions(idArray);
			} catch (ApiException ex) {
				gotException = ex;
			}
			Assert.IsNull(gotException);
			
		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:25,代码来源:T_120_GetOrderTransactionsLibrary.cs


示例9: DeleteMyMessages

		/// <summary>
		/// Removes selected messages for a given user.
		/// </summary>
		/// 
		/// <param name="AlertIDList">
		/// This field will be deprecated in an upcoming release. This field formerly
		/// contained a list of up to 10 AlertID values.
		/// </param>
		///
		/// <param name="MessageIDList">
		/// Contains a list of up to 10 MessageID values.
		/// </param>
		///
		public void DeleteMyMessages(StringCollection AlertIDList, StringCollection MessageIDList)
		{
			this.AlertIDList = AlertIDList;
			this.MessageIDList = MessageIDList;

			Execute();
			
		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:21,代码来源:DeleteMyMessagesCall.cs


示例10: AssemblyResolveHandler

		public AssemblyResolveHandler (StringCollection probePaths)
		{
			_probePaths = probePaths;

			// attach handlers for the current domain.
			AppDomain.CurrentDomain.AssemblyResolve +=
				new ResolveEventHandler (ResolveAssembly);
		}
开发者ID:mono,项目名称:gert,代码行数:8,代码来源:test.cs


示例11: Erf

 /// <summary>
 /// Default constructor
 /// </summary>
 private Erf()
 {
     removedFiles = new StringCollection();
     keyHash = new Hashtable(5000);
     addedFileHash = new Hashtable(1000);
     replacedFileHash = new Hashtable(1000);
     decompressedPath = string.Empty;
 }
开发者ID:BackupTheBerlios,项目名称:nwnprc,代码行数:11,代码来源:Erf.cs


示例12: SetSellingManagerFeedbackOptions

		/// <summary>
		/// Enables Selling Manager subscribers to store standard feedback comments that can
		/// be left for their buyers. Selling Manager Pro subscribers can also specify what
		/// events, if any, will trigger an automated feedback to buyers.
		/// </summary>
		/// 
		/// <param name="AutomatedLeaveFeedbackEvent">
		/// Specifies the event that will trigger automated feedback to the buyer.
		/// Applies to Selling Manager Pro subscribers only.
		/// </param>
		///
		/// <param name="StoredCommentList">
		/// Contains a set of comments from which one can be selected to leave
		/// feedback for a buyer. If automated feedback is used, a comment is
		/// selected from the set randomly. Automated feedback applies to Selling
		/// Manager Pro subscribers only. Stored comments cannot be replaced or
		/// edited individually. Submitting a stored comments array replaces all
		/// existing stored comments.
		/// 
		/// </param>
		///
		public void SetSellingManagerFeedbackOptions(AutomatedLeaveFeedbackEventCodeType AutomatedLeaveFeedbackEvent, StringCollection StoredCommentList)
		{
			this.AutomatedLeaveFeedbackEvent = AutomatedLeaveFeedbackEvent;
			this.StoredCommentList = StoredCommentList;

			Execute();
			
		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:29,代码来源:SetSellingManagerFeedbackOptionsCall.cs


示例13: VerifyRelistItem

		/// <summary>
		/// This call is used to verify that the data you plan to pass into a <b>RelistItem</b> call will produce the results that you are expecting, including a successful call with no errors.
		/// </summary>
		/// 
		/// <param name="Item">
		/// Child elements hold the values for item properties that change for the
		/// relisted item. Item is a required input. At a minimum, the Item.ItemID
		/// property must be set to the ID of the listing being relisted (a
		/// listing that ended in the past 90 days). By default, the new listing's
		/// Item object properties are the same as those of the original (ended)
		/// listing. By setting a new value in the Item object, the new listing
		/// uses the new value rather than the corresponding value from the old
		/// listing.
		/// </param>
		///
		/// <param name="DeletedFieldList">
		/// Specifies the name of the field to delete from a listing. See the eBay Features Guide for rules on deleting values when relisting items. Also see the relevant field descriptions to determine when to use <b>DeletedField</b> (and potential consequences).
		/// The request can contain zero, one, or many instances of <b>DeletedField</b> (one for each field to be deleted).
		/// 
		/// Case-sensitivity must be taken into account when using a <b>DeletedField</b> tag to delete a field. The value passed into a <b>DeletedField</b> tag must either match the case of the schema element names in the full field path (Item.PictureDetails.GalleryURL), or the initial letter of each schema element name in the full field path must be  lowercase (item.pictureDetails.galleryURL).
		/// Do not change the case of letters in the middle of a field name.
		/// For example, item.picturedetails.galleryUrl is not allowed.
		/// To delete a listing enhancement like 'BoldTitle', specify the value you are deleting;
		/// for example, Item.ListingEnhancement[BoldTitle].
		/// </param>
		///
		public string VerifyRelistItem(ItemType Item, StringCollection DeletedFieldList)
		{
			this.Item = Item;
			this.DeletedFieldList = DeletedFieldList;

			Execute();
			return ApiResponse.ItemID;
		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:34,代码来源:VerifyRelistItemCall.cs


示例14: GetAllAssembly

 private static void GetAllAssembly(Assembly assembly, StringCollection stringCollection)
 {
     string location = assembly.Location;
     if (!stringCollection.Contains(location))
     {
         stringCollection.Add(location);
     }
 }
开发者ID:nakijun,项目名称:FastDBEngine,代码行数:8,代码来源:CompileAssemblyHelper.cs


示例15: Dump

 protected void Dump(StringCollection strings)
 {
     foreach (String s in strings)
     {
         Console.Out.Write(String.Format("{0}, ", s));
     }
     Console.Out.WriteLine();
 }
开发者ID:andrey-kozyrev,项目名称:LinguaSpace,代码行数:8,代码来源:Dump.cs


示例16: RelistItem

		/// <summary>
		/// Enables a seller to relist a single listing that has ended on a specified eBay site.
		/// </summary>
		/// 
		/// <param name="Item">
		/// Child elements hold the values for item properties that change for the
		/// relisted item. Item is a required input. At a minimum, the Item.ItemID
		/// property must be set to the ID of the listing being relisted (a
		/// listing that ended in the past 90 days). By default, the new listing's
		/// Item object properties are the same as those of the original (ended)
		/// listing. By setting a new value in the Item object, the new listing
		/// uses the new value rather than the corresponding value from the old
		/// listing.
		/// </param>
		///
		/// <param name="DeletedFieldList">
		/// Specifies the name of the field to delete from a listing.
		/// See the eBay Features Guide for rules on deleting values when relisting items.
		/// Also see the relevant field descriptions to determine when to use <b>DeletedField</b> (and potential consequences).
		/// The request can contain zero, one, or many instances of <b>DeletedField</b> (one for each field to be deleted).
		/// 
		/// Case-sensitivity must be taken into account when using a <b>DeletedField</b> tag to delete a field. The value passed into a <b>DeletedField</b> tag must either match the case of the schema element names in the full field path (Item.PictureDetails.GalleryURL), or the initial letter of each schema element name in the full field path must be  lowercase (item.pictureDetails.galleryURL).
		/// Do not change the case of letters in the middle of a field name.
		/// For example, item.picturedetails.galleryUrl is not allowed.
		/// To delete a listing enhancement like 'BoldTitle', specify the value you are deleting;
		/// for example, Item.ListingEnhancement[BoldTitle].
		/// </param>
		///
		public FeeTypeCollection RelistItem(ItemType Item, StringCollection DeletedFieldList)
		{
			this.Item = Item;
			this.DeletedFieldList = DeletedFieldList;

			Execute();
			return ApiResponse.Fees;
		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:36,代码来源:RelistItemCall.cs


示例17: ExtendSiteHostedPictures

		/// <summary>
		/// Gives approved sellers the ability to extend the default and
		/// ongoing lifetime of pictures uploaded to eBay.
		/// </summary>
		/// 
		/// <param name="PictureURLList">
		/// The URL of the image hosted by eBay Picture Services.
		/// </param>
		///
		/// <param name="ExtensionInDays">
		/// The number of days by which to extend the expiration date for the
		/// specified image.
		/// </param>
		///
		public StringCollection ExtendSiteHostedPictures(StringCollection PictureURLList, int ExtensionInDays)
		{
			this.PictureURLList = PictureURLList;
			this.ExtensionInDays = ExtensionInDays;

			Execute();
			return ApiResponse.PictureURL;
		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:22,代码来源:ExtendSiteHostedPicturesCall.cs


示例18: AddToWatchList

		/// <summary>
		/// This call is use to add one or more order line items to an eBay user's My eBay Watch List. An auction item or a single-variation, fixed-price listing is identified with an <b>ItemID</b> value. To add a specific item variation to the Watch List from within a multi-variation, fixed-price listing, the user will use the  <b>VariationKey</b> container
		/// </summary>
		/// 
		/// <param name="ItemIDList">
		/// The <b>ItemID</b> of the item that is to be added to the eBay user's Watch List.
		/// The item must be a currently active item, and the total number
		/// of items in the user's
		/// Watch List (after the items in the request have been added) cannot exceed
		/// the maximum allowed number of Watch List items. One or more <b>ItemID</b> fields can be specified. A separate error node will be
		/// returned for each item that fails.
		/// 
		/// Either <b>ItemID</b> or <b>VariationKey</b> is required
		/// (but do not pass in both).
		/// </param>
		///
		/// <param name="VariationKeyList">
		/// A variation (or set of variations) that you want to add to the Watch List.
		/// Use this to watch a particular variation (not the entire item).
		/// Either the top-level <b>ItemID</b> or <b>VariationKey</b> is required
		/// (but do not pass in both).
		/// </param>
		///
		public int AddToWatchList(StringCollection ItemIDList, VariationKeyTypeCollection VariationKeyList)
		{
			this.ItemIDList = ItemIDList;
			this.VariationKeyList = VariationKeyList;

			Execute();
			return ApiResponse.WatchListCount;
		}
开发者ID:jaskirat-danits,项目名称:oswebshop,代码行数:31,代码来源:AddToWatchListCall.cs


示例19: ApeItem

		public ApeItem()
		{
			type = ApeItemType.Text;
			//key = null;
			//value = null;
			text = new StringCollection();
			//readOnly = false;
		}
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:8,代码来源:ApeItem.cs


示例20: BuildList

 private static StringCollection BuildList()
 {
     StringCollection list = new StringCollection();
     list.Add("ABC");
     list.Add("DEF");
     list.Add("GHI");
     return list;
 }
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:8,代码来源:StringCollectionTest.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# StringComparer类代码示例发布时间:2022-05-24
下一篇:
C# StringBuilder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap