コード例 #1
0
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
     WriteIndent();
     Visit(block.Text);
     if (block.Parameters != null)
     {
         Visit(block.Parameters);
     }
     if (block.ThisParameters != null)
     {
         Visit(block.ThisParameters);
     }
     if (block.PropertyAccessors != null)
     {
         Visit(block.PropertyAccessors);
     }
     else
     {
         if (!string.IsNullOrEmpty(block.Text.Text))
         {
             WriteSemicolon();
         }
     }
     NewLine();
 }
コード例 #2
0
        public void Add(InterfaceMemberDeclarationBlock memberDeclaration)
        {
            InterfaceMemberDeclarationBlock first = this.VMembers.Children.Head as InterfaceMemberDeclarationBlock;

            if (first != null &&
                first.Prev == null &&
                first.Next == null &&
                string.IsNullOrEmpty(first.Text.Text))
            {
                first.Replace(memberDeclaration);
                return;
            }
            this.VMembers.Children.Add(memberDeclaration);
        }
コード例 #3
0
        public void AddEventDeclaration(
            string modifiers,
            string eventType,
            string name)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;

            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum            += "event";
            accum            += " " + eventType;
            accum            += " " + name;
            newDecl.Text.Text = accum;
            Add(newDecl);
        }
コード例 #4
0
        public void AddMethodDeclaration(
            string modifiers,
            string returnType,
            string name,
            string parameters)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;

            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum            += returnType;
            accum            += " " + name;
            newDecl.Text.Text = accum;
            newDecl.AppendParameters(parameters);
            Add(newDecl);
        }
コード例 #5
0
        public void AddPropertyDeclaration(
            string modifiers,
            string propType,
            string name,
            bool hasGetter,
            bool hasSetter)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;

            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum            += propType;
            accum            += " " + name;
            newDecl.Text.Text = accum;
            newDecl.AppendPropertyAccessors(hasGetter, hasSetter);
            Add(newDecl);
        }
コード例 #6
0
        public void AddIndexerDeclaration(
            string modifiers,
            string returnType,
            string parameters,
            bool hasGetter,
            bool hasSetter)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;

            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum            += returnType;
            accum            += " this";
            newDecl.Text.Text = accum;
            newDecl.AppendThisParameters(parameters);
            newDecl.AppendPropertyAccessors(hasGetter, hasSetter);
            Add(newDecl);
        }
コード例 #7
0
ファイル: BaseVisitor.cs プロジェクト: Ju2ender/csharp-e
 public virtual void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
コード例 #8
0
ファイル: DefaultVisitor.cs プロジェクト: Ju2ender/csharp-e
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
コード例 #9
0
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
コード例 #10
0
ファイル: PrettyPrinter.cs プロジェクト: Ju2ender/csharp-e
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
     WriteIndent();
     Visit(block.Text);
     if (block.Parameters != null)
     {
         Visit(block.Parameters);
     }
     if (block.ThisParameters != null)
     {
         Visit(block.ThisParameters);
     }
     if (block.PropertyAccessors != null)
     {
         Visit(block.PropertyAccessors);
     }
     else
     {
         if (!string.IsNullOrEmpty(block.Text.Text))
         {
             WriteSemicolon();
         }
     }
     NewLine();
 }
コード例 #11
0
ファイル: InterfaceBlock.cs プロジェクト: Ju2ender/csharp-e
        public void AddPropertyDeclaration(
			string modifiers,
			string propType,
			string name,
			bool hasGetter,
			bool hasSetter)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;
            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum += propType;
            accum += " " + name;
            newDecl.Text.Text = accum;
            newDecl.AppendPropertyAccessors(hasGetter, hasSetter);
            Add(newDecl);
        }
コード例 #12
0
ファイル: InterfaceBlock.cs プロジェクト: Ju2ender/csharp-e
        public void AddMethodDeclaration(
			string modifiers,
			string returnType,
			string name,
			string parameters)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;
            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum += returnType;
            accum += " " + name;
            newDecl.Text.Text = accum;
            newDecl.AppendParameters(parameters);
            Add(newDecl);
        }
コード例 #13
0
ファイル: InterfaceBlock.cs プロジェクト: Ju2ender/csharp-e
        public void AddIndexerDeclaration(
			string modifiers,
			string returnType,
			string parameters,
			bool hasGetter,
			bool hasSetter)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;
            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum += returnType;
            accum += " this";
            newDecl.Text.Text = accum;
            newDecl.AppendThisParameters(parameters);
            newDecl.AppendPropertyAccessors(hasGetter, hasSetter);
            Add(newDecl);
        }
コード例 #14
0
ファイル: InterfaceBlock.cs プロジェクト: Ju2ender/csharp-e
        public void AddEventDeclaration(
			string modifiers,
			string eventType,
			string name)
        {
            InterfaceMemberDeclarationBlock newDecl = new InterfaceMemberDeclarationBlock();
            string accum = modifiers;
            if (!string.IsNullOrEmpty(accum))
            {
                accum += " ";
            }
            accum += "event";
            accum += " " + eventType;
            accum += " " + name;
            newDecl.Text.Text = accum;
            Add(newDecl);
        }
コード例 #15
0
ファイル: InterfaceBlock.cs プロジェクト: Ju2ender/csharp-e
 public void Add(InterfaceMemberDeclarationBlock memberDeclaration)
 {
     InterfaceMemberDeclarationBlock first = this.VMembers.Children.Head as InterfaceMemberDeclarationBlock;
     if (first != null
         && first.Prev == null
         && first.Next == null
         && string.IsNullOrEmpty(first.Text.Text))
     {
         first.Replace(memberDeclaration);
         return;
     }
     this.VMembers.Children.Add(memberDeclaration);
 }
コード例 #16
0
		public virtual void Visit(InterfaceMemberDeclarationBlock block)
		{
			
		}