Using T4 code generation, is it possible to access the types defined in the current project?
For example, if I have an interface and I want to delegate its implementation to another class, i.e.
interface IDoSomething {
public void do_something();
}
class DoSomethingImpl : IDoSomething {
public void do_something() {
// ...
I've got an HIMAGELIST (from SetupDiGetClassImageList) and I'd like to use it with a Windows Forms ListView, which needs an ImageList. There's no ImageList.FromHandle.
How do I use my HIMAGELIST as an ImageList?
...
I've got a bunch of IDisposable objects in a lookup table (plain old Dictionary<>, right now), but to simplify the code and avoid error's I'm looking for a collection class which "owns" the items it holds, and to avoid reinventing the wheel - does such a class already exist?
The specification should be that:
- The collection must be di...
I'm using DDD and NHibernate to persist my domain object. In my database every table that is related to an entity has four extra columns (CreatedBy, UpdatedBy, CreatedDate, UpdatedDate) used for audit tracking. I am using the repository pattern that only allows aggregate roots to be saved. When NHibernate tries to save the entities on th...
Is there a .NET component out there that is similar to Firefox's location bar?
I need all the features of the Firefox address bar, but I want to control the "history" from which the suggestions are made.
This is for Winforms or WPF.
...
I did some refactoring of an application framework, and now the form designer behaves in a weird way - after a rebuild, it crashes with a EntryPointNotFoundException until Visual Studio is started again.
Background
The framework consists of several projects, all in one solution. The projects have several dependencies between each other...
I am using some custom WebParts in SharePoint like (http://www.codeplex.com/smartpart) with some controls. I have more than one WebPart at different pages. How is it possible to link them together? For example at the button click event handler or the hyper link target what should be URL to navigate to?
...
For a number of reasons, I have to use floats in my code instead of doubles. To use a literal in my code, I have to write something like:
float f = 0.75F;
or the compiler will barf since it treats just "0.75" as a double. Is there anything I can put in my code or set in Visual Studio that will make it treat a literal like "0.75" as ...
What's the easiest way to get RPC in .NET? I see that there is .NET Remoting and WCF, and according to Wikipedia, WCF is the successor to .NET Remoting.
So far, I only tried the remoting stuff, which seems to be pretty simple -- I also didn't hit any problem with the application speed so far. Is .NET remoting really the best way to get ...
I spent a good portion of time last week working on serialization. During that time I found many examples utilizing either the BinaryFormatter or XmlSerializer. Unfortunately, what I did not find were any examples comprehensively detailing the differences between the two.
The genesis of my curiosity lies in why the BinaryFormatter is ab...
If you wanted to alter the way that routes were processed can you do that in a MVC project OR do you have to alter the MVC Framework?
For example lets say you have the standard code in RegisterRoutes of Global.asax.cs:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
...
I have the below sub which checks all of a node's child nodes in a Windows form treeview when the node is checked. I get the error stated in the subject whenever I click it, but this only happens when settings the checked property. If I just run the commented out MsgBox line, it works fine with no errors.
Private Sub TreeView1_AfterChec...
I'm running XP home which doesn't support IIS. Therefore i'm running Cassini.
It usually works well. How ever i've notice in the last 2 weeks it crashes. I'm guessing there is some conflict. Perhaps something i've installed recently tho i can't work out what.
How can i work what is conflicting, also i've read about running it on a di...
Hello gurus,
I have a desktop application sending/receiving messages (not files) to/from a WCF service.
How do I intercept the total size of the message to be transferred and receive feedback (number of bytes transferred) during the transmission so a progress bar maybe displayed to the desktop app user?
How many approaches are there...
I have learned a good deal of XNA in 2D and have created a good number of the classic games using XNA (Breakout, pong, a platformer, tetris) and feel quite confident about using it. I managed this using guesswork and Microsoft's meager 2D XNA tutorials.
However, now I want to begin to learn how to code games in 3D and it seems there is...
When using .NET's Process.SessionId property or the Windows API call ProcessIdToSessionId(), can the result be relied on to be the same throughout the lifetime of the process?
i.e. If I want to use this value, do I only have to determine what it is once?
...
I'd like to save the state of my machine before shutdown (for machines that do not support hibernate).
Essentially, I'm trying to mimic the Windows Hibernate feature. When the machine its turned back on, it looks exactly like it did previous to being shut down.
Any ideas on using managed code to perform this task?
Currently using/co...
I want to do something like this:
Create a number of assemblies that implement IMyInterface.
In the web.config or app.config of my application, define which one of them to load (they may have different names)
When the application starts, load the assembly as marked in web.config and use its implementation of IMyInterface
what is the ...
Hi all,
I'm having a problem installing a windows service using the Setup & Deployment Method listed on the msdn website.
Here's what i did.
I created a dummy windows service.
I then created an projectInstaller for that service by right clicking on my service in design mode and choosing add an installer.
After that i created a separa...
I am currently working on an application that parses huge XML files.
For each file, there will be different processes but all of them will be parsed into a single object model.
Currently, the objects parsed from each XML file will go into a single collection.
This collection is also used during parsing, e.g. if a similar object alread...