Represents an extended task in the application manifest.
Inheritance: ApplicationManifestTaskNodeBase
Ejemplo n.º 1
0
        internal static ApplicationManifestTaskNodeBase ParseXml(XmlReader reader)
        {
            switch (reader.Name)
            {
            case "DefaultTask":
                var node = new ApplicationManifestDefaultTaskNode()
                {
                    Name           = reader.GetAttribute("Name"),
                    NavigationPage = reader.GetAttribute("NavigationPage")
                };

                reader.Skip();

                return(node);

            case "ExtendedTask":
                var node2 = new ApplicationManifestExtendedTaskNode
                {
                    Name = reader.GetAttribute("Name"),
                    BackgroundServiceAgents = reader.ReadElementContentAsArray(ApplicationManifestBackgroundServiceAgentNode.ParseXml)
                };

                return(node2);

            default:
                reader.Skip();

                return(null);
            }
        }
        internal static ApplicationManifestTaskNodeBase ParseXml(XmlReader reader)
        {
            switch (reader.Name)
            {
                case "DefaultTask":
                    var node = new ApplicationManifestDefaultTaskNode()
                    {
                        Name = reader.GetAttribute("Name"),
                        NavigationPage = reader.GetAttribute("NavigationPage")
                    };

                    reader.Skip();

                    return node;

                case "ExtendedTask":
                    var node2 = new ApplicationManifestExtendedTaskNode
                    {
                        Name = reader.GetAttribute("Name"),
                        BackgroundServiceAgents = reader.ReadElementContentAsArray(ApplicationManifestBackgroundServiceAgentNode.ParseXml)
                    };

                    return node2;

                default:
                    reader.Skip();

                    return null;
            }
        }