コード例 #1
0
        // Token: 0x060020E7 RID: 8423 RVA: 0x00096F74 File Offset: 0x00095174
        public void WriteStartElement(string assemblyName, string typeFullName, bool isInjected, bool useTypeConverter)
        {
            this.VerifyWriteState();
            this._dpProperty = null;
            this._parserContext.PushScope();
            this.ProcessMarkupExtensionNodes();
            Type type = this.GetType(assemblyName, typeFullName);
            Type xamlSerializerForType = this._xamlTypeMapper.GetXamlSerializerForType(type);

            this.Push(BamlRecordType.ElementStart, type);
            int lineNumber   = 0;
            int linePosition = 0;
            int depth        = this._depth;

            this._depth = depth + 1;
            XamlElementStartNode xamlElementStartNode = new XamlElementStartNode(lineNumber, linePosition, depth, assemblyName, typeFullName, type, xamlSerializerForType);

            xamlElementStartNode.IsInjected = isInjected;
            xamlElementStartNode.CreateUsingTypeConverter = useTypeConverter;
            this._bamlRecordWriter.WriteElementStart(xamlElementStartNode);
        }
コード例 #2
0
        /// <summary>
        /// Write the start of element record.
        /// </summary>
        /// <remarks>
        /// An element start marks the beginning of an object that exists
        /// in a tree structure.  This may the contents of a complex property,
        /// or an element in the logical tree.
        /// </remarks>
        public void WriteStartElement(
            string assemblyName,
            string typeFullName,
            bool isInjected,
            bool useTypeConverter)
        {
            VerifyWriteState();
            _dpProperty = null;
            _parserContext.PushScope();
            ProcessMarkupExtensionNodes();

            Type elementType = GetType(assemblyName, typeFullName);
            Type serializerType = _xamlTypeMapper.GetXamlSerializerForType(elementType);
            Push(BamlRecordType.ElementStart, elementType);
            XamlElementStartNode node = new XamlElementStartNode(
                                               0,
                                               0,
                                               _depth++,
                                               assemblyName,
                                               typeFullName,
                                               elementType,
                                               serializerType);  
            node.IsInjected = isInjected;
            node.CreateUsingTypeConverter = useTypeConverter;
            
            _bamlRecordWriter.WriteElementStart(node);
        }