FillBaseCall() private method

private FillBaseCall ( List currentBlock ) : void
currentBlock List
return void
Ejemplo n.º 1
0
        private void CreateParsedMethod(int startIndex, int endIndex, bool trimContents)
        {
            // For now we'll assume that all properties are on
            // the same line.  Eventually we may want to combine
            // all lines before the opening bracket


            // todo: add attributes:
            CurrentAttributes.Clear();


            #region Get header information

            int lineIndexForHeader = 0;

            string headerLine = mCurrentBlock[lineIndexForHeader].Trim();

            int numberOfParens = mCurrentBlock[lineIndexForHeader].CountOf('(') - mCurrentBlock[lineIndexForHeader].CountOf(')');


            while (numberOfParens > 0)
            {
                lineIndexForHeader++;
                headerLine += " " + mCurrentBlock[lineIndexForHeader].Trim();

                numberOfParens += mCurrentBlock[lineIndexForHeader].CountOf('(') - mCurrentBlock[lineIndexForHeader].CountOf(')');
            }

            ParsedMethod parsedMethod = new ParsedMethod();

            parsedMethod.FillHeaderInformation(headerLine);

            #endregion

            parsedMethod.StartIndex = startIndex;
            parsedMethod.EndIndex   = endIndex;

            parsedMethod.FillArgumentList(parsedMethod, mCurrentBlock, 0, true);

            // Fill generic restrictions after getting all arguments
            parsedMethod.FillGenericRestrictions(headerLine);

            parsedMethod.FillBaseCall(mCurrentBlock);

            StringBuilder methodContents = new StringBuilder();

            bool hasGetter;
            bool hasSetter;

            bool hasAutomaticGetter;
            bool hasAutomaticSetter;

            FillGettersAndSetters(methodContents, methodContents, false, trimContents, out hasGetter, out hasSetter, out hasAutomaticGetter, out hasAutomaticSetter);

            parsedMethod.MethodContents = methodContents.ToString();
            parsedMethod.StoreOffOldName();

            mParsedMethods.Add(parsedMethod);
        }
Ejemplo n.º 2
0
        private void CreateParsedMethod(int startIndex, int endIndex, bool trimContents)
        {
            // For now we'll assume that all properties are on 
            // the same line.  Eventually we may want to combine
            // all lines before the opening bracket


            // todo: add attributes:
            CurrentAttributes.Clear();


            #region Get header information

            int lineIndexForHeader = 0;

            string headerLine = mCurrentBlock[lineIndexForHeader].Trim() ;

            int numberOfParens = mCurrentBlock[lineIndexForHeader].CountOf('(') - mCurrentBlock[lineIndexForHeader].CountOf(')');
            

            while (numberOfParens > 0)
            {
                lineIndexForHeader++;
                headerLine += " " + mCurrentBlock[lineIndexForHeader].Trim();

                numberOfParens += mCurrentBlock[lineIndexForHeader].CountOf('(') - mCurrentBlock[lineIndexForHeader].CountOf(')');
            }
            
            ParsedMethod parsedMethod = new ParsedMethod();

            parsedMethod.FillHeaderInformation(headerLine);

            #endregion

            parsedMethod.StartIndex = startIndex;
            parsedMethod.EndIndex = endIndex;

            parsedMethod.FillArgumentList(parsedMethod, mCurrentBlock, 0, true);

            // Fill generic restrictions after getting all arguments
            parsedMethod.FillGenericRestrictions(headerLine);

            parsedMethod.FillBaseCall(mCurrentBlock);

            StringBuilder methodContents = new StringBuilder();

            bool hasGetter;
            bool hasSetter;

            bool hasAutomaticGetter;
            bool hasAutomaticSetter;

            FillGettersAndSetters(methodContents, methodContents, false, trimContents, out hasGetter, out hasSetter, out hasAutomaticGetter, out hasAutomaticSetter);

            parsedMethod.MethodContents = methodContents.ToString();
            parsedMethod.StoreOffOldName();

            mParsedMethods.Add(parsedMethod);
        }