/// <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( ))); }
/// <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); }
/// <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--; }
/// <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(); }
/// <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); }
/// <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)); }
public NRConstructorDeclaration(NRConstructor constructor) { this.constructor = constructor; }
/// <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); }
/// <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)); }
/// <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); }
/// <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)); }
/// <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)); }