Tuesday, October 7, 2014

Windows Management Framework 5.0 Preview September 2014 is now available

Advertise
Paul D. Murphy

I know there is a post a few months back about authoring dsc resources in c# but with the advent of this drop it seems like that is going to change. So armed with nothing more than a huunch I tried this...

using System;

using System.Diagnostics;

using System.Management.Automation;

namespace SpotLabs.Genesis.PowerShell.Dsc.Azure

{

   [DscResource]

   public class Subscription

   {

       [DscResourceKey]

       public String SubscriptionName { get; set; }

       [DscResourceMandatory]

       public String PublishSettingsFile { get; set; }

       public String StorageAccountName { get; set; }

       public Boolean IsCurrent { get; set; }

       public Boolean IsDefault { get; set; }

       public Subscription Get()

       {

           return default(Subscription);

       }

       public Boolean Test()

       {

           return false;

       }

       public void Set()

       {

       }

   }

}

just to see what might happen. it's close. what am i doing wrong?


No comments: