Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
 /// <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);
 }
Exemplo n.º 3
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--;
 }
Exemplo n.º 4
0
        /// <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();
        }
Exemplo n.º 5
0
 /// <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);
 }
Exemplo n.º 6
0
 /// <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));
 }
Exemplo n.º 7
0
 public NREventDeclaration(NREvent nrEvent)
 {
     this.nrEvent = nrEvent;
 }
Exemplo n.º 8
0
 /// <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);
 }
Exemplo n.º 9
0
 /// <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));
 }
Exemplo n.º 10
0
 /// <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);
 }
Exemplo n.º 11
0
 /// <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));
 }