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


C# IDictionary.GetValue方法代码示例

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


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

示例1: UdpClientChannel

 public UdpClientChannel(IDictionary properties, IClientChannelSinkProvider provider)
 {
     ChannelName = properties.GetValue("name", UdpChannelHelper.DefaultName);
     ChannelPriority = properties.GetValue("priority", UdpChannelHelper.DefaultPriority);
     ClientSinkProvider = provider ?? UdpChannelHelper.CreateClientSinkProvider();
     SetupClientProviderChain(ClientSinkProvider, new UdpClientChannelSinkProvider());
 }
开发者ID:yallie,项目名称:zyan,代码行数:7,代码来源:UdpClientChannel.cs

示例2: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            if (dictionary != null)
            {
                var role = new Role();

                role.Id = dictionary.GetValue<int>(RedmineKeys.ID);
                role.Name = dictionary.GetValue<string>(RedmineKeys.NAME);

                var permissions = dictionary.GetValue<ArrayList>(RedmineKeys.PERMISSIONS);
                if (permissions != null)
                {
                    role.Permissions = new List<Permission>();
                    foreach (var permission in permissions)
                    {
                        var perms = new Permission() { Info = permission.ToString() };
                        role.Permissions.Add(perms);
                    }

                }

                return role;
            }
            return null;
        }
开发者ID:dreampet,项目名称:redmine-net-api,代码行数:25,代码来源:RoleConverter.cs

示例3: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            if (dictionary != null)
            {
                var customField = new IssueCustomField();

                customField.Id = dictionary.GetValue<int>(RedmineKeys.ID);
                customField.Name = dictionary.GetValue<string>(RedmineKeys.NAME);
                customField.Multiple = dictionary.GetValue<bool>(RedmineKeys.MULTIPLE);

                var val = dictionary.GetValue<object>(RedmineKeys.VALUE);

                if (val != null)
                {
                    if (customField.Values == null) customField.Values = new List<CustomFieldValue>();
                    var list = val as ArrayList;
                    if (list != null)
                    {
                        foreach (string value in list)
                        {
                            customField.Values.Add(new CustomFieldValue { Info = value });
                        }
                    }
                    else
                    {
                        customField.Values.Add(new CustomFieldValue { Info = val as string });
                    }
                }
                return customField;
            }

            return null;
        }
开发者ID:dreampet,项目名称:redmine-net-api,代码行数:33,代码来源:IssueCustomFieldConverter.cs

示例4: StyleRuleMetadata

 public StyleRuleMetadata(IDictionary<string, object> metadata)
 {
     this.AfterNames = metadata.GetValue("After", DefaultNamesValue).Where(n => n != null).ToList();
     this.BeforeNames = metadata.GetValue("Before", DefaultNamesValue).Where(n => n != null).ToList();
     this.LanguageName = (string)metadata["LanguageName"];
     this.Name = (string)metadata["Name"];
 }
开发者ID:nicholjy,项目名称:stylize,代码行数:7,代码来源:StyleRuleMetadata.cs

示例5: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfClientRelativeLinkDescriptor relativeLink = (WfClientRelativeLinkDescriptor)base.Deserialize(dictionary, type, serializer);

            relativeLink.Category = dictionary.GetValue("category", string.Empty);
            relativeLink.Url = dictionary.GetValue("url", string.Empty);

            return relativeLink;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:9,代码来源:WfClientRelativeLinkDescriptorJsonConverter.cs

示例6: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfClientDynamicResourceDescriptor conditionResourceDesp = (WfClientDynamicResourceDescriptor)base.Deserialize(dictionary, type, serializer);

            conditionResourceDesp.Name = dictionary.GetValue("name", string.Empty);
            conditionResourceDesp.Condition = JSONSerializerExecute.Deserialize<WfClientConditionDescriptor>(dictionary.GetValue("condition", (object)null));

            return conditionResourceDesp;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:9,代码来源:WfClientDynamicResourceDescriptorJsonConverter.cs

示例7: Deserialize

		public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
		{
			WeChatBaseResponse data = new WeChatBaseResponse();

			data.Ret = dictionary.GetValue("ret", 0);
			data.ErrMsg = dictionary.GetValue("err_msg", string.Empty);

			return data;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:9,代码来源:WeChatBaseResponseConverter.cs

示例8: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            string columnName = dictionary.GetValue("columnName", string.Empty);

            SOARolePropertyValue pv = new SOARolePropertyValue(new SOARolePropertyDefinition() { Name = columnName });

            pv.Value = dictionary.GetValue("value", string.Empty);

            return pv;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:10,代码来源:SOARolePropertyValueConverter.cs

示例9: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            if (dictionary != null)
            {
                var timeEntryActivity = new TimeEntryActivity { Id = dictionary.GetValue<int>("id"), Name = dictionary.GetValue<string>("name"), IsDefault = dictionary.GetValue<bool>("is_default") };
                return timeEntryActivity;
            }

            return null;
        }
开发者ID:Maaarek,项目名称:redmine-net-api,代码行数:10,代码来源:TimeEntryActivityConverter.cs

示例10: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfClientApplication application = new WfClientApplication();

            application.CodeName = dictionary.GetValue("codeName", string.Empty);
            application.Name = dictionary.GetValue("name", string.Empty);
            application.Sort = dictionary.GetValue("sort", 0);

            return application;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:10,代码来源:WfClientApplicationJsonConverter.cs

示例11: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            if (dictionary != null)
            {
                var tracker = new Tracker { Id = dictionary.GetValue<int>("id"), Name = dictionary.GetValue<string>("name") };
                return tracker;
            }

            return null;
        }
开发者ID:Maaarek,项目名称:redmine-net-api,代码行数:10,代码来源:TrackerConverter.cs

示例12: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfClientTransitionDescriptor transition = (WfClientTransitionDescriptor)base.Deserialize(dictionary, type, serializer);

            transition.FromActivityKey = dictionary.GetValue("fromActivityKey", string.Empty);
            transition.ToActivityKey = dictionary.GetValue("toActivityKey", string.Empty);
            transition.Condition = JSONSerializerExecute.Deserialize<WfClientConditionDescriptor>(dictionary.GetValue("condition", (object)null));

            return transition;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:10,代码来源:WfClientTransitionDescriptorJsonConverter.cs

示例13: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            if (dictionary != null)
            {
                var project = new Project();

                project.Id = dictionary.GetValue<int>("id");
                project.Description = dictionary.GetValue<string>("description");
                project.HomePage = dictionary.GetValue<string>("homepage");
                project.Name = dictionary.GetValue<string>("name");
                project.Identifier = dictionary.GetValue<string>("identifier");
                project.Status = dictionary.GetValue<ProjectStatus>("status");
                project.CreatedOn = dictionary.GetValue<DateTime?>("created_on");
                project.UpdatedOn = dictionary.GetValue<DateTime?>("updated_on");
                project.Trackers = dictionary.GetValueAsCollection<ProjectTracker>("trackers");
                project.CustomFields = dictionary.GetValueAsCollection<IssueCustomField>("custom_fields");
                project.IsPublic = dictionary.GetValue<bool>("is_public");
                project.Parent = dictionary.GetValueAsIdentifiableName("parent");
                project.IssueCategories = dictionary.GetValueAsCollection<ProjectIssueCategory>("issue_categories");
                project.EnabledModules = dictionary.GetValueAsCollection<ProjectEnabledModule>("enabled_modules");
                return project;
            }

            return null;
        }
开发者ID:Maaarek,项目名称:redmine-net-api,代码行数:25,代码来源:ProjectConverter.cs

示例14: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            if (dictionary != null)
            {
                var project = new Project();

                project.Id = dictionary.GetValue<int>(RedmineKeys.ID);
                project.Description = dictionary.GetValue<string>(RedmineKeys.DESCRIPTION);
                project.HomePage = dictionary.GetValue<string>(RedmineKeys.HOMEPAGE);
                project.Name = dictionary.GetValue<string>(RedmineKeys.NAME);
                project.Identifier = dictionary.GetValue<string>(RedmineKeys.IDENTIFIER);
                project.Status = dictionary.GetValue<ProjectStatus>(RedmineKeys.STATUS);
                project.CreatedOn = dictionary.GetValue<DateTime?>(RedmineKeys.CREATED_ON);
                project.UpdatedOn = dictionary.GetValue<DateTime?>(RedmineKeys.UPDATED_ON);
                project.Trackers = dictionary.GetValueAsCollection<ProjectTracker>(RedmineKeys.TRACKERS);
                project.CustomFields = dictionary.GetValueAsCollection<IssueCustomField>(RedmineKeys.CUSTOM_FIELDS);
                project.IsPublic = dictionary.GetValue<bool>(RedmineKeys.IS_PUBLIC);
                project.Parent = dictionary.GetValueAsIdentifiableName(RedmineKeys.PARENT);
                project.IssueCategories = dictionary.GetValueAsCollection<ProjectIssueCategory>(RedmineKeys.ISSUE_CATEGORIES);
                project.EnabledModules = dictionary.GetValueAsCollection<ProjectEnabledModule>(RedmineKeys.ENABLED_MODULES);
                return project;
            }

            return null;
        }
开发者ID:Enhakiel,项目名称:redmine-net-api,代码行数:25,代码来源:ProjectConverter.cs

示例15: Deserialize

        public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer)
        {
            WfClientRolePropertyRow row = new WfClientRolePropertyRow();

            row.RowNumber = dictionary.GetValue("rowNumber", 0);
            row.Operator = dictionary.GetValue("operator", string.Empty);
            row.OperatorType = dictionary.GetValue("operatorType", WfClientRoleOperatorType.User);
            JSONSerializerExecute.FillDeserializedCollection(dictionary["values"], row.Values);

            return row;
        }
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:11,代码来源:WfClientRolePropertyRowJsonConverter.cs


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