source: 2014/24/EemeliK/Zombieland/Jypeli/Physics2DDotNet/DataTypes/CollectionEventArgs.cs @ 5974

Revision 5974, 2.0 KB checked in by empaheik, 4 years ago (diff)
Line 
1#region MIT License
2/*
3 * Copyright (c) 2005-2008 Jonathan Mark Porter. http://physics2d.googlepages.com/
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights to
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 * the Software, and to permit persons to whom the Software is furnished to do so,
10 * subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
17 * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22#endregion
23
24
25
26
27#if UseDouble
28using Scalar = System.Double;
29#else
30using Scalar = System.Single;
31#endif
32using System;
33using System.Collections.ObjectModel;
34
35namespace Physics2DDotNet
36{
37    /// <summary>
38    /// a generic EventArgs for read only collections.
39    /// </summary>
40    /// <typeparam name="T">The type of the items on the collection. </typeparam>
41#if !(WINDOWS_PHONE || XBOX)
42    [Serializable]
43#endif
44    public class CollectionEventArgs<T> : EventArgs
45    {
46        ReadOnlyCollection<T> collection;
47        public CollectionEventArgs(ReadOnlyCollection<T> collection)
48        {
49            this.collection = collection;
50        }
51        /// <summary>
52        /// The readonly collection of items.
53        /// </summary>
54        public ReadOnlyCollection<T> Collection
55        {
56            get { return collection; }
57        }
58    }
59}
Note: See TracBrowser for help on using the repository browser.