Package system.diagnostics.tracing
Class EventSource
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.diagnostics.tracing.EventSource
-
- All Implemented Interfaces:
AutoCloseable
,IJCOBridgeReflected
public class EventSource extends NetObject implements AutoCloseable
The base .NET class managing System.Diagnostics.Tracing.EventSource, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Diagnostics.Tracing.EventSource
Powered by JCOBridge: more info at https://www.jcobridge.com
- Version:
- 1.14.3.0
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static String
assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798estatic String
assemblyShortName
Assembly name: System.Private.CoreLibstatic String
className
Qualified class name: System.Diagnostics.Tracing.EventSourcestatic JCType
classType
The type managed from JCOBridge.
-
Constructor Summary
Constructors Constructor Description EventSource()
EventSource(Object instance)
Internal constructor.EventSource(String eventSourceName)
EventSource(String eventSourceName, EventSourceSettings config)
EventSource(String eventSourceName, EventSourceSettings config, String... traits)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EventSource
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoEventSource
, a cast assert is made to check if types are compatible.void
close()
void
Dispose()
static String
GenerateManifest(NetType eventSourceType, String assemblyPathToIncludeInManifest)
static String
GenerateManifest(NetType eventSourceType, String assemblyPathToIncludeInManifest, EventManifestOptions flags)
NetException
getConstructionException()
static Guid
getCurrentThreadActivityId()
Guid
getGuid()
static Guid
GetGuid(NetType eventSourceType)
String
getJCOAssemblyName()
Returns the reflected Assembly nameString
getJCOClassName()
Returns the reflected Class nameObject
getJCOInstance()
Returns the instantiated classString
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class TypeString
getName()
static String
GetName(NetType eventSourceType)
EventSourceSettings
getSettings()
String
GetTrait(String key)
boolean
IsEnabled()
boolean
IsEnabled(EventLevel level, EventKeywords keywords)
boolean
IsEnabled(EventLevel level, EventKeywords keywords, EventChannel channel)
static void
SetCurrentThreadActivityId(Guid activityId)
static void
SetCurrentThreadActivityId(Guid activityId, JCORefOut<Guid> oldActivityThatWillContinue)
void
setJCOInstance(JCObject instance)
void
Write(String eventName)
void
Write(String eventName, EventSourceOptions options)
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObject
Equals, Equals, GetHashCode, GetType, hashCode, toObjectFromArray, toObjectFromArray, toString, ToString, translateException
-
-
-
-
Field Detail
-
assemblyFullName
public static final String assemblyFullName
Fully assembly qualified name: System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e- See Also:
- Constant Field Values
-
assemblyShortName
public static final String assemblyShortName
Assembly name: System.Private.CoreLib- See Also:
- Constant Field Values
-
className
public static final String className
Qualified class name: System.Diagnostics.Tracing.EventSource- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EventSource
public EventSource(Object instance) throws Throwable
Internal constructor. Use with caution- Throws:
Throwable
-
EventSource
public EventSource(String eventSourceName, EventSourceSettings config, String... traits) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, CultureNotFoundException, OverflowException, FormatException, OutOfMemoryException, SecurityException, IOException, EventSourceException, KeyNotFoundException, AmbiguousMatchException, MissingMethodException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ArgumentNullException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
CultureNotFoundException
OverflowException
FormatException
OutOfMemoryException
SecurityException
IOException
EventSourceException
KeyNotFoundException
AmbiguousMatchException
MissingMethodException
-
EventSource
public EventSource(String eventSourceName, EventSourceSettings config) throws Throwable, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, InvalidOperationException, ArgumentOutOfRangeException, CultureNotFoundException, ArrayTypeMismatchException, OverflowException, FormatException, OutOfMemoryException, IndexOutOfRangeException, SecurityException, IOException, EventSourceException, KeyNotFoundException, AmbiguousMatchException
- Throws:
Throwable
ArgumentException
PlatformNotSupportedException
NotSupportedException
ArgumentNullException
InvalidOperationException
ArgumentOutOfRangeException
CultureNotFoundException
ArrayTypeMismatchException
OverflowException
FormatException
OutOfMemoryException
IndexOutOfRangeException
SecurityException
IOException
EventSourceException
KeyNotFoundException
AmbiguousMatchException
-
EventSource
public EventSource(String eventSourceName) throws Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, ArgumentOutOfRangeException, InvalidOperationException, CultureNotFoundException, ArrayTypeMismatchException, FormatException, OverflowException, SecurityException, IOException, EventSourceException, OutOfMemoryException
- Throws:
Throwable
NotSupportedException
ArgumentException
ArgumentNullException
PlatformNotSupportedException
IndexOutOfRangeException
ArgumentOutOfRangeException
InvalidOperationException
CultureNotFoundException
ArrayTypeMismatchException
FormatException
OverflowException
SecurityException
IOException
EventSourceException
OutOfMemoryException
-
-
Method Detail
-
getJCOAssemblyName
public String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classNetObject
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classNetObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classNetObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static EventSource cast(IJCOBridgeReflected from) throws Throwable
Try to cast theIJCOBridgeReflected
instance intoEventSource
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
EventSource
instance- Throws:
Throwable
- in case of error during cast operation
-
IsEnabled
public boolean IsEnabled(EventLevel level, EventKeywords keywords, EventChannel channel) throws Throwable
- Throws:
Throwable
-
IsEnabled
public boolean IsEnabled(EventLevel level, EventKeywords keywords) throws Throwable
- Throws:
Throwable
-
GetGuid
public static Guid GetGuid(NetType eventSourceType) throws Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, NotSupportedException, CultureNotFoundException, ObjectDisposedException, FormatException, AmbiguousMatchException, OutOfMemoryException, ExternalException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, InvalidCastException, OverflowException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
IndexOutOfRangeException
NotSupportedException
CultureNotFoundException
ObjectDisposedException
FormatException
AmbiguousMatchException
OutOfMemoryException
ExternalException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
InvalidCastException
OverflowException
-
GenerateManifest
public static String GenerateManifest(NetType eventSourceType, String assemblyPathToIncludeInManifest, EventManifestOptions flags) throws Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, NotSupportedException, CultureNotFoundException, ObjectDisposedException, FormatException, AmbiguousMatchException, OutOfMemoryException, ExternalException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, InvalidCastException, OverflowException, KeyNotFoundException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
IndexOutOfRangeException
NotSupportedException
CultureNotFoundException
ObjectDisposedException
FormatException
AmbiguousMatchException
OutOfMemoryException
ExternalException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
InvalidCastException
OverflowException
KeyNotFoundException
-
GenerateManifest
public static String GenerateManifest(NetType eventSourceType, String assemblyPathToIncludeInManifest) throws Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, NotSupportedException, ObjectDisposedException, RankException, FormatException, AmbiguousMatchException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, InvalidCastException, OutOfMemoryException, OverflowException, KeyNotFoundException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
IndexOutOfRangeException
NotSupportedException
ObjectDisposedException
RankException
FormatException
AmbiguousMatchException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
InvalidCastException
OutOfMemoryException
OverflowException
KeyNotFoundException
-
GetName
public static String GetName(NetType eventSourceType) throws Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, IndexOutOfRangeException, NotSupportedException, ObjectDisposedException, RankException, FormatException, AmbiguousMatchException, OutOfMemoryException, ExternalException, MethodAccessException, MissingMethodException, MemberAccessException, TargetInvocationException, InvalidCastException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
ArgumentNullException
InvalidOperationException
PlatformNotSupportedException
ArrayTypeMismatchException
IndexOutOfRangeException
NotSupportedException
ObjectDisposedException
RankException
FormatException
AmbiguousMatchException
OutOfMemoryException
ExternalException
MethodAccessException
MissingMethodException
MemberAccessException
TargetInvocationException
InvalidCastException
-
GetTrait
public String GetTrait(String key) throws Throwable, NotSupportedException, ArgumentException, ArgumentNullException, PlatformNotSupportedException
-
Dispose
public void Dispose() throws Throwable, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, ArgumentException, IndexOutOfRangeException, FormatException, OutOfMemoryException, KeyNotFoundException, EventSourceException
-
SetCurrentThreadActivityId
public static void SetCurrentThreadActivityId(Guid activityId, JCORefOut<Guid> oldActivityThatWillContinue) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, EventSourceException, OutOfMemoryException, CultureNotFoundException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ArgumentNullException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
FormatException
EventSourceException
OutOfMemoryException
CultureNotFoundException
-
SetCurrentThreadActivityId
public static void SetCurrentThreadActivityId(Guid activityId) throws Throwable, ArgumentException, ArgumentOutOfRangeException, IndexOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ArgumentNullException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, FormatException, EventSourceException, OutOfMemoryException, CultureNotFoundException
- Throws:
Throwable
ArgumentException
ArgumentOutOfRangeException
IndexOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ArgumentNullException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
FormatException
EventSourceException
OutOfMemoryException
CultureNotFoundException
-
Write
public void Write(String eventName, EventSourceOptions options) throws Throwable, ArgumentOutOfRangeException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, InvalidOperationException, NotSupportedException, IndexOutOfRangeException, FormatException, CultureNotFoundException, OutOfMemoryException, ExternalException, EventSourceException
-
Write
public void Write(String eventName) throws Throwable, ArgumentOutOfRangeException, ArgumentException, ArgumentNullException, PlatformNotSupportedException, InvalidOperationException, NotSupportedException, IndexOutOfRangeException, FormatException, CultureNotFoundException, OutOfMemoryException, ExternalException, EventSourceException
-
close
public void close() throws Exception
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
getSettings
public EventSourceSettings getSettings() throws Throwable
- Throws:
Throwable
-
getConstructionException
public NetException getConstructionException() throws Throwable
- Throws:
Throwable
-
getCurrentThreadActivityId
public static Guid getCurrentThreadActivityId() throws Throwable
- Throws:
Throwable
-
-