Exemplo n.º 1
0
        /// <summary>
        ///     Gets the <see cref="NRConstructor" /> as a C# string.
        /// </summary>
        /// <param name="constructor">The constructor to get the code for.</param>
        /// <returns>A string representing the constructor.</returns>
        public static string Declaration(this NRConstructor constructor)
        {
            string accessModifier = AddSpace(constructor.AccessModifier.Declaration( ));
            string modifier       = AddSpace(constructor.OperationModifier.Declaration( ));

            return(string.Format("{0}{1}{2}({3})", accessModifier, modifier, constructor.Name, constructor.Parameters.Declaration( )));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Visit a <see cref="NRConstructor"/>.
 /// </summary>
 /// <param name="nrConstructor">The <see cref="NRConstructor"/> to visit.</param>
 public void Visit(NRConstructor nrConstructor)
 {
     VisitAttributes(nrConstructor);
     Output(ToString(nrConstructor.AccessModifier) + ToString(nrConstructor.OperationModifier) + nrConstructor.Name + "(");
     PrintParameters(nrConstructor.Parameters);
     OutputLine(")", 0);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Visit a <see cref="NRConstructor"/>.
 /// </summary>
 /// <param name="nrConstructor">The <see cref="NRConstructor"/> to visit.</param>
 public void Visit(NRConstructor nrConstructor)
 {
     OutputLine("NRConstructor");
     indent++;
     PrintMembers(nrConstructor);
     indent--;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Visit a <see cref="NRConstructor"/>.
        /// </summary>
        /// <param name="nrConstructor">The <see cref="NRConstructor"/> to visit.</param>
        public void Visit(NRConstructor nrConstructor)
        {
            VisitAttributes(nrConstructor);

            OutputLine(nrConstructor.Declaration() + "{}");
            OutputEmptyLineAfterMember();
        }
Exemplo n.º 5
0
 /// <summary>
 ///     Determines if a method will be reflected.
 /// </summary>
 /// <param name="nrConstructor">The method to test.</param>
 /// <returns><c>True</c> if the method should be reflected.</returns>
 public bool Reflect(NRConstructor nrConstructor)
 {
     if (Filter.Reflect(nrConstructor))
     {
         ReflectedConstructors++;
         return(true);
     }
     IgnoredConstructors++;
     return(false);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Determines if a method will be reflected.
 /// </summary>
 /// <param name="nrConstructor">The method to test.</param>
 /// <returns>
 /// <c>True</c> if the method should be reflected.
 /// </returns>
 public bool Reflect(NRConstructor nrConstructor)
 {
     return(HasUnsafeParameters(nrConstructor.Parameters) ? false : filter.Reflect(nrConstructor));
 }
Exemplo n.º 7
0
 public NRConstructorDeclaration(NRConstructor constructor)
 {
     this.constructor = constructor;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Determines if a method will be reflected.
 /// </summary>
 /// <param name="nrConstructor">The method to test.</param>
 /// <returns>
 /// <c>True</c> if the method should be reflected.
 /// </returns>
 public bool Reflect(NRConstructor nrConstructor)
 {
   return HasUnsafeParameters(nrConstructor.Parameters) ? false : filter.Reflect(nrConstructor);
 }
Exemplo n.º 9
0
 /// <summary>
 ///     Determines if a method will be reflected.
 /// </summary>
 /// <param name="nrConstructor">The method to test.</param>
 /// <returns><c>True</c> if the method should be reflected.</returns>
 public bool Reflect(NRConstructor nrConstructor)
 {
     return(Reflect(FilterElements.Constructor, nrConstructor));
 }
Exemplo n.º 10
0
 /// <summary>
 ///     Determines if a method will be reflected.
 /// </summary>
 /// <param name="nrConstructor">The method to test.</param>
 /// <returns><c>False</c> if the method should not be reflected.</returns>
 public bool Reflect(NRConstructor nrConstructor)
 {
     return(true);
 }
Exemplo n.º 11
0
 /// <summary>
 ///     Determines if a method will be reflected.
 /// </summary>
 /// <param name="nrConstructor">The method to test.</param>
 /// <returns><c>True</c> if the method should be reflected.</returns>
 public bool Reflect(NRConstructor nrConstructor)
 {
     return(!Filter.Reflect(nrConstructor));
 }
Exemplo n.º 12
0
 /// <summary>
 /// Determines if a method will be reflected.
 /// </summary>
 /// <param name="nrConstructor">The method to test.</param>
 /// <returns>
 /// <c>True</c> if the method should be reflected.
 /// </returns>
 public bool Reflect(NRConstructor nrConstructor)
 {
     return(filter.Reflect(nrConstructor) && CanImportParameters(nrConstructor.Parameters));
 }