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();
 }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #7
0
 public virtual void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
Beispiel #8
0
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
Beispiel #9
0
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
Beispiel #10
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();
 }
Beispiel #11
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);
        }
Beispiel #12
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);
        }
Beispiel #13
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);
        }
Beispiel #14
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);
        }
Beispiel #15
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);
 }
Beispiel #16
0
		public virtual void Visit(InterfaceMemberDeclarationBlock block)
		{
			
		}