# Sunday, August 13, 2006

Microsoft introduces with Vista/IE7/Office2007 the Microsoft RSS Platform -

For some reasons my IE is not able to export the feeds that I read in IE7 and Outlook 2007 to OPML.

I had a look at the API and wrote this small console applictaion to export my feed list to the OPML format.

using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Xml;
 
using Microsoft.Feeds.Interop;
using System.Collections.Generic;
 
namespace RssWindowsPlatformOpmlExporter
{
    class Program
    {
        static void Main(string[] args)
        {
            string pathToExport = "D:\\temp\\feeds.opml";
            if (args.Length > 0)
            {
                pathToExport = args[0];
            }
 
            FeedsManager mgr = new FeedsManager();
            Queue<IFeedFolder> queue = new Queue<IFeedFolder>();
            queue.Enqueue(mgr.RootFolder as IFeedFolder);
 
            while (queue.Count > 0)
            {
                IFeedFolder currentFolder = queue.Dequeue();
                IFeedsEnum subFolders = (IFeedsEnum)currentFolder.Subfolders;
 
                for (int i = 0; i < subFolders.Count; i++)
                {
                    queue.Enqueue((IFeedFolder)subFolders.Item(i));
                }
 
                using (XmlWriter opml = XmlWriter.Create(pathToExport))
                {
                    opml.WriteStartDocument();
                    opml.WriteStartElement("opml");
                    opml.WriteAttributeString("version", "1.0");
 
                    IFeedsEnum feeds = (IFeedsEnum)currentFolder.Feeds;
                    for (int i = 0; i < feeds.Count; i++)
                    {
                        IFeed feed = (IFeed)feeds.Item(i);
 
                        try
                        {
                            if (!string.IsNullOrEmpty(feed.Title) 
                                && !string.IsNullOrEmpty(feed.DownloadUrl))
                            {
                                opml.WriteStartElement("outline");
                                opml.WriteAttributeString("title", feed.Title);
                                opml.WriteAttributeString("xmlUrl", feed.url);
                                opml.WriteEndElement();
                            }
                        }
                        catch (COMException e)
                        {
                            Console.WriteLine(
                                "Error getting feed: {0}", 
                                e.Message);
                        }
                    }
 
                    opml.WriteEndElement();
                    opml.WriteEndDocument();
                }
            }
        }
    }
}
C# | Misc
Sunday, August 13, 2006 2:42:42 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, August 09, 2006

I'm currently helping a customer to migrate a *really large* web application from ASP.NET 1.1 to 2.0 (round about 130 projects in the master solution...).

I always liked FxCop but enabling "Code Analysis" manually is way to complicated (or not geekish enough?!?). So I wrote this small macro this morning.

Imports System

Imports System.Diagnostics

Imports System.Text

Imports System.Windows.Forms

 

Imports EnvDTE

Imports EnvDTE80

 

Public Module CodeAnalysis

 

    Public Sub EnableFxCop()

        Dim objProj As Object()

        Dim proj As Project

 

        For i As Integer = 1 To DTE.Solution.Projects.Count

            proj = DTE.Solution.Projects.Item(i)

            EnableFxCop(proj)

        Next

    End Sub

 

    Private Sub EnableFxCop(ByVal project As Project)

 

        If project.Kind = "{66A26720-8FB5-11D2-AA7E-00C04F688DDE}" Then

            'Filter Project Folders

            For Each subProject As ProjectItem In project.ProjectItems

                EnableFxCop(subProject.SubProject)

            Next

        Else

            project.ConfigurationManager.ActiveConfiguration.Properties.Item( _

                "RunCodeAnalysis").Value = "True"

 

            project.ConfigurationManager.ActiveConfiguration.Properties.Item( _

                "CodeAnalysisRules").Value = String.Concat( _

                    "-Microsoft.Design#CA2210;", _

                    "-Microsoft.Design#CA1020;", _

                    "-Microsoft.Naming#CA1705;", _

                    "-Microsoft.Naming#CA1709")

            project.Save()

        End If

    End Sub

End Module

Wednesday, August 09, 2006 1:50:21 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 
# Monday, July 17, 2006

thinktecture and newtelligence AG present a week of Windows Communication Foundation (WCF), Windows Presentation Foundation (WPF) and Windows Workflow Foundation (WWF): TornadoCamp WinFX.

Christian, Ingo, Michael and me will present from the 16th - 20th of october in Bad Ems in GERMAN!

C# | Event | Indigo | WCF
Monday, July 17, 2006 12:57:23 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 

I posted some Bits Michael and I wrote recently in a WCF Project:

The Constraints-Extensions let you easily define attribute based limitations for input, output and return parameters. Limitations can be set to service contracts operations as well as to data contract data member implementations. The constraints validation gets called at runtime by the WCF infrastructure and the behavior will throw a ConstraintViolationException with descriptive messages in case of a constraint gets violated/the validation fails.

The following constraint attributes have been implemented:

  • Between
  • BetweenExclusive
  • CompareAgainst
  • EarlierThanNow
  • EarlierThanToday
  • EqualTo
  • GreaterEqualTo
  • GreaterThan
  • LaterThanNow
  • LaterThanToday
  • LessEqualTo
  • LessThan
  • Match
  • MaxElements
  • MaxLength
  • MinElements
  • MinLength
  • NotBetween
  • NotEmpty
  • NotEqualTo
  • NotNull
  • Nullable
  • OneOff·    

Data Contract Sample:

[DataContract]
class
TestClass
{
    [DataMember]
    [LessEqualTo(CompareAgainst.FieldOrProperty,"EndDate")]
    public DateTime StartDate;

    [DataMember]
    [GreaterEqualTo(CompareAgainst.FieldOrProperty, "StartDate")]
    public DateTime EndDate;

    public TestClass(DateTime startDate, DateTime endDate)
    {
        StartDate = startDate;
        EndDate = endDate;
    }
}

 

Service Contract Sample:

[ServiceContract, ConstraintsValidatorBehavior]
interface
ITestConstraints
{

    [OperationContract]
    [return:GreaterEqualTo(0)]
    int MethodA(
        [Between(0,100)]
        int a,
        [LessEqualTo(20)]
        double b,
        [NotEmpty]
        string c); 

    [OperationContract]
    int MethodB(
        [Between(0, 100)]
        int a,
        [LessEqualTo(20)]
        ref double b,
        [NotEmpty]
        out string c);

    [OperationContract]
    [return:LaterThanNow]
    DateTime MethodC(
        [GreaterThan(0)]
        int a);

 

    [OperationContract]
    void MethodD(
        [VerifyObject]
        TestClass a);
}


Download at wcf.netfx3.com

C# | Indigo | Projects | WebServices | WCF
Monday, July 17, 2006 12:43:28 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Tuesday, June 06, 2006

Developer day[1] (DDD) in Reading (U.K.) was again really a great experience. My talk together with Michael[2] went fine and we really enjoyed the great audience. And the weather was sooooo sunny - unbelievable.

It was nice to meet Melita Walton, Craig Murphy[3], Benjamin Mitchel[4], Ian Cooper, Phil Winstanley (Plip)[5], Dave Sussman[6], Guy Smith-Ferrier[7] and so on.

Take a look at the pics Plip posted http://www.flickr.com/photos/plip/sets/72157594154434387/

[1] http://www.developerday.co.uk/ddd/
[2] http://staff.newtelligence.net/michaelw/
[3] http://www.craigmurphy.com/
[4] http://benjaminm.net/
[5] http://weblogs.asp.net/plip/
[6] http://aspadvice.com/blogs/dsussman/
[7] http://www.guysmithferrier.com/

Tuesday, June 06, 2006 8:50:38 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, May 16, 2006

Two tools really useful if you work with AJAX

ASP.NET | C#
Tuesday, May 16, 2006 1:04:19 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, May 12, 2006

Sergey has posted a Control he wrote and has some interesting thoughts on ViewState and ControlState.

I agree to 100% - I think a lot of Dev's out there don't know of their addiction. :-)

Friday, May 12, 2006 10:54:17 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [1]  | 
# Wednesday, May 10, 2006

There we go. Doors are open for NRW06!

20 Speakers, max. 250 attendees a lot of community and networking.

Signup

After you did you can put this onto your blog or website ;-)

Wednesday, May 10, 2006 12:02:12 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [9]  | 

A while ago I posted that I and my company were searching for ASP.NET guys...


Sergey Shishkin
joined newtelligence in March this year and started to blog yesterday.

He will do a presentation about a project related to Office Open XML and WinFx he is doing on out next user group meeting (18th May) in Düsseldorf, Germany

Wednesday, May 10, 2006 11:54:29 AM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, April 12, 2006
I can only agree on what Scott Watermasysk says about his job (beside the facts that I live in Germany and it is newtelligence for me ... :-P)

[modified]Not only do I work for the best company (newtelligence) in Germany, according to CNNMoney, I also have the best job based on pay, growth, stress, flexibility, creativity, and ease of entry.[...]
Why it's great Software engineers are needed in virtually every part of the economy, making this one of the fastest-growing job titles in the U.S. Even so, it's not for everybody.

Designing, developing and testing computer programs requires some pretty advanced math skills and creative problem-solving ability. If you've got them, though, you can work and live where you want: Telecommuting is quickly becoming widespread.

The profession skews young -- the up-all-night-coding thing gets tired -- but consulting and management positions aren't hard to come by once you're experienced.

What's cool Cutting-edge projects, like designing a new video game or tweaking that military laser. Extra cash from freelance gigs. Plus, nothing says cool like great prospects.

What's not Jobs at the biggest companies tend to be less creative (think Neo, pre-Matrix). Outsourcing is a worry. Eyestrain and back, hand and wrist problems are common.
Wednesday, April 12, 2006 8:16:20 PM (W. Europe Standard Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |