using System;
using System.Collections.Generic;
using System.Text;
using smo = Microsoft.SqlServer.Management.Smo;

namespace PropsNotLoaded
{
    class MissingProperties
    {
        String property;
        internal MissingProperties(String property)
        {
            this.property = property;
        }
        internal bool SkipMe(String property)
        {
            return this.property == property;
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            smo.Server local = new smo.Server();
            smo.Database db = local.Databases[0];
            db.Initialize(true);
            String[] skip = new string[] {
                "MirroringFailoverLogSequenceNumber", 
                "MirroringRole",    
                "MirroringRoleSequence", 
                "MirroringSafetySequence"};
            foreach (smo.Property p in db.Properties)
            {
                MissingProperties mp = new MissingProperties(p.Name);
                if (Array.Exists<String>(skip, mp.SkipMe)) continue;
                Console.WriteLine(">>Exp<<" + p.Expensive);
                Console.WriteLine(p.Name + "= {" + p.Value + "}");
                Console.WriteLine(p.Name + "= [" + db.Properties[p.Name].Value + "]");
            }
        }
    }
}
