本文整理汇总了C#中Spring.Objects.MutablePropertyValues.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# MutablePropertyValues.Remove方法的具体用法?C# MutablePropertyValues.Remove怎么用?C# MutablePropertyValues.Remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spring.Objects.MutablePropertyValues
的用法示例。
在下文中一共展示了MutablePropertyValues.Remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangesSinceWithSelf
public void ChangesSinceWithSelf ()
{
IDictionary<string, object> map = new Dictionary<string, object>();
map.Add("Name", "Fiona Apple");
map.Add ("Age", 24);
MutablePropertyValues props = new MutablePropertyValues (map);
props.Remove ("name");
// get all of the changes between self and self again (there should be none);
IPropertyValues changes = props.ChangesSince (props);
Assert.AreEqual (0, changes.PropertyValues.Count);
}
示例2: RemoveByName
public void RemoveByName()
{
MutablePropertyValues props = new MutablePropertyValues ();
props.Add (new PropertyValue ("Name", "Fiona Apple"));
props.Add (new PropertyValue ("Age", 24));
Assert.AreEqual (2, props.PropertyValues.Length);
props.Remove ("name");
Assert.AreEqual (1, props.PropertyValues.Length);
}
示例3: RemoveByPropertyValue
public void RemoveByPropertyValue ()
{
MutablePropertyValues props = new MutablePropertyValues ();
PropertyValue propName = new PropertyValue ("Name", "Fiona Apple");
props.Add (propName);
props.Add (new PropertyValue ("Age", 24));
Assert.AreEqual (2, props.PropertyValues.Count);
props.Remove (propName);
Assert.AreEqual (1, props.PropertyValues.Count);
}
示例4: CreateJobInstance
/// <summary>
/// Create the job instance, populating it with property values taken
/// from the scheduler context, job data map and trigger data map.
/// </summary>
protected override object CreateJobInstance(TriggerFiredBundle bundle)
{
ObjectWrapper ow = new ObjectWrapper(bundle.JobDetail.JobType);
if (IsEligibleForPropertyPopulation(ow.WrappedInstance))
{
MutablePropertyValues pvs = new MutablePropertyValues();
if (schedulerContext != null)
{
pvs.AddAll(schedulerContext);
}
pvs.AddAll(bundle.JobDetail.JobDataMap);
pvs.AddAll(bundle.Trigger.JobDataMap);
if (ignoredUnknownProperties != null)
{
for (int i = 0; i < ignoredUnknownProperties.Length; i++)
{
string propName = ignoredUnknownProperties[i];
if (pvs.Contains(propName))
{
pvs.Remove(propName);
}
}
ow.SetPropertyValues(pvs);
}
else
{
ow.SetPropertyValues(pvs, true);
}
}
return ow.WrappedInstance;
}