public StartPageCommandDescriptor([NotNull] IStartPageCommand command, [NotNull] StartPageCommandAttribute attribute) { Assert.ArgumentNotNull(command, nameof(command)); Assert.ArgumentNotNull(attribute, nameof(attribute)); Command = command; Attribute = attribute; }
private static void ParseCommand([NotNull] XElement element, [NotNull] string parentName) { Debug.ArgumentNotNull(element, nameof(element)); Debug.ArgumentNotNull(parentName, nameof(parentName)); var text = element.Value; if (string.IsNullOrEmpty(text)) { return; } var priority = element.GetAttributeDouble("priority", 1000); var attribute = new StartPageCommandAttribute(text, parentName, priority); var command = new ExternaStartPagelCommand(element.GetAttributeValue("href")); var descriptor = new StartPageCommandDescriptor(command, attribute); commands.Add(descriptor); }