// Token: 0x06000693 RID: 1683 RVA: 0x00014CD4 File Offset: 0x00012ED4
        internal FrameworkObject InstantiateUnoptimizedTree()
        {
            if (!this._sealed)
            {
                throw new InvalidOperationException(SR.Get("FrameworkElementFactoryMustBeSealed"));
            }
            FrameworkObject result = new FrameworkObject(this.CreateDependencyObject());

            result.BeginInit();
            ProvideValueServiceProvider provideValueServiceProvider = null;

            FrameworkTemplate.SetTemplateParentValues(this.Name, result.DO, this._frameworkTemplate, ref provideValueServiceProvider);
            FrameworkElementFactory frameworkElementFactory = this._firstChild;
            IAddChild addChild = null;

            if (frameworkElementFactory != null)
            {
                addChild = (result.DO as IAddChild);
                if (addChild == null)
                {
                    throw new InvalidOperationException(SR.Get("TypeMustImplementIAddChild", new object[]
                    {
                        result.DO.GetType().Name
                    }));
                }
            }
            while (frameworkElementFactory != null)
            {
                if (frameworkElementFactory._text != null)
                {
                    addChild.AddText(frameworkElementFactory._text);
                }
                else
                {
                    FrameworkObject childFrameworkObject = frameworkElementFactory.InstantiateUnoptimizedTree();
                    this.AddNodeToParent(result.DO, childFrameworkObject);
                }
                frameworkElementFactory = frameworkElementFactory._nextSibling;
            }
            result.EndInit();
            return(result);
        }