/// <summary> /// Gets the <see cref="NREvent" /> as a C# string. /// </summary> /// <param name="nrEvent">The event to get the code for.</param> /// <returns>A string representing the event.</returns> public static string Declaration(this NREvent nrEvent) { string accessModifier = AddSpace(nrEvent.AccessModifier.Declaration( )); string modifier = AddSpace(nrEvent.OperationModifier.Declaration( )); return(string.Format("{0}{1}event {2} {3}", accessModifier, modifier, nrEvent.Type.Declaration( ), nrEvent.Name)); }
/// <summary> /// Visit a <see cref="NREvent"/>. /// </summary> /// <param name="nrEvent">The <see cref="NREvent"/> to visit.</param> public void Visit(NREvent nrEvent) { VisitAttributes(nrEvent); Output(ToString(nrEvent.AccessModifier) + "event " + ToString(nrEvent.Type) + " " + nrEvent.Name + "("); PrintParameters(nrEvent.Parameters); OutputLine(")", 0); }
/// <summary> /// Visit a <see cref="NREvent"/>. /// </summary> /// <param name="nrEvent">The <see cref="NREvent"/> to visit.</param> public void Visit(NREvent nrEvent) { OutputLine("NREvent"); indent++; PrintMembers(nrEvent); indent--; }
/// <summary> /// Visit a <see cref="NREvent"/>. /// </summary> /// <param name="nrEvent">The <see cref="NREvent"/> to visit.</param> public void Visit(NREvent nrEvent) { VisitAttributes(nrEvent); OutputLine(nrEvent.Declaration() + ";"); OutputEmptyLineAfterMember(); }
/// <summary> /// Determines if an event will be reflected. /// </summary> /// <param name="nrEvent">The event to test.</param> /// <returns><c>True</c> if the event should be reflected.</returns> public bool Reflect(NREvent nrEvent) { if (Filter.Reflect(nrEvent)) { ReflectedEvents++; return(true); } IgnoredEvents++; return(false); }
/// <summary> /// Determines if an event will be reflected. /// </summary> /// <param name="nrEvent">The event to test.</param> /// <returns> /// <c>True</c> if the event should be reflected. /// </returns> public bool Reflect(NREvent nrEvent) { return(filter.Reflect(nrEvent)); }
public NREventDeclaration(NREvent nrEvent) { this.nrEvent = nrEvent; }
/// <summary> /// Determines if an event will be reflected. /// </summary> /// <param name="nrEvent">The event to test.</param> /// <returns> /// <c>True</c> if the event should be reflected. /// </returns> public bool Reflect(NREvent nrEvent) { return filter.Reflect(nrEvent); }
/// <summary> /// Determines if an event will be reflected. /// </summary> /// <param name="nrEvent">The event to test.</param> /// <returns><c>True</c> if the event should be reflected.</returns> public bool Reflect(NREvent nrEvent) { return(Reflect(FilterElements.Event, nrEvent)); }
/// <summary> /// Determines if an event will be reflected. /// </summary> /// <param name="nrEvent">The event to test.</param> /// <returns><c>False</c> if the event should not be reflected.</returns> public bool Reflect(NREvent nrEvent) { return(true); }
/// <summary> /// Determines if an event will be reflected. /// </summary> /// <param name="nrEvent">The event to test.</param> /// <returns> /// <c>True</c> if the event should be reflected. /// </returns> public bool Reflect(NREvent nrEvent) { return(filter.Reflect(nrEvent) && CanImportTypeUsage(nrEvent.Type)); }