本文整理汇总了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());
}
示例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;
}
示例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;
}
示例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"];
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}