コード例 #1
0
 public void AppendParameters(ParameterListBlock block)
 {
     if (!CanAppendParameters())
     {
         return;
     }
     Parameters = block;
     Text.AppendBlocks(Parameters);
 }
コード例 #2
0
 public void AppendParameters(string parameters)
 {
     if (!CanAppendParameters())
     {
         return;
     }
     Parameters = new ParameterListBlock(parameters);
     Text.AppendBlocks(Parameters);
 }
コード例 #3
0
 public void AppendThisParameters(string parameters)
 {
     if (!CanAppendThisParameters())
     {
         return;
     }
     ThisParameters = new ParameterListBlock(parameters);
     ThisParameters.TypeOfBraces = ParameterListBlock.TypeOfParentheses.SquareBrackets;
     Text.AppendBlocks(ThisParameters);
 }
コード例 #4
0
        private void Check()
        {
            bool propertyAccessorsFound = false;
            bool parametersFound        = false;
            bool thisParametersFound    = false;

            foreach (Block b in this.Children)
            {
                InterfaceAccessorsBlock acc = b as InterfaceAccessorsBlock;
                if (acc != null)
                {
                    if (PropertyAccessors != acc)
                    {
                        PropertyAccessors = acc;
                    }
                    propertyAccessorsFound = true;
                }
                ParameterListBlock par = b as ParameterListBlock;
                if (par != null)
                {
                    if (par.TypeOfBraces == ParameterListBlock.TypeOfParentheses.Parentheses)
                    {
                        if (Parameters != par)
                        {
                            Parameters = par;
                        }
                        parametersFound = true;
                    }
                    else if (par.TypeOfBraces == ParameterListBlock.TypeOfParentheses.SquareBrackets)
                    {
                        if (ThisParameters != par)
                        {
                            ThisParameters = par;
                        }
                        thisParametersFound = true;
                    }
                }
            }
            if (!propertyAccessorsFound && PropertyAccessors != null)
            {
                PropertyAccessors = null;
            }
            if (!parametersFound && Parameters != null)
            {
                Parameters = null;
            }
            if (!thisParametersFound && ThisParameters != null)
            {
                ThisParameters = null;
            }
        }
コード例 #5
0
 public override void Visit(ParameterListBlock block)
 {
 }
コード例 #6
0
 public override void Visit(ParameterListBlock block)
 {
     Write(block.OpeningBrace + block.Text + block.ClosingBrace);
 }
コード例 #7
0
		public virtual void Visit(ParameterListBlock block)
		{

		}