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

C# Generic.Dictionary类代码示例

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

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



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

示例1: HandleType

        public static string HandleType(string name)
        {
            if (name == "Bridge.Int")
            {
                //it is hack, need to find good solution
                return "Number";
            }

            if (decodeRegex == null)
            {
                replacements = new System.Collections.Generic.Dictionary<string, string>(4);
                replacements.Add("\\(", "<");
                replacements.Add("\\)", ">");
                replacements.Add("Bridge.Int", "Number");

                decodeRegex = new Regex("(" + String.Join("|", replacements.Keys.ToArray()) + ")", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline);
            }

            return decodeRegex.Replace
                (
                    name,
                    delegate(Match m) {
                        return replacements.ContainsKey(m.Value) ? replacements[m.Value] : replacements["\\" + m.Value];
                    }
                );
        }
开发者ID:Oaz,项目名称:bridgedotnet_Builder,代码行数:26,代码来源:EmitBlock.cs


示例2: GetStandardInfo

 /// <summary>Returns an array of user-specific information for use by the application itself.</summary>
 /// <param name="uids">List of user IDs. This is a comma-separated list of user IDs.</param>
 /// <param name="fields">List of desired fields in return. This is a comma-separated list of field strings and is limited to these entries only: <code>uid</code>, <code>first_name</code>, <code>last_name</code>, <code>name</code>, <code>timezone</code>, <code>birthday</code>, <code>sex</code>, <code>affiliations</code> (regional type only), <code>locale</code>, <code>profile_url</code>, <code>proxied_email</code>.</param>
 public FacebookResponse<FacebookList<User>> GetStandardInfo(String[] uids, String[] fields) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("uids", uids);
     args.Add("fields", fields);
     var response = this.ExecuteRequest<FacebookList<User>>("Users.getStandardInfo", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:UsersController.api.g.cs


示例3: RollBackLast

		//Rolls back index to a chosen ID
		private void  RollBackLast(int id)
		{
			
			// System.out.println("Attempting to rollback to "+id);
			System.String ids = "-" + id;
			IndexCommit last = null;
			IList<IndexCommit> commits = IndexReader.ListCommits(dir);
			for (System.Collections.IEnumerator iterator = commits.GetEnumerator(); iterator.MoveNext(); )
			{
				IndexCommit commit = (IndexCommit) iterator.Current;
                System.Collections.Generic.IDictionary<string, string> ud = commit.GetUserData();
				if (ud.Count > 0)
					if (((System.String) ud["index"]).EndsWith(ids))
						last = commit;
			}
			
			if (last == null)
				throw new System.SystemException("Couldn't find commit point " + id);
			
			IndexWriter w = new IndexWriter(dir, new WhitespaceAnalyzer(), new RollbackDeletionPolicy(this, id), MaxFieldLength.UNLIMITED, last);
            System.Collections.Generic.IDictionary<string, string> data = new System.Collections.Generic.Dictionary<string, string>();
			data["index"] = "Rolled back to 1-" + id;
			w.Commit(data);
			w.Close();
		}
开发者ID:kstenson,项目名称:NHibernate.Search,代码行数:26,代码来源:TestTransactionRollback.cs


示例4: Get

 /// <summary>Returns all visible groups according to the filters specified.</summary>
 /// <param name="uid">Filter by groups associated with a user with this UID.</param>
 /// <param name="gids">Filter by this list of group IDs. This is a comma-separated list of GIDs.</param>
 public FacebookResponse<FacebookList<Group>> Get(Int64 uid, String gids) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("uid", uid);
     args.Add("gids", gids);
     var response = this.ExecuteRequest<FacebookList<Group>>("Groups.get", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:GroupsController.api.g.cs


示例5: CreateAlbum

 /// <summary>Creates and returns a new album owned by the current session user.</summary>
 /// <param name="name">The album name.</param>
 /// <param name="description">The album description.</param>
 public FacebookResponse<Album> CreateAlbum(String name, String description) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("name", name);
     args.Add("description", description);
     var response = this.ExecuteRequest<Album>("Photos.createAlbum", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:PhotosController.api.g.cs


示例6: SetRefHandle

 /// <summary>Associates a given "handle" with FBML markup so that the handle can be used within the <a href="/index.php/Fb:ref" title="Fb:ref">fb:ref</a> FBML tag.</summary>
 /// <param name="handle">The handle to associate with the given <a href="/index.php/FBML" title="FBML">FBML</a>.</param>
 /// <param name="fbml">The FBML to associate with the given handle.</param>
 public FacebookResponse<Boolean> SetRefHandle(String handle, String fbml) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("handle", handle);
     args.Add("fbml", fbml);
     var response = this.ExecuteRequest<Boolean>("Fbml.setRefHandle", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:FbmlController.api.g.cs


示例7: GetDataFeed

 public System.Collections.Generic.List<DataFeed> GetDataFeed(PricingLibrary.FinancialProducts.IOption option, System.DateTime fromDate)
 {
     System.Collections.Generic.List<DataFeed> result = new System.Collections.Generic.List<DataFeed>() ;
     using (DataBaseDataContext mtdc = new DataBaseDataContext())
     {
         var result1 = (from s in mtdc.HistoricalShareValues where ((option.UnderlyingShareIds.Contains(s.id)) && (s.date >= fromDate)&&(s.date<=option.Maturity)) select s).OrderByDescending(d => d.date).ToList();
         System.DateTime curentdate = result1[result1.Count() - 1].date;
         System.Collections.Generic.Dictionary<String, decimal> priceList = new System.Collections.Generic.Dictionary<String, decimal>();
         for (int i = result1.Count() - 1; i >= 0 ; i--)
         {
             if (result1[i].date==curentdate)
             {
                 priceList.Add(result1[i].id.Trim(), result1[i].value);
             }
             else
             {
                 DataFeed datafeed = new DataFeed(curentdate, priceList);
                 result.Add(datafeed);
                 curentdate = result1[i].date;
                 priceList = new System.Collections.Generic.Dictionary<String, decimal>();
                 priceList.Add(result1[i].id.Trim(), result1[i].value);
             }
             if (i == 0)
             {
                 DataFeed datafeedOut = new DataFeed(curentdate, priceList);
                 result.Add(datafeedOut);
             }
         }
         return result;
     }
 }
开发者ID:muleta33,项目名称:ProjetNET,代码行数:31,代码来源:HistoricalDataFeedProvider.cs


示例8: IncrementCount

		/// <summary>
		/// 
		/// </summary>
		/// <param name="uid"></param>
		/// <returns></returns>
		public FacebookResponse<String> IncrementCount(string uid)
		{
            System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
            args.Add("uid", uid);
			var response = this.ExecuteRequest<String>("Dashboard.incrementCount", args);
            return response;
        }
开发者ID:davelondon,项目名称:dontstayin,代码行数:12,代码来源:DashboardController.api.g.cs


示例9: TheTVDB

        public TheTVDB(FileInfo loadFrom, FileInfo cacheFile, CommandLineArgs args)
        {
            Args = args;

            System.Diagnostics.Debug.Assert(cacheFile != null);
            this.CacheFile = cacheFile;

            this.LastError = "";
            // this.WhoHasLock = new List<String>();
            this.Connected = false;
            this.ExtraEpisodes = new System.Collections.Generic.List<ExtraEp>();

            this.LanguageList = new System.Collections.Generic.Dictionary<string, string>();
            this.LanguageList["en"] = "English";

            this.XMLMirror = "http://thetvdb.com";
            this.BannerMirror = "http://thetvdb.com";
            this.ZIPMirror = "http://thetvdb.com";

            this.Series = new System.Collections.Generic.Dictionary<int, SeriesInfo>();
            this.New_Srv_Time = this.Srv_Time = 0;

            this.LoadOK = (loadFrom == null) || this.LoadCache(loadFrom);

            this.ForceReloadOn = new System.Collections.Generic.List<int>();
        }
开发者ID:madams74,项目名称:tvrename,代码行数:26,代码来源:TheTVDB.cs


示例10: Delete

 /// <summary>Lets a user delete a Facebook note that was written through your application.</summary>
 /// <param name="title">The title of the note.</param>
 /// <param name="content">The note's content.</param>
 public FacebookResponse<Boolean> Delete(String title, String content) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("title", title);
     args.Add("content", content);
     var response = this.ExecuteRequest<Boolean>("Notes.delete", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:NotesController.api.g.cs


示例11: btnIniciar_onclick

    public static void btnIniciar_onclick(string mail)
    {
        //sacar pass
        Dictionary<string, object> parameters = new System.Collections.Generic.Dictionary<string, object>();
        parameters.Add("@mail", mail);
        string pass = DataAccess.executeStoreProcedureString("spr_GET_Pass", parameters);
        if (!String.IsNullOrEmpty(pass))
        {
            try
            {
                var pv = new Dictionary<string, string>();
                var files = new Dictionary<string, Stream>();

                Common.SendMailByDictionary(pv, files, /*mail*/"[email protected]", "MandarPass", pass);
                HttpContext.Current.Session["passEnviadoBien"] = "true";
            }
            catch (Exception ex)
            {
                HttpContext.Current.Session["passEnviadoBien"] = "false";
            }
        }
        else
        {
            HttpContext.Current.Session["passEnviadoBien"] = "noEncontrado";
        }
    }
开发者ID:hectormoreno87,项目名称:FinditOut,代码行数:26,代码来源:SendPass.aspx.cs


示例12: SetFBML

 /// <summary>Sets the FBML for a user's profile, including the content for both the profile box and the profile actions.</summary>
 /// <param name="uid">The <a href="/index.php/User_ID" title="User ID">user ID</a> for the user whose profile you are updating, or the page ID in case of a Page. If this parameter is not specified, then it defaults to the session user.  <br/><b>Note:</b> This parameter applies only to Web applications and is required by them only if the <code>session_key</code> is not specified. Facebook returns an error if this parameter is passed by a desktop application.</param>
 public FacebookResponse<Boolean> SetFBML(Int64 uid) {
     if ((this.FacebookContext.ApplicationType & ApplicationType.Website)!= ApplicationType.Website)throw new InvalidOperationException("This overload cannot be called in this context");
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("uid", uid);
     var response = this.ExecuteRequest<Boolean>("Profile.setFBML", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:9,代码来源:ProfileController.api.g.cs


示例13: Get

 /// <summary>Returns all visible events according to the filters specified.</summary>
 /// <param name="uid">Filter by events associated with a user with this <code>uid</code>.</param>
 /// <param name="rsvpStatus">Filter by this RSVP status. The RSVP status should be one of the following strings:
 ///<ul><li> attending
 ///</li><li> unsure
 ///</li><li> declined
 ///</li><li> not_replied</param>
 public FacebookResponse<FacebookList<Event>> Get(Int64 uid, String rsvpStatus) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("uid", uid);
     args.Add("rsvp_status", rsvpStatus);
     var response = this.ExecuteRequest<FacebookList<Event>>("Events.get", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:14,代码来源:EventsController.api.g.cs


示例14: GetCookies

 /// <summary>Returns all cookies for a given user and application.</summary>
 /// <param name="name">The name of the cookie. If not specified, all the cookies for the given user get returned.</param>
 /// <param name="uid">The user from whom to get the cookies.</param>
 public FacebookResponse<FacebookList<Cookie>> GetCookies(String name, Int64 uid) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("name", name);
     args.Add("uid", uid);
     var response = this.ExecuteRequest<FacebookList<Cookie>>("Data.getCookies", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:DataController.api.g.cs


示例15: SendPostRequest

        static public IEnumerator SendPostRequest(string url, byte[] data, Dictionary<string, string> headers, System.Action<WWW> callback, System.Action<string> errorCallback)
        {
            System.Collections.Generic.Dictionary<string, string> defaultHeaders = new System.Collections.Generic.Dictionary<string, string>(); ;
            if (data != null)
            {
                defaultHeaders.Add("Content-Type", "application/octet-stream");
                defaultHeaders.Add("Content-Length", data.Length.ToString());
            }

            if (headers != null)
            {
                foreach(KeyValuePair<string, string> pair in headers)
                {
                    defaultHeaders.Add(pair.Key, pair.Value);
                }                
            }

            WWW www = new WWW(url, data, defaultHeaders);
            yield return www;

            if (!System.String.IsNullOrEmpty(www.error))
            {
                if (errorCallback != null)
                {
                    errorCallback(www.error);
                }
            }
            else
            {
                callback(www);
            }
        }
开发者ID:yakolla,项目名称:HelloVertX,代码行数:32,代码来源:Http.cs


示例16: ShowDialog

        public void ShowDialog(string customerID, IWin32Window parent, IBindingListView blist)
        {
            // Put the customer id in the window title.
            this.Text = "Orders for Customer ID: " + customerID;

            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = blist;

            // The check box column will be virtual.
            dataGridView1.VirtualMode = true;
            dataGridView1.Columns.Insert(0, new DataGridViewCheckBoxColumn());

            // Don't allow the column to be resizable.
            dataGridView1.Columns[0].Resizable = DataGridViewTriState.False;

            // Make the check box column frozen so it is always visible.
            dataGridView1.Columns[0].Frozen = true;

            // Put an extra border to make the frozen column more visible
            dataGridView1.Columns[0].DividerWidth = 1;

            // Make all columns except the first read only.
            foreach (DataGridViewColumn c in dataGridView1.Columns)
                if (c.Index != 0) c.ReadOnly = true;

            // Initialize the dictionary that contains the boolean check state.
            checkState = new Dictionary<int, bool>();

            // Show the dialog.
            this.ShowDialog(parent);
        }
开发者ID:huaminglee,项目名称:DeeHome,代码行数:31,代码来源:CustomerOrdersForm.cs


示例17: AsDictionary

 public override System.Collections.Generic.IDictionary<string, object> AsDictionary()
 {
     System.Collections.Generic.Dictionary<string, object> result = new System.Collections.Generic.Dictionary<string, object>();
     result["PowerLines"] = this.PowerLines;
     result["CurrentPower"] = this.CurrentPower;
     return result;
 }
开发者ID:flyingoverclouds,项目名称:TD15FR-IotArchitectureHautePerformance,代码行数:7,代码来源:orleans.codegen.cs


示例18: GetPlaneNameByPlaneID

        public static string GetPlaneNameByPlaneID(int planeid)
        {
            if (dictPlane == null)
            {

                SecureDBEntities1 db=new SecureDBEntities1();
                dictPlane = new Dictionary<int, tblERPlane>();
                var q= from n in db.tblERPlane  select n;
                foreach (tblERPlane planedata in q)
                {
                    try
                    {
                        dictPlane.Add(planedata.PlaneID, planedata);
                    }
                    catch (Exception ex)
                    {
                        ;
                    }
                }
      

            }

            return  dictPlane[planeid].PlaneName;

        }
开发者ID:ufjl0683,项目名称:slSecureAndPD,代码行数:26,代码来源:Global.cs


示例19: GetSession

 /// <summary>Returns the session key bound to an auth_token, as returned by <a href="/index.php/Auth.createToken" title="Auth.createToken">auth.createToken</a> or in the callback URL.</summary>
 /// <param name="authToken">The token returned by <a href="/index.php/Auth.createToken" title="Auth.createToken">auth.createToken</a> and passed into login.php</param>
 public FacebookResponse<SessionInfo> GetSession(String authToken) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("auth_token", authToken);
     var response = this.ExecuteRequest<SessionInfo>("Auth.getSession", args);
     if (!response.IsError) this.FacebookContext.InitSession(response.Value);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:9,代码来源:AuthController.api.cs


示例20: GetAllocation

 /// <summary>Returns the current allocation limit for your application for the specified integration point.</summary>
 /// <param name="user">The <a href="/index.php/User_ID" title="User ID">user ID</a> for the specific user whose allocations you want to to check. Specifying a user ID is relevant only with respect to the emails_per_day integration point for users who granted the email permission prior to the 2008 profile design update, per the note on <a href="/index.php/Notifications.sendEmail" title="Notifications.sendEmail">notifications.sendEmail</a>.</param>
 /// <param name="integrationPointName">The name of the integration point. Integration points include <code>notifications_per_day</code>, <code>announcement_notifications_per_week</code>, <code>requests_per_day</code>, <code>emails_per_day</code>, and <code>email_disable_message_location</code>.</param>
 public FacebookResponse<Int64> GetAllocation(Int64 user, String integrationPointName) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("user", user);
     args.Add("integration_point_name", integrationPointName);
     var response = this.ExecuteRequest<Int64>("Admin.getAllocation", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:AdminController.api.g.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Generic.List类代码示例发布时间:2022-05-26
下一篇:
C# Generic.PriorityQueue类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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