• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# NotifyCollectionChangedAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NotifyCollectionChangedAction的典型用法代码示例。如果您正苦于以下问题:C# NotifyCollectionChangedAction类的具体用法?C# NotifyCollectionChangedAction怎么用?C# NotifyCollectionChangedAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NotifyCollectionChangedAction类属于命名空间,在下文中一共展示了NotifyCollectionChangedAction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: NotifyCollectionChangedEventArgs

		/// <summary>
		/// Construct a NotifyCollectionChangedEventArgs that describes a one-item change. 
		/// </summary> 
		/// <param name="action">The action that caused the event.</param>
		/// <param name="changedItem">The item affected by the change.</param> 
		/// <param name="index">The index where the change occurred.</param>
		public NotifyCollectionChangedEventArgs(
			NotifyCollectionChangedAction action,
			object                        changedItem,
			int                           index)
			: this(action, changedItem == null? null: new[]{ changedItem }, index)
		{
		}
开发者ID:MajidSafari,项目名称:bltoolkit,代码行数:13,代码来源:Compatibility3.cs


示例2: ControllerCollectionChangedEventArgs

 public ControllerCollectionChangedEventArgs(Entity entity, AudioEmitterSoundController controller, AudioEmitterComponent component, NotifyCollectionChangedAction action)
 {
     Entity = entity;
     Controller = controller;
     EmitterComponent = component;
     Action = action;
 }
开发者ID:Kryptos-FR,项目名称:xenko-reloaded,代码行数:7,代码来源:AudioEmitterComponent.cs


示例3: NotifyCollectionChangedEventArgs

        /// <summary>
        /// Construct a NotifyCollectionChangedEventArgs that describes a reset change. 
        /// </summary> 
        /// <param name="action">The action that caused the event (must be Reset).
        public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action)
        {
            if (action != NotifyCollectionChangedAction.Reset)
                throw new ArgumentException("WrongActionForCtor, NotifyCollectionChangedAction.Reset", "action");

            InitializeAdd(action, null, -1);
        }
开发者ID:jbruening,项目名称:ugui-mvvm,代码行数:11,代码来源:INotifyCollectionChanged.cs


示例4: NotifyCollectionChangedEventArgs

        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------
        /// <summary>
        /// Construct a NotifyCollectionChangedEventArgs that describes a reset change.
        /// </summary>
        /// <param name="action">The action that caused the event (must be Reset).</param>
        public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action)
        {
            if (action != NotifyCollectionChangedAction.Reset)
                throw new ArgumentException("This constructor can only be used with the Reset action.", "action");

            InitializeAdd(action, null, -1);
        }
开发者ID:venking,项目名称:UnityMVVM,代码行数:16,代码来源:NotifyCollectionChangedEventArgs.cs


示例5: NotifyCollectionChangedEventArgs

 public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, IList changedItems, int index, int oldIndex) 
 {
     this.Action = action;
     this.NewItems = changedItems;
     this.NewStartingIndex = index;
     this.OldStartingIndex = oldIndex;
 }
开发者ID:tu226,项目名称:Eagle,代码行数:7,代码来源:NotifyCollectionChangedEventArgs.cs


示例6: NotifyCollectionChangedEventArgs

 public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, IList changedItems)
 {
   this._newStartingIndex = -1;
   this._oldStartingIndex = -1;
   if (((action != NotifyCollectionChangedAction.Add) && (action != NotifyCollectionChangedAction.Remove)) && (action != NotifyCollectionChangedAction.Reset))
   {
     throw new ArgumentException("Must Be Reset Add Or Remove Action For Ctor", "action");
   }
   if (action == NotifyCollectionChangedAction.Reset)
   {
     if (changedItems != null)
     {
       throw new ArgumentException("Reset Action Requires Null Item", "action");
     }
     this.InitializeAdd(action, null, -1);
   }
   else
   {
     if (changedItems == null)
     {
       throw new ArgumentNullException("changed Items");
     }
     this.InitializeAddOrRemove(action, changedItems, -1);
   }
 }
开发者ID:nschonni,项目名称:csla-svn,代码行数:25,代码来源:NotifyCollectionChangedEventArgs.cs


示例7: CollectionChangedActionItem

 public CollectionChangedActionItem(IList list, NotifyCollectionChangedAction actionToUndo, IReadOnlyCollection<object> items, int index)
     : this(list, actionToUndo)
 {
     if (items == null) throw new ArgumentNullException("items");
     this.items = items;
     this.index = index;
 }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:7,代码来源:CollectionChangedActionItem.cs


示例8: NotifyCollectionChangedEventArgs

		public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, IList changedItems, int startingIndex)
		{
			this.action = action;

			if (action == NotifyCollectionChangedAction.Add || action == NotifyCollectionChangedAction.Remove) {
				if (changedItems == null)
					throw new ArgumentNullException ("changedItems");

				if (startingIndex < -1)
					throw new ArgumentException ("The value of startingIndex must be -1 or greater.", "startingIndex");

				if (action == NotifyCollectionChangedAction.Add)
					InitializeAdd (changedItems, startingIndex);
				else
					InitializeRemove (changedItems, startingIndex);
			} else if (action == NotifyCollectionChangedAction.Reset) {
				if (changedItems != null)
					throw new ArgumentException ("This constructor can only be used with the Reset action if changedItems is null", "changedItems");

				if (startingIndex != -1)
					throw new ArgumentException ("This constructor can only be used with the Reset action if startingIndex is -1", "startingIndex");
			} else {
				throw new ArgumentException ("This constructor can only be used with the Reset, Add, or Remove actions.", "action");
			}
		}
开发者ID:nlhepler,项目名称:mono,代码行数:25,代码来源:NotifyCollectionChangedEventArgs.cs


示例9: ItemsChangedEventArgs

 internal ItemsChangedEventArgs(NotifyCollectionChangedAction action,
                                 GeneratorPosition position,
                                 int itemCount,
                                 int itemUICount) : this(action, position, new GeneratorPosition(-1, 0), itemCount, itemUICount)
          
 {
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:7,代码来源:ItemsChangedEventArgs.cs


示例10: NotifyCollectionChangedEventArgs

 public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, object changedItem, int index)
 {
     IList changedItems = new[] { changedItem };
     _action = action;
     if (action == NotifyCollectionChangedAction.Add)
     {
         InitializeAdd(changedItems, index);
     }
     else if (action == NotifyCollectionChangedAction.Remove)
     {
         InitializeRemove(changedItems, index);
     }
     else if (action == NotifyCollectionChangedAction.Reset)
     {
         if (changedItem != null)
         {
             throw new ArgumentException("This constructor can only be used with the Reset action if changedItem is null", "changedItem");
         }
         if (index != -1)
         {
             throw new ArgumentException("This constructor can only be used with the Reset action if index is -1", "index");
         }
     }
     else
     {
         throw new ArgumentException("This constructor can only be used with the Reset, Add, or Remove actions.", "action");
     }
 }
开发者ID:mesheets,项目名称:Theraot-CF,代码行数:28,代码来源:NotifyCollectionChangedEventArgs.net30.cs


示例11: CollectionChangeOperation

 public CollectionChangeOperation(IList list, NotifyCollectionChangedAction actionToUndo, IReadOnlyCollection<object> items, int index, IEnumerable<IDirtiable> dirtiables)
     : this(list, actionToUndo, dirtiables)
 {
     if (items == null) throw new ArgumentNullException(nameof(items));
     this.items = items;
     this.index = index;
 }
开发者ID:Kryptos-FR,项目名称:xenko-reloaded,代码行数:7,代码来源:CollectionChangeOperation.cs


示例12: DictionaryChangedEventArgs

 internal DictionaryChangedEventArgs(NotifyCollectionChangedAction action, string key, object oldValue, object newValue)
 {
     this.Action = action;
     this.Key = key;
     this.OldValue = oldValue;
     this.NewValue = newValue;
 }
开发者ID:SuperMap,项目名称:iClient-for-Silverlight,代码行数:7,代码来源:DictionaryChangedEventArgs.cs


示例13: NotifyCollectionChangedEventArgs

        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        /// <summary>
        /// Construct a NotifyCollectionChangedEventArgs that describes a reset change.
        /// </summary>
        /// <param name="action">The action that caused the event (must be Reset).</param>
        public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action)
        {
            if (action != NotifyCollectionChangedAction.Reset)
                throw new ArgumentException(SR.Format(SR.WrongActionForCtor, NotifyCollectionChangedAction.Reset), nameof(action));

            InitializeAdd(action, null, -1);
        }
开发者ID:Corillian,项目名称:corefx,代码行数:17,代码来源:NotifyCollectionChangedEventArgs.cs


示例14: NotifyCollectionChangedEventArgs

 private NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, IEnumerable<object> oldItems, int oldStartingIndex, IEnumerable<object> newItems, int newStartingIndex)
 {
     this.Action = action;
     this.OldItems = oldItems;
     this.OldStartingIndex = oldStartingIndex;
     this.NewItems = newItems;
     this.NewStartingIndex = newStartingIndex;
 }
开发者ID:highzion,项目名称:Granular,代码行数:8,代码来源:NotifyCollectionChanged.cs


示例15: NotifyCollectionChangedEventArgs

 public NotifyCollectionChangedEventArgs (NotifyCollectionChangedAction action, int newStartingIndex, int oldStartingIndex, IList newItems, IList oldItems)
 {
   Action = action;
   NewStartingIndex = newStartingIndex;
   OldStartingIndex = oldStartingIndex;
   NewItems = newItems;
   OldItems = oldItems;
 }
开发者ID:natemcmaster,项目名称:Relinq,代码行数:8,代码来源:NotifyCollectionChangedEventArgs.cs


示例16: AttributeEventArgs

 public AttributeEventArgs(Attribute _attribute, AttributeValue _newValue, AttributeValue _oldValue, NotifyCollectionChangedAction _action)
     : base()
 {
     this.attribute = _attribute;
     this.newValue = _newValue;
     this.oldValue = _oldValue;
     this.action = _action;
 }
开发者ID:senfo,项目名称:snaglV2,代码行数:8,代码来源:AttributeEventArgs.cs


示例17: MappingsEventArgs

 public MappingsEventArgs(NotifyCollectionChangedAction action,
    List<IMappingsConfiguration> added,
    List<IMappingsConfiguration> removed)
 {
     this.Action = action;
     this.AddedItems = added;
     this.RemovedItems = removed;
 }
开发者ID:GAMP,项目名称:DataInterfaces,代码行数:8,代码来源:EventArgs.cs


示例18: ItemsChangedEventArgs

		internal ItemsChangedEventArgs (NotifyCollectionChangedAction action, int itemCount, int itemUICount, GeneratorPosition oldPosition, GeneratorPosition position)
		{
			this.action = action;
			item_count = itemCount;
			item_ui_count = itemUICount;
			old_position = oldPosition;
			this.position = position;
		}
开发者ID:JianwenSun,项目名称:mono-soc-2007,代码行数:8,代码来源:ItemsChangedEventArgs.cs


示例19: TrackingCollectionChangedEventArgs

 public TrackingCollectionChangedEventArgs(NotifyCollectionChangedAction action, object item, object oldItem, int index = -1, bool collectionChanged = false)
 {
     Action = action;
     Item = item;
     OldItem = oldItem;
     Index = index;
     CollectionChanged = collectionChanged;
 }
开发者ID:h78hy78yhoi8j,项目名称:xenko,代码行数:8,代码来源:TrackingCollectionChangedEventArgs.cs


示例20: NotifyCollectionChangedEventArgs

 public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, object item, int index, int oldIndex) 
 {
     Action = action;
     Item = item;
     Index = index;
     Length = 1;
     OldIndex = oldIndex;
 }
开发者ID:lishxi,项目名称:_SharpMap,代码行数:8,代码来源:NotifyCollectionChangedEventArgs.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NotifyCollectionChangedEventHandler类代码示例发布时间:2022-05-24
下一篇:
C# NotificationType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap