當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。