Indents Fixed! #

Well a little tweaking of the code that does the generation of the formatted code, and it now produces what I want:

        Public Shared Function AddTOQueryString(ByVal URL As String, ByVal Key As String, ByVal Value As String) As String
Dim RegExp As New System.Text.RegularExpressions.Regex(Key & "=.*?(&|$)")
Dim Match As System.Text.RegularExpressions.Match = RegExp.Match(URL)
If Match.Success Then
Return RegExp.Replace(URL, Key & "=" & Value & Match.Groups(1).ToString)
ElseIf URL.IndexOf("?") > 0 Then
Return URL & "&" & Key & "=" & Value
Else
Return URL & "?" & Key & "=" & Value
End If
End Function
        /// <summary>Gets or sets the RSS version to write.</summary>
        /// <exception cref="InvalidOperationException">Can't change version number after data has been written.</exception>
        public RssVersion Version
        {
            get { return rssVersion; }
            set
            {
                if(wroteStartDocument)
                    throw new InvalidOperationException("Can't change version number after data has been written.");
                else
                    rssVersion = value;
            }
        }

I am not sure that I like what it does with literal strings.  I will probably want to change that.

I am also now convinced that it will not due for formatting Javascript.  J# just doesn't share enough similar attributes.  This tool also doesn't support XML (or HTML), which would be a nice thing too.

This converter looks pretty sweet.  You can include your regions and it will let you keep them collapsed and then expand via javascript, excellent.

I could also just wire up the implementation I already have to deal with HTML and Javascript.

We will see... for now this will do.

Categories:  | 
Saturday, April 08, 2006 11:51:00 PM (Central Standard Time, UTC-06:00) #    Comments [0]  | 

 

Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

All content © 2008, Christopher May, Inc
Open Job Positions
On this page
Google Ads
This site
Calendar
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Archives
Sitemap
Blogroll OPML
Disclaimer

Powered by: newtelligence dasBlog 1.9.6264.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts


Pick a theme: