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


C# Generic.Dictionary类代码示例

本文整理汇总了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类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


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