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


C# MutablePropertyValues.Remove方法代码示例

本文整理汇总了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);
 }
开发者ID:Binodesk,项目名称:spring-net,代码行数:11,代码来源:MutablePropertyValuesTests.cs

示例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);
 }
开发者ID:smnbss,项目名称:spring-net,代码行数:9,代码来源:MutablePropertyValuesTests.cs

示例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);
 }
开发者ID:Binodesk,项目名称:spring-net,代码行数:10,代码来源:MutablePropertyValuesTests.cs

示例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;
 }
开发者ID:Binodesk,项目名称:spring-net,代码行数:35,代码来源:SpringObjectJobFactory.cs


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