From: <fab...@us...> - 2009-07-03 22:40:53
|
Revision: 4565 http://nhibernate.svn.sourceforge.net/nhibernate/?rev=4565&view=rev Author: fabiomaulo Date: 2009-07-03 22:40:53 +0000 (Fri, 03 Jul 2009) Log Message: ----------- Made serializable some classes may involved in configuration Modified Paths: -------------- branches/2.1.x/nhibernate/src/NHibernate/Util/CollectionHelper.cs Modified: branches/2.1.x/nhibernate/src/NHibernate/Util/CollectionHelper.cs =================================================================== --- branches/2.1.x/nhibernate/src/NHibernate/Util/CollectionHelper.cs 2009-07-02 21:59:53 UTC (rev 4564) +++ branches/2.1.x/nhibernate/src/NHibernate/Util/CollectionHelper.cs 2009-07-03 22:40:53 UTC (rev 4565) @@ -8,6 +8,7 @@ { public sealed class CollectionHelper { + [Serializable] private class EmptyEnumerator : IDictionaryEnumerator { public object Key @@ -51,9 +52,10 @@ /// <summary> /// A read-only dictionary that is always empty and permits lookup by <see langword="null" /> key. /// </summary> + [Serializable] private class EmptyMapClass : IDictionary { - private static readonly EmptyEnumerator EmptyEnumerator = new EmptyEnumerator(); + private static readonly EmptyEnumerator emptyEnumerator = new EmptyEnumerator(); public bool Contains(object key) { @@ -72,7 +74,7 @@ IDictionaryEnumerator IDictionary.GetEnumerator() { - return EmptyEnumerator; + return emptyEnumerator; } public void Remove(object key) @@ -127,10 +129,11 @@ public IEnumerator GetEnumerator() { - return EmptyEnumerator; + return emptyEnumerator; } } + [Serializable] private class EmptyListClass : IList { public int Add(object value) @@ -385,6 +388,7 @@ } // ~~~~~~~~~~~~~~~~~~~~~~ Generics ~~~~~~~~~~~~~~~~~~~~~~ + [Serializable] private class EmptyEnumerator<TKey, TValue> : IEnumerator<KeyValuePair<TKey, TValue>> { #region IEnumerator<KeyValuePair<TKey,TValue>> Members @@ -431,6 +435,7 @@ #endregion } + [Serializable] public class EmptyEnumerableClass<T> : IEnumerable<T> { #region IEnumerable<T> Members @@ -452,7 +457,8 @@ #endregion } - private class EmptyEnumerator<T>: IEnumerator<T> + [Serializable] + private class EmptyEnumerator<T> : IEnumerator<T> { #region IEnumerator<T> Members @@ -493,9 +499,10 @@ /// <summary> /// A read-only dictionary that is always empty and permits lookup by <see langword="null" /> key. /// </summary> + [Serializable] public class EmptyMapClass<TKey, TValue> : IDictionary<TKey, TValue> { - private static readonly EmptyEnumerator<TKey, TValue> EmptyEnumerator = new EmptyEnumerator<TKey, TValue>(); + private static readonly EmptyEnumerator<TKey, TValue> emptyEnumerator = new EmptyEnumerator<TKey, TValue>(); #region IDictionary<TKey,TValue> Members @@ -580,7 +587,7 @@ IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator() { - return EmptyEnumerator; + return emptyEnumerator; } #endregion This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |