Does NTrace support Generics?

Apr 7, 2011 at 10:54 AM

Hi,

I've tried to add tracing to a generic class and got the following error:

Gen.cs(15,167): warning CS0305: Using the generic type 'NTraceTest.Gen<T>' requires '1' type arguments

Looking at the generated code showed indeed that class Gen was used w/o specification:

if ((((int)NTraceTest.TraceHelper.provider.Flags & 16) != 0) && ((int)NTraceTest.TraceHelper.provider.Level >= 4)) {NTraceTest.TraceHelper.provider.Trace(Gen._etwMessageGuid, 10, this.GetHashCode(), size.ToString());}

Is this a known issue? Is there a workaround for that? Do you plan to add support for generics in any future release of NTrace?

Thanks,

--Eran

Coordinator
Apr 7, 2011 at 12:17 PM
That's a (horrible) bug in our preprocessor; either the AST parser's not handing us the correct class name, or we're not using the fully-qualified name. I'll get this one fixed in the 1.1 code and ensure it's in 2.0 as well.

On Thu, Apr 7, 2011 at 6:54 AM, eranhare <notifications@codeplex.com> wrote:

From: eranhare

Hi,

I've tried to add tracing to a generic class and got the following error:

Gen.cs(15,167): warning CS0305: Using the generic type 'NTraceTest.Gen<T>' requires '1' type arguments

Looking at the generated code showed indeed that class Gen was used w/o specification:

if ((((int)NTraceTest.TraceHelper.provider.Flags & 16) != 0) && ((int)NTraceTest.TraceHelper.provider.Level >= 4)) {NTraceTest.TraceHelper.provider.Trace(Gen._etwMessageGuid, 10, this.GetHashCode(), size.ToString());}

Is this a known issue? Is there a workaround for that? Do you plan to add support for generics in any future release of NTrace?

Thanks,

--Eran

Read the full discussion online.

To add a post to this discussion, reply to this email (NTrace@discussions.codeplex.com)

To start a new discussion for this project, email NTrace@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com