Update of /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv13657/Util
Modified Files:
UniqueKey.cs
Log Message:
reactivated warning 1591 "missing XML doc comment"
excluded unused Spring.Core/Spring.Expressions.Parser/ExpressionParserTokenTypes..cs from builds
Index: UniqueKey.cs
===================================================================
RCS file: /cvsroot/springnet/Spring.Net/src/Spring/Spring.Core/Util/UniqueKey.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** UniqueKey.cs 22 Aug 2007 20:16:20 -0000 1.1
--- UniqueKey.cs 27 Aug 2007 09:38:12 -0000 1.2
***************
*** 22,25 ****
--- 22,26 ----
using System;
+ using System.Collections;
using System.ComponentModel;
using System.Text;
***************
*** 30,33 ****
--- 31,51 ----
namespace Spring.Util
{
+ /// <summary>
+ /// UniqueKey allows for generating keys unique to a type or particular instance and a partial name,
+ /// that can e.g. be used as keys in <see cref="Hashtable"/>.
+ /// </summary>
+ /// <example>
+ /// // shows usage type-scoped keys
+ /// UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey");
+ /// UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey");
+ ///
+ /// HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'");
+ /// object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ];
+ /// Assert.AreEqual( "some value unique for class A having key 'myKey'", value);
+ ///
+ /// HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'");
+ /// object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ];
+ /// Assert.AreEqual( "some value unique for class B having key 'myKey'", value);
+ /// </example>
[Serializable]
[TypeConverter(typeof(UniqueKeyConverter))]
|