예제 #1
0
        /// <summary>
        /// performs lazy initialization to ensure our current code model is up-to-date.
        ///
        /// If we haven't yet created our CodeDom backing we'll create it for the 1st time.  If we've
        /// created our backing, but some elements have been changed that we haven't yet reparsed
        /// then we'll reparse & merge any of the appropriate changes.
        /// </summary>
        public void Initialize(Chunk chunkNode)
        {
            chunk = chunkNode;
            var translator = new ASTTranslator(DTE, this);

            RootElement      = translator.Translate(chunkNode);
            modelInitialized = true;
        }
예제 #2
0
 /// <summary>
 /// performs lazy initialization to ensure our current code model is up-to-date.
 /// 
 /// If we haven't yet created our CodeDom backing we'll create it for the 1st time.  If we've
 /// created our backing, but some elements have been changed that we haven't yet reparsed
 /// then we'll reparse & merge any of the appropriate changes.
 /// </summary>
 public void Initialize(Chunk chunkNode)
 {
     chunk = chunkNode;
     var translator = new ASTTranslator(DTE, this);
     RootElement = translator.Translate(chunkNode);
     modelInitialized = true;
 }