Ejemplo n.º 1
0
        protected override ExtendedRichDescription GetDescription(IOperationConfiguration config)
        {
            var hive = (string)config[nameof(RegistryConfiguration.Hive)];

            if (Enum.TryParse <RegistryHive>(hive, true, out var h))
            {
                hive = h.GetAbbreviation();
            }

            return(new ExtendedRichDescription(
                       new RichDescription(
                           "Ensure Registry Key ",
                           new Hilite(h + "\\" + RegistryConfiguration.GetCanonicalKey(config[nameof(RegistryConfiguration.Key)]))
                           ),
                       new RichDescription(
                           string.Equals(config[nameof(RegistryConfiguration.Exists)], "false", StringComparison.OrdinalIgnoreCase) ? "does not exist" : "exists"
                           )
                       ));
        }
Ejemplo n.º 2
0
        protected override ExtendedRichDescription GetDescription(IOperationConfiguration config)
        {
            var hive = (string)config[nameof(Hive)];

            if (Enum.TryParse <RegistryHive>(hive, true, out var h))
            {
                hive = h.GetAbbreviation();
            }

            return(new ExtendedRichDescription(
                       new RichDescription(
                           "Store Registry Value ",
                           new Hilite(config[nameof(ValueName)]),
                           " to ",
                           new Hilite(config[nameof(Value)])
                           ),
                       new RichDescription(
                           "from key ",
                           new Hilite(h + "\\" + RegistryConfiguration.GetCanonicalKey(config[nameof(Key)]))
                           )
                       ));
        }