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


C# Specialized.ListDictionary类代码示例

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


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

示例1: Map

 public override void Map(Channel q, object map_arg) {
   IList retval = new ArrayList();
   IDictionary my_entry = new ListDictionary();
   my_entry["node"] = _node.Address.ToString();
   retval.Add(my_entry);
   q.Enqueue(retval);
 }
开发者ID:twchoi,项目名称:tmp-brunet-deetoo,代码行数:7,代码来源:MapReduceTrace.cs

示例2: GetUserByUserNameAndPassword

 public virtual bool GetUserByUserNameAndPassword(string UserName, string Password)
 {
     ListDictionary parameters = new ListDictionary();
     parameters.Add(new SqlParameter("@UserName", SqlDbType.NVarChar, 200), UserName);
     parameters.Add(new SqlParameter("@Password", SqlDbType.NVarChar, 200), Password);
     return LoadFromSql("GetUserByUserNameAndPassword", parameters);
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:7,代码来源:ComboUser.cs

示例3: GetDeliveryOrdersDetailsTotals

 public virtual IDataReader GetDeliveryOrdersDetailsTotals(string DeliveryOrderNoFrom, string DeliveryOrderNoTo)
 {
     ListDictionary parameters = new ListDictionary();
     parameters.Add(new SqlParameter("@DeliveryOrderNoFrom", SqlDbType.NVarChar, 10), DeliveryOrderNoFrom);
     parameters.Add(new SqlParameter("@DeliveryOrderNoTo", SqlDbType.NVarChar, 10), DeliveryOrderNoTo);
     return LoadFromSqlReader("GetDeliveryOrdersDetailsTotals", parameters);
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:7,代码来源:DeliveryOrder.cs

示例4: CreateTcpChannel

		/// <summary>
		///  Create a TcpChannel with a given name, on a given port.
		/// </summary>
		/// <param name="port"></param>
		/// <param name="name"></param>
		/// <returns></returns>
		private static TcpChannel CreateTcpChannel( string name, int port, int limit )
		{
			ListDictionary props = new ListDictionary();
			props.Add( "port", port );
			props.Add( "name", name );
			props.Add( "bindTo", "127.0.0.1" );

			BinaryServerFormatterSinkProvider serverProvider =
				new BinaryServerFormatterSinkProvider();

            // NOTE: TypeFilterLevel and "clientConnectionLimit" property don't exist in .NET 1.0.
			Type typeFilterLevelType = typeof(object).Assembly.GetType("System.Runtime.Serialization.Formatters.TypeFilterLevel");
			if (typeFilterLevelType != null)
			{
				PropertyInfo typeFilterLevelProperty = serverProvider.GetType().GetProperty("TypeFilterLevel");
				object typeFilterLevel = Enum.Parse(typeFilterLevelType, "Full");
				typeFilterLevelProperty.SetValue(serverProvider, typeFilterLevel, null);

//                props.Add("clientConnectionLimit", limit);
            }

			BinaryClientFormatterSinkProvider clientProvider =
				new BinaryClientFormatterSinkProvider();

			return new TcpChannel( props, clientProvider, serverProvider );
		}
开发者ID:Vernathic,项目名称:ic-AutoTest.NET4CTDD,代码行数:32,代码来源:ServerUtilities.cs

示例5: Add

		public void Add (string key, string value)
		{
			if (data == null)
				data = new ListDictionary ();

			data.Add (key, value);
		}
开发者ID:Profit0004,项目名称:mono,代码行数:7,代码来源:CapabilitiesLoader.cs

示例6: SendWelcomeEmail

        public static void SendWelcomeEmail(string mailTo ,Guid orgId, string tournamentId, string orgLogo, string tournamentName, DateTime startDate)
        {
            ListDictionary replacements = new ListDictionary();
            replacements.Add("<% OrgId %>", orgId);
            replacements.Add("<% TournamentName %>", tournamentName);
            replacements.Add("<% StartDate %>", startDate);
            replacements.Add("<% TournamentId %>", tournamentId);

            string templatePath = Path.Combine(ConfigurationManager.AppSettings["EmailTemplatePath"].ToString(), "WelcomeEmail.htm");
            string matchUpReadyTemplate = File.ReadAllText(templatePath);
            SmtpClient client = new SmtpClient(); //host and port picked from web.config
            client.EnableSsl = true;

            foreach (DictionaryEntry item in replacements)
            {
                matchUpReadyTemplate = matchUpReadyTemplate.Replace(item.Key.ToString(), item.Value.ToString());
            }
            MailMessage message = new MailMessage();
            message.Subject = "Welcome Email";
            message.From = new MailAddress("[email protected]");
            message.To.Add(mailTo);
            message.IsBodyHtml = true;
            message.Body = matchUpReadyTemplate;

            try
            {
                client.Send(message);
            }
            catch (Exception)
            {

            }
        }
开发者ID:shaileshgajula,项目名称:c8a5b00a-1d86-40ff-a172-35d865eeec09,代码行数:33,代码来源:PlayersRegistration.cs

示例7: AreNamesUnique

        /// <summary>
        /// Returns true if all items in <paramref name="names0"/> and <paramref name="names1"/> are 
        /// unique strings.  Case sensitivity consideration depends on <paramref name="ignoreCase"/>.
        /// </summary>
        /// <param name="names0">An array of strings.</param>
        /// <param name="names1">An array of strings.</param>
        /// <param name="ignoreCase">If true then case is not considered when comparing strings.</param>
        /// <returns>bool</returns>
        public static bool AreNamesUnique(string[] names0, string[] names1, bool ignoreCase)
        {
            bool result = true;
            if (names0 == null && names1 == null)
                return result;

            ListDictionary dic = new ListDictionary(StringComparer.Create(new CultureInfo("en"), ignoreCase));

            for (int i = 0; i < names0.Length; i++)
            {
                if (dic.Contains(names0[i]))
                {
                    result = false;
                    break;
                }
                dic.Add(names0[i], null);
            }
            for (int i = 0; i < names1.Length; i++)
            {
                if (dic.Contains(names1[i]))
                {
                    result = false;
                    break;
                }
                dic.Add(names1[i], null);
            }
            if (dic.Count == 0)
                result = false; // when both arrays are empty
            return result;
        }
开发者ID:BgRva,项目名称:Blob1,代码行数:38,代码来源:NamingHelper.cs

示例8: SearchTickets

 public virtual bool SearchTickets(string txt, int statusID)
 {
     ListDictionary parameters = new ListDictionary();
     parameters.Add(new SqlParameter("@StatusID", SqlDbType.Int, 0), statusID);
     parameters.Add(new SqlParameter("@SearchTxt", SqlDbType.NVarChar, 300), txt);
     return LoadFromSql("SearchAllTickets", parameters);
 }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:7,代码来源:Tickets.cs

示例9: deSerialize

        public static void deSerialize()
        {
            string sPath = HttpContext.Current.Server.MapPath("~/config/config.txt");
            if (!File.Exists(sPath))
            {
                m_lListDictionary = new ListDictionary();
                return;
            }

            m_lListDictionary = new ListDictionary();
            TextReader oTr = File.OpenText(sPath);

            char cN1 = '\n';

            string sTemp = oTr.ReadToEnd();
            string[] asTemp = sTemp.Split(cN1);

            foreach (string sLine in asTemp)
            {
                if (sLine.Length == 0)
                    continue;

                string[] asTemp2 = sLine.Split(',');

                if (asTemp[0].ToString() == "DatabasePassword")
                {
                    CCrypt oCrypt = new CCrypt();
                    m_lListDictionary.Add(asTemp2[0], oCrypt.DESDecrypt(asTemp2[1]));
                    continue;
                }
                m_lListDictionary.Add(asTemp2[0], asTemp2[1]);
            }

            oTr.Close();
        }
开发者ID:pcgalen,项目名称:Bind,代码行数:35,代码来源:Utility.cs

示例10: LoadDetailInfo

        public virtual bool LoadDetailInfo(int countryID)
        {
            ListDictionary parameters = new ListDictionary();
            parameters.Add(new SqlParameter("@CountryID", SqlDbType.Int), countryID);

            return base.LoadFromSql("[" + this.SchemaStoredProcedure + "usp_Country_LoadDetailInfo]", parameters);
        }
开发者ID:ivladyka,项目名称:OurTravels,代码行数:7,代码来源:Country.cs

示例11: Create

        public object Create(object parent, object context, XmlNode section)
        {
            IDictionary directories;
            NameValueSectionHandler nameValueSectionHandler;
            XmlNodeList nodes;
            DirectoryConfiguration directory;
            NameValueCollection properties;

            directories = new ListDictionary();

            nameValueSectionHandler = new NameValueSectionHandler();

            nodes = section.SelectNodes("directory");

            foreach(XmlElement element in nodes) {
                if(element.GetAttributeNode("name") == null)
                    throw(new ConfigurationException("Name not specified.", element));

                if(element.GetAttributeNode("type") == null)
                    throw(new ConfigurationException("Type not specified.", element));

                if(element.SelectSingleNode("properties") == null)
                    properties = new NameValueCollection();
                else
                    properties = (NameValueCollection) nameValueSectionHandler.Create(null, context, element.SelectSingleNode("properties"));

                directory = new DirectoryConfiguration(element.GetAttribute("name"), element.GetAttribute("type"), properties);

                directories.Add(directory.Name, directory);
            }

            return(directories);
        }
开发者ID:Dream123456,项目名称:cxs,代码行数:33,代码来源:DirectoriesSectionHandler.cs

示例12: UpdateCoverByCategoryID

        public virtual void UpdateCoverByCategoryID(int categoryID)
        {
            ListDictionary parameters = new ListDictionary();
            parameters.Add(new SqlParameter("@CategoryID", SqlDbType.Int), categoryID);

            base.LoadFromSql("[" + this.SchemaStoredProcedure + "usp_Gallery_UpdateCoverByCategoryID]", parameters);
        }
开发者ID:ivladyka,项目名称:Ekran,代码行数:7,代码来源:Gallery.cs

示例13: lbSendToFriend_Click

        protected void lbSendToFriend_Click(object sender, EventArgs e)
        {
            string url = Request.Url.AbsoluteUri;
            SmtpClient client = new SmtpClient(); //host and port picked from web.config
            client.EnableSsl = true;
            MailDefinition message = new MailDefinition();

            message.BodyFileName = @"~\EmailTemplate\MiriMargolinShareWithAFriend.htm";
            message.IsBodyHtml = true;
            message.From = "[email protected]";
            message.Subject = "MiriMargolin - Share with a friend";

            ListDictionary replacements = new ListDictionary();
            replacements.Add("<% YourName %>", this.txtYourName.Text);
            replacements.Add("<% Message %>", this.txtMessage.Text);
            //MailMessage msgHtml = message.CreateMailMessage(this.txtFriendsEmail.Text, replacements, new LiteralControl());
            //msgHtml.Bcc.Add(new MailAddress(RECIPIENTS));
            try
            {
                //client.Send(msgHtml);
            }
            catch (Exception)
            {
                //this.lblMsg.Text = "There was a problem to send an email.";
            }
        }
开发者ID:shaileshgajula,项目名称:c8a5b00a-1d86-40ff-a172-35d865eeec09,代码行数:26,代码来源:MiriMargolin.Master.cs

示例14: sendEmailToAdmin

        private void sendEmailToAdmin()
        {
            //Sending out emails to Admin

            MailDefinition md_2 = new MailDefinition();
            md_2.From = ConfigurationManager.AppSettings["MailFrom"];
            md_2.IsBodyHtml = true;
            md_2.Subject = ConfigurationManager.AppSettings["emailSubject"];

            ListDictionary replacements = new ListDictionary();

            replacements.Add("<%client_name%>", (string)(Session["client_name"]));
            replacements.Add("<%client_church_name%>", (string)(Session["client_church_name"]));
            replacements.Add("<%client_address%>", (string)(Session["client_address"]));
            replacements.Add("<%client_city%>", (string)(Session["client_city"]));
            replacements.Add("<%client_state%>", (string)(Session["client_state"]));
            replacements.Add("<%client_Zip%>", (string)(Session["client_Zip"]));
            replacements.Add("<%client_phone%>", (string)(Session["client_phone"]));
            replacements.Add("<%client_email%>", (string)(Session["client_email"]));
            replacements.Add("<%Payment_Amount%>", (string)(Session["Payment_Amount"]));
            replacements.Add("<%client_roommate1%>", (string)(Session["client_roommate1"]));
            replacements.Add(" <%client_registrationType%>", (string)(Session["client_registrationType"]));

            string body = String.Empty;

            using (StreamReader sr_2 = new StreamReader(Server.MapPath(ConfigurationManager.AppSettings["emailPath"] + "registration.txt")))
            {
                body = sr_2.ReadToEnd();
            }

            MailMessage msg_2 = md_2.CreateMailMessage(ConfigurationManager.AppSettings["management_Email"], replacements, body, new System.Web.UI.Control());

            SmtpClient client = new SmtpClient();
            client.Send(msg_2);
        }
开发者ID:meceneGithub,项目名称:WSTFORG,代码行数:35,代码来源:success.aspx.cs

示例15: SearchByCityIDAndCountryID

 public virtual void SearchByCityIDAndCountryID(int cityID, int countryID)
 {
     ListDictionary parameters = new ListDictionary();
     parameters.Add(new SqlParameter("@CityID", SqlDbType.Int), cityID);
     parameters.Add(new SqlParameter("@CountryID", SqlDbType.Int), countryID);
     base.LoadFromSql("[" + this.SchemaStoredProcedure + "usp_BlogPage_SearchByCityIDAndCountryID]", parameters);
 }
开发者ID:ivladyka,项目名称:OurTravels,代码行数:7,代码来源:BlogPage.cs


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