[Mono-dev] r63894 System.Web.UI.WebControls.Style.cs

Igor Zalmanovich igorz at mainsoft.com
Sun Aug 20 06:08:45 EDT 2006


Hi, Gonzalo!

 

Modification r63894 for 1.x is refactoring only, that's why I did not
include a relevant test:

 

Old code:

 

                                    if ((styles & Styles.CssClass) != 0)


                                    {

                                                string s =
(string)viewstate["CssClass"];

                                                if (s != string.Empty)

 
writer.AddAttribute (HtmlTextWriterAttribute.Class, s);

                                    }

 

                                    WriteStyleAttributes (writer);

 

My Code:

 

                                                if (CssClass.Length > 0)

 
writer.AddAttribute (HtmlTextWriterAttribute.Class, CssClass);

                                                WriteStyleAttributes
(writer);

 

CssClass property in get accessor has flow:

 

                                    get 

                                    {

                                                if ((styles &
Styles.CssClass) == 0) 

                                                {

                                                            return
string.Empty;

                                                }

 

                                                return
(string)viewstate["CssClass"];

                                    }

 

 

Please approve commit.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060820/7e274c5a/attachment.html 


More information about the Mono-devel-list mailing list