[Mono-dev] [PATCH] Implementations of several properties in ASP.NET 2.0 Control class
Raja R Harinath
rharinath at novell.com
Mon Nov 20 06:55:25 EST 2006
Hi,
Marek Habersack <grendel at caudium.net> writes:
> Attached is a small diff which implements the ClientIDSeparator,
> IdSeparator and LoadViewStateByID properties. Please review,
>
> best regards,
>
> marek
>
> Index: Control.cs
> ===================================================================
> --- Control.cs (revision 68155)
> +++ Control.cs (working copy)
> @@ -192,8 +192,12 @@
> string client = UniqueID;
>
> if (client != null)
> - client = client.Replace (':', '_');
> -
> + client = client.Replace (':',
> +#if NET_2_0
> + ClientIDSeparator
> +#else
> + '_');
> +#endif
> return client;
> }
Yow, that's ugly :-) I'd prefer that you use ClientIDSeparator
unconditionally, and ...
}
> @@ -202,7 +206,7 @@
> protected char ClientIDSeparator
> {
> get {
> - throw new NotImplementedException ();
> + return '_';
> }
> }
> #endif
Pull this outside the NET_2_0 ifdef, and make it 'private' (or at worst,
'protected internal') #if !NET_2_0 instead.
- Hari
More information about the Mono-devel-list
mailing list