} // end of function - Initialize /************************ Fields *****************************************/ /************************ Static *****************************************/ /*======================= PROTECTED =====================================*/ /************************ Events *****************************************/ /************************ Properties *************************************/ /************************ Construction ***********************************/ /************************ Methods ****************************************/ /*----------------------- Dispose ---------------------------------------*/ /// <summary> /// /// </summary> /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { State = null; CommentType = SupportedCommandTypeFlag.Unknown; CodeElement = null; return; } // end of function - Dispose
} // end of function - Initialize /*----------------------- Initialize ------------------------------------*/ /// <summary> /// Initializes the object based on the state object /// </summary> /// <param name="state"></param> public void Initialize(ICommentMyCodeState state, SupportedCommandTypeFlag commentType) { if (null == (State = state)) { throw new ArgumentNullException(nameof(state), "A valid state object must be provided"); } if ((CommentType = commentType) == SupportedCommandTypeFlag.Unknown) { // Parse the comment type from the document ParseCommentType(); } return; } // end of function - Initialize
/*----------------------- Initialize ------------------------------------*/ /// <summary> /// /// </summary> /// <param name="state"></param> public void Initialize(ICommentMyCodeState state) { Initialize(state, SupportedCommandTypeFlag.Unknown); } // end of function - Initialize
} // end of function - ItemContext /*----------------------- ItemContext -----------------------------------*/ /// <summary> /// /// </summary> /// <param name="state"></param> public ItemContext(ICommentMyCodeState state) { Initialize(state); } // end of function - ItemContext