Exemplo n.º 1
0
 public void ReportEvent(ImporterEventKind eventKind, 
     int eventCode, string eventMsg)
 {
     // We don't really care which kind of error is
     // sent.  Just print out the information.
     Console.WriteLine("Event reported: {0}", eventMsg);
 }
Exemplo n.º 2
0
 /*
  * Method:  ITypeLibImporterNotifySink.ReportEvent
  *
  * Implementation of ITypeLibImporterNotifySink.ReportEvent - this method gets called by NDP type lib converter
  * to report various messages (like "type blahblah converted" or "failed to convert type blahblah").
  */
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     if (!Silent)
     {
         if (eventKind == ImporterEventKind.ERROR_REFTOINVALIDTYPELIB)
         {
             Log.LogWarningWithCodeFromResources("ResolveComReference.ResolutionWarning", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
         else if (eventKind == ImporterEventKind.NOTIF_CONVERTWARNING)
         {
             Log.LogWarningWithCodeFromResources("ResolveComReference.ResolutionWarning", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
         else if (eventKind == ImporterEventKind.NOTIF_TYPECONVERTED)
         {
             Log.LogMessageFromResources(MessageImportance.Low, "ResolveComReference.ResolutionMessage", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
         else
         {
             Debug.Assert(false, "Unknown ImporterEventKind value");
             Log.LogMessageFromResources(MessageImportance.Low, "ResolveComReference.ResolutionMessage", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
     }
     else
     {
         if (eventKind != ImporterEventKind.ERROR_REFTOINVALIDTYPELIB && eventKind != ImporterEventKind.NOTIF_CONVERTWARNING && eventKind != ImporterEventKind.NOTIF_TYPECONVERTED)
         {
             Debug.Assert(false, "Unknown ImporterEventKind value");
         }
     }
 }
Exemplo n.º 3
0
 public void ReportEvent(ImporterEventKind eventKind,
                         int eventCode, string eventMsg)
 {
     // We don't really care which kind of error is
     // sent.  Just print out the information.
     Console.WriteLine("Event reported: {0}", eventMsg);
 }
Exemplo n.º 4
0
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     if (eventKind != ImporterEventKind.NOTIF_TYPECONVERTED)
     {
         Print("Warning: " + eventMsg);
     }
 }
 public static void Trace(TraceEventType type, int traceCode, string description, Guid iid, Guid typeLibraryID, ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     if (DiagnosticUtility.ShouldTrace(type))
     {
         ComPlusTLBImportConverterEventSchema schema = new ComPlusTLBImportConverterEventSchema(iid, typeLibraryID, eventKind, eventCode, eventMsg);
         TraceUtility.TraceEvent(type, traceCode, System.ServiceModel.SR.GetString(description), (TraceRecord) schema);
     }
 }
 public ComPlusTLBImportConverterEventSchema(
     Guid iid,
     Guid typeLibraryID,
     ImporterEventKind eventKind,
     int eventCode,
     string eventMessage
     )
     : base(iid, typeLibraryID)
 {
     this.eventKind    = eventKind;
     this.eventCode    = eventCode;
     this.eventMessage = eventMessage;
 }
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     if (eventKind == ImporterEventKind.ERROR_REFTOINVALIDTYPELIB)
     {
         base.Log.LogWarning(eventMsg, new object[0]);
     }
     else if (eventKind == ImporterEventKind.NOTIF_CONVERTWARNING)
     {
         base.Log.LogWarning(eventMsg, new object[0]);
     }
     else if (eventKind == ImporterEventKind.NOTIF_TYPECONVERTED)
     {
         base.Log.LogMessage(MessageImportance.Low, eventMsg, new object[0]);
     }
     else
     {
         base.Log.LogMessage(MessageImportance.Low, eventMsg, new object[0]);
     }
 }
Exemplo n.º 8
0
        public void ReportEvent(ImporterEventKind EventKind, int EventCode, String EventMsg)
        {
            //@todo: the following line is very useful, and should be available as a verbose option.
            //Console.Write(DateTime.Now.ToString("h:mm:ss.fff "));

            if (EventKind == ImporterEventKind.NOTIF_TYPECONVERTED)
            {
                if (TlbImpCode.s_Options.m_bVerboseMode)
                {
                    Console.WriteLine(EventMsg);
                }
            }
            else
            if (EventKind == ImporterEventKind.NOTIF_CONVERTWARNING)
            {
                TlbImpCode.WriteWarningMsg(EventMsg);
            }
            else
            {
                Console.WriteLine(EventMsg);
            }
        }
Exemplo n.º 9
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     // handle warning event here...
     Console.WriteLine(eventMsg);
 }
Exemplo n.º 10
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     // Do nothing. 
 }
Exemplo n.º 11
0
 public void ReportEvent(ImporterEventKind EventKind, int EventCode, string EventMsg)
 {
 }
Exemplo n.º 12
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     System.Diagnostics.Debug.WriteLine("Event reported: {0}", eventMsg);
 }
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg) {
     return;
 }
Exemplo n.º 14
0
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind EventKind, int EventCode, String EventMsg)
 {
 }
Exemplo n.º 15
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     // handle warning event here...
 }
 public void ReportEvent(ImporterEventKind EventKind, int EventCode, string EventMsg)
 {
 }
 public static void Trace(TraceEventType type, int traceCode, string description, Guid iid, Guid typeLibraryID, ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     if (DiagnosticUtility.ShouldTrace(type))
     {
         ComPlusTLBImportConverterEventSchema record =
             new ComPlusTLBImportConverterEventSchema(iid, typeLibraryID, eventKind, eventCode, eventMsg);
         TraceUtility.TraceEvent(type, traceCode, ServiceModelSR.GetString(description), record);
     }
 }
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     //Console.WriteLine($"Event: {eventMsg}");
 }
Exemplo n.º 19
0
 public void ReportEvent(ImporterEventKind EventKind, int EventCode, String EventMsg)
 {
     if (EventKind == ImporterEventKind.NOTIF_TYPECONVERTED)
     {
     if (TlbImpCode.s_Options.m_bVerboseMode)
         Output.WriteInfo(EventMsg, (MessageCode)EventCode);
     }
     else if (EventKind == ImporterEventKind.NOTIF_CONVERTWARNING)
     {
     Output.WriteWarning(EventMsg, (WarningCode)EventCode);
     }
     else
     {
     Output.Write(EventMsg);
     }
 }
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     return;
 }
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     this.RaiseMessage(eventMsg);
 }
Exemplo n.º 22
0
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     ComPlusTLBImportTrace.Trace(TraceEventType.Verbose, TraceCode.ComIntegrationTLBImportConverterEvent,
                                 SR.TraceCodeComIntegrationTLBImportConverterEvent, iid, typeLibraryID, eventKind, eventCode, eventMsg);
 }
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind EventKind, int EventCode, string EventMsg)
 {
 }
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     ComPlusTLBImportTrace.Trace(TraceEventType.Verbose, TraceCode.ComIntegrationTLBImportConverterEvent,
                 SR.TraceCodeComIntegrationTLBImportConverterEvent, iid, typeLibraryID, eventKind, eventCode, eventMsg);
 }
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     if (eventKind == ImporterEventKind.ERROR_REFTOINVALIDTYPELIB)
     {
         base.Log.LogWarning(eventMsg, new object[0]);
     }
     else if (eventKind == ImporterEventKind.NOTIF_CONVERTWARNING)
     {
         base.Log.LogWarning(eventMsg, new object[0]);
     }
     else if (eventKind == ImporterEventKind.NOTIF_TYPECONVERTED)
     {
         base.Log.LogMessage(MessageImportance.Low, eventMsg, new object[0]);
     }
     else
     {
         base.Log.LogMessage(MessageImportance.Low, eventMsg, new object[0]);
     }
 }
Exemplo n.º 26
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     //System.Diagnostics.Debug.WriteLine(String.Format("{0} {1} {2}", eventKind.ToString(), eventCode,
     //        eventMsg));
 }
Exemplo n.º 27
0
		public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
		{
			// FIXME - handle warning event here...
			TraceUtil.WriteLineWarning(this, 
									  "Typelib Convert warning: " + this
									  + " " + eventKind + " " + eventMsg);
		}
Exemplo n.º 28
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     Console.WriteLine("{0}", eventMsg);
 }
Exemplo n.º 29
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     // Do nothing.
 }
Exemplo n.º 30
0
 /*
  * Method:  ITypeLibImporterNotifySink.ReportEvent
  * 
  * Implementation of ITypeLibImporterNotifySink.ReportEvent - this method gets called by NDP type lib converter
  * to report various messages (like "type blahblah converted" or "failed to convert type blahblah").
  */
 void ITypeLibImporterNotifySink.ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     if (!Silent)
     {
         if (eventKind == ImporterEventKind.ERROR_REFTOINVALIDTYPELIB)
         {
             Log.LogWarningWithCodeFromResources("ResolveComReference.ResolutionWarning", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
         else if (eventKind == ImporterEventKind.NOTIF_CONVERTWARNING)
         {
             Log.LogWarningWithCodeFromResources("ResolveComReference.ResolutionWarning", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
         else if (eventKind == ImporterEventKind.NOTIF_TYPECONVERTED)
         {
             Log.LogMessageFromResources(MessageImportance.Low, "ResolveComReference.ResolutionMessage", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
         else
         {
             Debug.Assert(false, "Unknown ImporterEventKind value");
             Log.LogMessageFromResources(MessageImportance.Low, "ResolveComReference.ResolutionMessage", ReferenceInfo.SourceItemSpec, ReferenceInfo.strippedTypeLibPath, eventMsg);
         }
     }
     else
     {
         if (eventKind != ImporterEventKind.ERROR_REFTOINVALIDTYPELIB && eventKind != ImporterEventKind.NOTIF_CONVERTWARNING && eventKind != ImporterEventKind.NOTIF_TYPECONVERTED)
         {
             Debug.Assert(false, "Unknown ImporterEventKind value");
         }
     }
 }
Exemplo n.º 31
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     Parent.InvokeReportEvent(new ReportEventEventArgs(eventKind, eventCode, eventMsg));
 }
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, String eventMsg)
 {
     m_UserSink.ReportEvent(eventKind, eventCode, eventMsg);
 }
Exemplo n.º 33
0
 public ReportEventEventArgs(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     EventKind = eventKind;
     EventCode = eventCode;
     EventMsg  = eventMsg;
 }
Exemplo n.º 34
0
 // Token: 0x06006FEF RID: 28655 RVA: 0x0018076B File Offset: 0x0017E96B
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     this.m_UserSink.ReportEvent(eventKind, eventCode, eventMsg);
 }
 public ComPlusTLBImportConverterEventSchema(
     Guid iid,
     Guid typeLibraryID,
     ImporterEventKind eventKind,
     int eventCode,
     string eventMessage
     )
     : base(iid, typeLibraryID)
 {
     this.eventKind = eventKind;
     this.eventCode = eventCode;
     this.eventMessage = eventMessage;
 }
Exemplo n.º 36
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     // handle warning event here...
 }
Exemplo n.º 37
0
 public void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg)
 {
     Console.WriteLine("{0}", eventMsg);
 }