Пример #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
 public virtual void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
Пример #8
0
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
Пример #9
0
 public override void Visit(InterfaceMemberDeclarationBlock block)
 {
 }
Пример #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();
 }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
        }
Пример #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);
 }
Пример #16
0
		public virtual void Visit(InterfaceMemberDeclarationBlock block)
		{
			
		}