CASK - CaskDotNet library upgraded to .NET 3.5

Supplemental information available HERE 

This won't be a good thing for those still developing in .NET 2.0 but I reached a threshold where it is no longer cost-effective to not move forward; I'll have to work a lot harder and there is just so much that still needs to be done...

The following culprit is the reason for the upgrade:

        /// <summary>

        /// Use the URL as a key, e.g. "gv.Localhost" the first

        /// occurrence will be found, split and the value returned.

        /// In the example below "OI812NItWasGr8".  Note: CASK

        /// expects a "from/to" pair on separate lines so you'll

        /// need to add a dummy to: line.

        ///

        /// The Transformations content will be in the format:

        /// ---------------------------------------------------

        /// from: :)

        /// to: <img src="~/emoticons/smile.gif">

        /// from: <code><CONTENTS></code>

        /// to: <pre><CONTENTS></pre>

        /// from: <b><CONTENTS></b>

        /// to: <b><CONTENTS></b>

        /// from: gv.Localhost=OI812NItWasGr8          <=== ADDED

        /// to: --                                    <=== ADDED

        /// ---------------------------------------------------

        /// </summary>

        /// <param name="url"></param>

        /// <returns></returns>

        public string GetMetaDataFromTransformations(string url)

        {

            var query =

                from word in Transformations.Split('\n')

                where word.Contains(url)

                let MetaValue = word.Split('=')[1]

                select MetaValue;

 

            return query.FirstOrDefault();

        }

The above link query will find, and extract the "OI812NItWasGr8" text, from the "from: gv.Localhost=OI812NItWasGr8" line with just one line of code from the following text:

The following communityDefault.aspx update along with it's corresponding code-behind updates wraps up the process nicely:

 


Tags:
Categories:


Actions: E-mail | Permalink |  Grammar/Typo/Better way? Please let me know