Re: HEADS UP: Fwd: Microsoft: Windows Azure - Activation Benefits

2011-09-12 Thread Glen Harvy
Hi Andrew, The newspaper article was the main reason I was prompted to look into this event further. It was in Sundays Telegraph. It was either on page 3 or another subsequent odd page number under "News Items". It was a very brief item only.

Embed file name into compiled source

2011-09-12 Thread Michael Minutillo
Hey all, Hopefully a simple one (or impossible). Is there a way to embed the current filename into a class using the preprocessor? i.e. In Ruby you can use the predefined variable __FILE__ (or something I don't remember the specifics). I want this info for reasons that are complex and boring and

Re: Embed file name into compiled source

2011-09-12 Thread Preet Sangha
in the constructor: class x { static string currentFile = new System.Diagnostics.StackTrace(true ).GetFrame(0).GetFileName(); } On 12 September 2011 21:34, Michael Minutillo wrote: > Hey all, > > Hopefully a simple one (or impossible). Is there a way to embed the current > filename into a

Re: Embed file name into compiled source

2011-09-12 Thread Preet Sangha
Doh!!! I mean in the class :-) On 12 September 2011 21:37, Preet Sangha wrote: > in the constructor: > > class x { > > static string currentFile = new System.Diagnostics.StackTrace(true > ).GetFrame(0).GetFileName(); > > } > > > On 12 September 2011 21:34, Michael Minutillo > wrote: > >> He

Re: Embed file name into compiled source

2011-09-12 Thread Michael Minutillo
Perfect. And much simpler than the crazy ideas being bandied about in my brain. Thanks! Michael M. Minutillo Indiscriminate Information Sponge http://codermike.com On Mon, Sep 12, 2011 at 5:38 PM, Preet Sangha wrote: > Doh!!! I mean in the class :-) > > > On 12 September 2011 21:37, Preet Sang

Re: Embed file name into compiled source

2011-09-12 Thread Preet Sangha
Now I dare you to put it into shared library and see it fail :-0 On 12 September 2011 21:45, Michael Minutillo wrote: > Perfect. And much simpler than the crazy ideas being bandied about in my > brain. Thanks! > > Michael M. Minutillo > Indiscriminate Information Sponge > http://codermike.com > >

Re: HEADS UP: Fwd: Microsoft: Windows Azure - Activation Benefits

2011-09-12 Thread Les Hughes
Tony Wright wrote: I seem to get calls from large corporate like Telstra, Big Bank, Big Insurance suggesting they can do me a better deal etc. Then they ask you to verify your identity. I hate this, and refuse to do it. I usually say, give me your extension and I will call the switch and ge

Microsoft Build Conference

2011-09-12 Thread Tony Wright
Hi all, Microsoft Build will be starting tomorrow night. It has sold out, and I was under the impression that they were going to stream it. Does anyone know if this is true, and if so, where we will be able to see the streamed content? Regards, Tony

RE: Embed file name into compiled source

2011-09-12 Thread David Kean
This requires PDBs to be present, and will likely give you the wrong answer in the presence of inlining and tail calls. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Preet Sangha Sent: Monday, September 12, 2011 2:51 AM To: ozDotNet Subject: Re: Embed fi

RE: Microsoft Build Conference

2011-09-12 Thread Andrew Coates (DPE AUSTRALIA)
Keynotes streamed live, sessions available on demand soon after is my understanding. All available from http://www.buildwindows.com/ Cheers Coatsy -Original Message- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Tony Wright Sent: Monday, 12 Se

Re: Embed file name into compiled source

2011-09-12 Thread Wallace Turner
Hi Mike, I know the shortcomings of this but does var filename = typeof (SomeClass).Name; work well enough? If no, why is that out of curiosity? (sorry i want the boring explanation!) On 13/09/2011 1:06 AM, David Kean wrote: This requires PDBs to be present, and will likely give you the wr

Re: Embed file name into compiled source

2011-09-12 Thread Wallace Turner
Hi again Mike, I just read your tweet and saw you wanted the full path, thought as much... Hi Mike, I know the shortcomings of this but does var filename = typeof (SomeClass).Name; work well enough? If no, why is that out of curiosity? (sorry i want the boring explanation!) On 13/09/2011 1

Re: Embed file name into compiled source

2011-09-12 Thread David Richards
I'm surprised this hasn't been mentioned yet but I use: System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase or you can use GetCallingAssembly if that makes more sense. David "If we can hit that bullseye, the rest of the dominoes  will fall like a house of cards... checkmate!"  

Re: Embed file name into compiled source

2011-09-12 Thread Michael Minutillo
Long boring explanation. I have a unit test that searches for a particular pattern in the source code. If the pattern is found it breaks the build. This is not something that I can easily extract from the compiled assembly and I cannot guarantee that the build server is running the unit tests from