public override ProvisioningHierarchy GetHierarchy(string uri)
        {
            if (uri == null)
            {
                throw new ArgumentNullException(nameof(uri));
            }

            ProvisioningHierarchy result = null;

            var stream = this.Connector.GetFileStream(uri);

            if (stream != null)
            {
                var formatter = new XMLPnPSchemaFormatter();

                ITemplateFormatter specificFormatter = formatter.GetSpecificFormatterInternal(ref stream);
                specificFormatter.Initialize(this);
                result = ((IProvisioningHierarchyFormatter)specificFormatter).ToProvisioningHierarchy(stream);
            }

            return(result);
        }
        public ProvisioningHierarchy GetHierarchy()
        {
            ProvisioningHierarchy result = null;

            var openXmlConnection = this.Connector as OpenXMLConnector;
            var fileName          = openXmlConnection.Info.Properties.TemplateFileName;

            if (!String.IsNullOrEmpty(fileName))
            {
                var stream = this.Connector.GetFileStream(fileName);

                if (stream != null)
                {
                    var formatter = new XMLPnPSchemaFormatter();

                    ITemplateFormatter specificFormatter = formatter.GetSpecificFormatterInternal(ref stream);
                    specificFormatter.Initialize(this);
                    result = ((IProvisioningHierarchyFormatter)specificFormatter).ToProvisioningHierarchy(stream);
                }
            }
            return(result);
        }