Пример #1
0
        /// <summary>
        /// Initializes a new instance of the CodeUnit class.
        /// </summary>
        /// <param name="codeUnitType">
        /// The type of the code unit.
        /// </param>
        /// <param name="tokens">
        /// The list of tokens that form the code unit.
        /// </param>
        internal CodeUnit(CodePartType codeUnitType, CsTokenList tokens)
            : this(codeUnitType)
        {
            Param.Ignore(codeUnitType);
            Param.AssertNotNull(tokens, "tokens");

            this.tokens = tokens;
            this.tokens.Trim();

            Debug.Assert(this.tokens.First != null, "The tokens should not be empty");
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the CodeUnit class.
        /// </summary>
        /// <param name="codeUnitType">
        /// The type of the code unit.
        /// </param>
        /// <param name="tokens">
        /// The list of tokens that form the code unit.
        /// </param>
        internal CodeUnit(CodePartType codeUnitType, CsTokenList tokens)
            : this(codeUnitType)
        {
            Param.Ignore(codeUnitType);
            Param.AssertNotNull(tokens, "tokens");

            this.tokens = tokens;
            this.tokens.Trim();

            Debug.Assert(this.tokens.First != null, "The tokens should not be empty");
        }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the CodeUnit class.
 /// </summary>
 /// <param name="codeUnitType">
 /// The type of the code unit.
 /// </param>
 internal CodeUnit(CodePartType codeUnitType)
 {
     Param.Ignore(codeUnitType);
     this.codeUnitType = codeUnitType;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the CodeUnit class.
 /// </summary>
 /// <param name="codeUnitType">
 /// The type of the code unit.
 /// </param>
 internal CodeUnit(CodePartType codeUnitType)
 {
     Param.Ignore(codeUnitType);
     this.codeUnitType = codeUnitType;
 }