本文整理汇总了C#中Spring.Objects.MutablePropertyValues.AddAll方法的典型用法代码示例。如果您正苦于以下问题:C# MutablePropertyValues.AddAll方法的具体用法?C# MutablePropertyValues.AddAll怎么用?C# MutablePropertyValues.AddAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spring.Objects.MutablePropertyValues
的用法示例。
在下文中一共展示了MutablePropertyValues.AddAll方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
}
示例2: Execute
/// <summary>
/// This implementation applies the passed-in job data map as object property
/// values, and delegates to <code>ExecuteInternal</code> afterwards.
/// </summary>
/// <seealso cref="ExecuteInternal" />
public void Execute(IJobExecutionContext context)
{
try
{
ObjectWrapper bw = new ObjectWrapper(this);
MutablePropertyValues pvs = new MutablePropertyValues();
pvs.AddAll(context.Scheduler.Context);
pvs.AddAll(context.MergedJobDataMap);
bw.SetPropertyValues(pvs, true);
}
catch (SchedulerException ex)
{
throw new JobExecutionException(ex);
}
ExecuteInternal(context);
}
示例3: AddAllInNullMap
public void AddAllInNullMap()
{
MutablePropertyValues props = new MutablePropertyValues ();
props.Add (new PropertyValue ("Name", "Fiona Apple"));
props.AddAll ((IDictionary) null);
Assert.AreEqual (1, props.PropertyValues.Length);
}
示例4: AddAllInNullList
public void AddAllInNullList()
{
MutablePropertyValues props = new MutablePropertyValues ();
props.Add (new PropertyValue ("Name", "Fiona Apple"));
props.Add (new PropertyValue ("Age", 24));
props.AddAll ((IList) null);
Assert.AreEqual (2, props.PropertyValues.Length);
}
示例5: AddAllInList
public void AddAllInList()
{
MutablePropertyValues props = new MutablePropertyValues ();
props.AddAll (new PropertyValue [] {
new PropertyValue ("Name", "Fiona Apple"),
new PropertyValue ("Age", 24)});
Assert.AreEqual (2, props.PropertyValues.Length);
}
示例6: AddAllInMap
public void AddAllInMap()
{
MutablePropertyValues props = new MutablePropertyValues ();
IDictionary map = new Hashtable ();
map.Add ("Name", "Fiona Apple");
map.Add ("Age", 24);
props.AddAll (map);
Assert.AreEqual (2, props.PropertyValues.Length);
}
示例7: AddAllInNullMap
public void AddAllInNullMap ()
{
MutablePropertyValues props = new MutablePropertyValues ();
props.Add (new PropertyValue ("Name", "Fiona Apple"));
props.AddAll ((IDictionary<string, object>) null);
Assert.AreEqual (1, props.PropertyValues.Count);
}
示例8: AddAllInMap
public void AddAllInMap ()
{
MutablePropertyValues props = new MutablePropertyValues ();
IDictionary<string, object> map = new Dictionary<string, object>();
map.Add("Name", "Fiona Apple");
map.Add ("Age", 24);
props.AddAll (map);
Assert.AreEqual (2, props.PropertyValues.Count);
}