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


C# System.Collections.Generic.Dictionary.Add方法代码示例

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


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

示例1: Send

 /// <summary>Sends a notification to a set of users.</summary>
 /// <param name="toIds">Comma-separated list of recipient IDs. These must be either friends of the logged-in user or people who have added your application. To send a notification to the current logged-in user without a name prepended to the message, set <code>to_ids</code> to the empty string.</param>
 /// <param name="notification"><a href="/index.php/FBML" title="FBML">FBML</a> for the notifications page. Uses a stripped down version allowing only text and links.</param>
 public FacebookResponse<String> Send(String[] toIds, String notification) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("to_ids", toIds);
     args.Add("notification", notification);
     var response = this.ExecuteRequest<String>("Notifications.send", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:NotificationsController.api.g.cs

示例2: RegisterTemplateBundle

 /// <summary>Builds a template bundle around the specified templates, registers them on Facebook, and responds with a template bundle ID that can be used to identify your template bundle to other Feed-related API calls.</summary>
 /// <param name="oneLineStoryTemplates">A JSON-encoded array containing one FBML template that can be used to render one line Feed stories.</param>
 /// <param name="shortStoryTemplates">A JSON-encoded array containing an object, which represents a short story template.  The dictionary should include two fields: <code>template_title</code>, which should be mapped to the FBML template used to render a short story's title, and <code>template_body</code>, which should map to the FBML template used to render a short story's body. The token set of a short story template is taken to be the union of the <code>template_title</code> and the <code>template_body</code> templates.</param>
 public FacebookResponse<Int64> RegisterTemplateBundle(String[] oneLineStoryTemplates, String[] shortStoryTemplates) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("one_line_story_templates", oneLineStoryTemplates);
     args.Add("short_story_templates", shortStoryTemplates);
     var response = this.ExecuteRequest<Int64>("Feed.registerTemplateBundle", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:FeedController.api.g.cs

示例3: AreFriends

 /// <summary>Returns whether or not each pair of specified users is friends with each other.</summary>
 /// <param name="uids1">A list of user IDs matched with <code>uids2</code>. This is a comma-separated list of user IDs.</param>
 /// <param name="uids2">A list of user IDs matched with <code>uids1</code>. This is a comma-separated list of user IDs.</param>
 public FacebookResponse<FacebookList<FriendInfo>> AreFriends(String[] uids1, String[] uids2) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("uids1", uids1);
     args.Add("uids2", uids2);
     var response = this.ExecuteRequest<FacebookList<FriendInfo>>("Friends.areFriends", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:FriendsController.api.g.cs

示例4: 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

示例5: btnIniciar_onclick

    public static void btnIniciar_onclick(string mail, string pass)
    {
        //HttpContext.Current.Session["user"] = "1";
        //return;
        if (validar( mail,  pass))
        {
            //revisar que los datos existan
            Dictionary<string, object> parameters = new System.Collections.Generic.Dictionary<string, object>();
            parameters.Add("@mail", mail);
            parameters.Add("@pass", pass);
            DataTable dt = null;
            dt = DataAccess.executeStoreProcedureDataTable("spr_GET_IniciarSesion", parameters);
            try
            {
                if (dt != null && dt.Rows.Count > 0)
                {
                    string result = dt.Rows[0]["result"].ToString();
                    HttpContext.Current.Session["err"] = result;
                    HttpContext.Current.Session["user"] = null;
                    if (result == "puedePasar")
                    {
                        HttpContext.Current.Session["user"] = dt.Rows[0]["nikname"].ToString().Trim();
                        HttpContext.Current.Session["findOut"] = dt.Rows[0]["findOut"].ToString().Trim();
                        HttpContext.Current.Session["idEmpresa"] = dt.Rows[0]["idEmpresa"].ToString().Trim();
                    }
                }
            }
            catch (Exception ex) {

            }
        }
    }
开发者ID:hectormoreno87,项目名称:FinditOut,代码行数:32,代码来源:Inicio.aspx.cs

示例6: RevokeExtendedPermission

 /// <summary>Removes a specific <a href="/index.php/Extended_permission" title="Extended permission">extended permission</a> that a user explicitly granted to your application.</summary>
 /// <param name="uid">The <a href="/index.php/User_ID" title="User ID">user ID</a> of the user whose <a href="/index.php/Extended_permissions" title="Extended permissions">extended permission</a> you want to revoke. If you don't specify this parameter, then you must have a valid session for the current user, and that session's user will have the specified permission revoked.</param>
 /// <param name="perm">The <a href="/index.php/Extended_permissions" title="Extended permissions">extended permission</a> to revoke.</param>
 public FacebookResponse<Boolean> RevokeExtendedPermission(Int64 uid, String perm) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("uid", uid);
     args.Add("perm", perm);
     var response = this.ExecuteRequest<Boolean>("Auth.revokeExtendedPermission", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:AuthController.api.g.cs

示例7: 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

示例8: 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

示例9: ProcessRequest

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json; charset=utf-8";
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            int sIId = 0;
            if (string.IsNullOrEmpty(context.Request.QueryString["sIId"]) || !int.TryParse(context.Request.QueryString["sIId"], out sIId))
                sIId = 0;

            NFMT.Invoice.BLL.SIDetailBLL sIDetailBLL = new NFMT.Invoice.BLL.SIDetailBLL();
            NFMT.Common.ResultModel result = sIDetailBLL.GetSIDetailForUpdate(user, sIId);
            context.Response.ContentType = "application/json; charset=utf-8";
            if (result.ResultStatus != 0)
            {
                context.Response.Write(result.Message);
                context.Response.End();
            }

            System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable;
            System.Collections.Generic.Dictionary<string, object> dic = new System.Collections.Generic.Dictionary<string, object>();

            dic.Add("count", dt.Rows.Count);
            dic.Add("data", dt);

            string postData = Newtonsoft.Json.JsonConvert.SerializeObject(dic);
            context.Response.Write(postData);
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:27,代码来源:SIDetailListHandler.ashx.cs

示例10: 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

示例11: ProcessRequest

        public void ProcessRequest(HttpContext context)
        {
            NFMT.Common.UserModel user = Utility.UserUtility.CurrentUser;

            int pageIndex = 1, pageSize = 10;
            string orderStr = string.Empty, whereStr = string.Empty;

            int customerCorpId = 0;
            if (!string.IsNullOrEmpty(context.Request.QueryString["corpId"]))
            {
                if (!int.TryParse(context.Request.QueryString["corpId"], out customerCorpId))
                    customerCorpId = 0;
            }

            DateTime beginDate = NFMT.Common.DefaultValue.DefaultTime;
            DateTime endDate = NFMT.Common.DefaultValue.DefaultTime;

            if (!string.IsNullOrEmpty(context.Request["db"]))
            {
                if (!DateTime.TryParse(context.Request["db"], out beginDate))
                    beginDate = NFMT.Common.DefaultValue.DefaultTime;
            }
            if (!string.IsNullOrEmpty(context.Request["de"]))
            {
                if (!DateTime.TryParse(context.Request["de"], out endDate))
                    endDate = NFMT.Common.DefaultValue.DefaultTime;
                else
                    endDate = endDate.AddDays(1);
            }

            if (!string.IsNullOrEmpty(context.Request.QueryString["pagenum"]))
                int.TryParse(context.Request.QueryString["pagenum"], out pageIndex);
            pageIndex++;
            if (!string.IsNullOrEmpty(context.Request.QueryString["pagesize"]))
                int.TryParse(context.Request.QueryString["pagesize"], out pageSize);

            if (!string.IsNullOrEmpty(context.Request.QueryString["sortdatafield"]) && !string.IsNullOrEmpty(context.Request.QueryString["sortorder"]))
                orderStr = string.Format("{0} {1}", context.Request.QueryString["sortdatafield"].Trim(), context.Request.QueryString["sortorder"].Trim());

            NFMT.Invoice.BLL.InvoiceApplyBLL bll = new NFMT.Invoice.BLL.InvoiceApplyBLL();
            NFMT.Common.SelectModel select = bll.GetCanApplySISelectModel(pageIndex, pageSize, orderStr, customerCorpId, beginDate, endDate);
            NFMT.Common.ResultModel result = bll.Load(user, select);

            context.Response.ContentType = "application/json; charset=utf-8";
            if (result.ResultStatus != 0)
            {
                context.Response.Write(result.Message);
                context.Response.End();
            }

            System.Data.DataTable dt = result.ReturnValue as System.Data.DataTable;
            System.Collections.Generic.Dictionary<string, object> dic = new System.Collections.Generic.Dictionary<string, object>();

            dic.Add("count", result.AffectCount);
            dic.Add("data", dt);

            string postData = Newtonsoft.Json.JsonConvert.SerializeObject(dic);

            context.Response.Write(postData);
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:60,代码来源:InvoiceApplySIListHandler.ashx.cs

示例12: 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

示例13: 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

示例14: GetAlbums

 /// <summary>Returns metadata about all of the photo albums uploaded by the specified user.</summary>
 /// <param name="uid">Return albums created by this user. You must specify either <code>uid</code> or <code>aids</code>. The <code>uid</code> parameter has no default value.</param>
 /// <param name="aids">Return albums with aids in this list. This is a comma-separated list of aids. You must specify either <code>uid</code> or <code>aids</code>. The <code>aids</code> parameter has no default value.</param>
 public FacebookResponse<FacebookList<Album>> GetAlbums(Int64 uid, String[] aids) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("uid", uid);
     args.Add("aids", aids);
     var response = this.ExecuteRequest<FacebookList<Album>>("Photos.getAlbums", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:PhotosController.api.g.cs

示例15: 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="profile">The FBML intended for the application profile box that appears on the Boxes tab on the user's profile.</param>
 /// <param name="profileMain">The FBML intended for the <a href="/index.php/New_Design_Narrow_Boxes" title="New Design Narrow Boxes">narrow profile box</a> on the Wall and Info tabs of the user's profile. <b>Note:</b> This attribute applies only to the new profile design that launched July 2008.</param>
 public FacebookResponse<Boolean> SetFBML(String profile, String profileMain) {
     System.Collections.Generic.Dictionary<string, object> args = new System.Collections.Generic.Dictionary<string, object>();
     args.Add("profile", profile);
     args.Add("profile_main", profileMain);
     var response = this.ExecuteRequest<Boolean>("Profile.setFBML", args);
     return response;
 }
开发者ID:davelondon,项目名称:dontstayin,代码行数:10,代码来源:ProfileController.api.g.cs


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