The other day there was a thread in a newsgroup which ended up discussing object pooling. Jon pointed to Spring.NET — an application framework for enterprise .NET applications. I’m sure there are other implementations out there, at the moment, Spring.NET merely offers a few interfaces and a rather simplistic implementation of a pool. I thought it might be interesting to people to see how pooling functionality can be implemented, so I’m going to do that for this article, which is supposed to be …
Some things have been changing around here — I was always largely preoccupied with work for one specific customer of mine. This has now stopped and so I’m looking into other things to do. To start with, I have put up a few informational pages at www.sturmnet.org — nothing too detailed yet, just on overview. So, if you have project work to be done, or consulting needs, please think of me, look up my resume and contact me!
I just had a look at Processing, which is an environment, based on Java, that lets you create graphics output easily. I’m not remotely doing the thing justice here, better look at the project page for that, and be sure to view the samples! The idea is great: an editor can be used to create a source code file, which is usually very simple and can be run on the fly, for example rendering some kind of graphics output in a window. When you think you have finished what you were working on, just hit …
I saw this question on a newsgroup: How do you access the properties of a project via the EnvDTE VS extensibility interface? It’s really quite simple, like in this code:
Sub AccessProject()
Dim proj As Project
proj = DTE.Solution.Projects.Item(1)
Dim prop As [Property]
For Each prop In proj.Properties
Debug.Print("Project property " & prop.Name & " = " & prop.Value)
Next
Dim projItem As ProjectItem
For Each projItem In proj.ProjectItems
Debug.Print("Project item " & ...
In a VSPackage using the Managed Package Framework (MPF), how do you track the active editor pane in VS? To start with, I create a new VSPackage project (New project -> Other project types -> Extensibility -> Visual Studio Integration Package) and have the wizard create a C# based project with a tool window for me. From the standard button click (to keep things under control easily), I run the following initialization code:
DTE dte = (DTE) GetService(typeof(DTE));
Window outputWindo ...
VSIP 2005 has been available a while, but I hadn’t found the time to look into it. Now I did and I must say I’m impressed, especially by the new managed classes in the Environment SDK. For example, it’s now possible to create a custom editor for Visual Studio completely in C#, and creating a tool window in managed code is really a matter of a few lines. Great work, I’ll have to have a much closer look at this managed stuff!
In a project on which I’m currently working, I had these classes:
class MultiCriteria : Criteria {
public MultiCriteria(params Criteria[] criteria) {
criteriaList = new BindingList<Criteria>(criteria);
}
private BindingList<Criteria> criteriaList;
public BindingList<Criteria> CriteriaList {
get { return criteriaList; }
set { criteriaList = value; }
}
}
class AllCriteria : MultiCriteria {
public AllCriteria() { }
public AllCriteria(params Criteria[] criteri ...
I’ve been to my first London .NET User Group meeting yesterday, and it was good. People were friendly, sessions were interesting and everything was well organised. I can only recommend this to everybody who hasn’t been there yet!