Is there a way to pass a type of a class as the value in Spring.NET?
My Dictionary looks like this:
private Dictionary<int, Type> ContentItemTypes { get; set; }
In code I would initialize as:
registry.addContentItemType(0, typeof(ContentItem));
How do you do this in Spring.NET. So far I have this:
<object id="ContentItemTypeRegis...
In my application I have dropdown list with several items. I'd like to show a context menu when the user clicks the right mouse button on a dropdown item. Is this possible? And if it is possible, how?
...
We are having 7 different components and 7 different enviournments where we install all of these components.
So when these components are installed on these different env there are chances that we missout changing the server names in urls.
Any suggestions of managing these many eviournment config files in nicely fashioned way.
...
Any help or pointers would be great on this, I'm going through the ASP.NET chart controls WebSamples project but I haven't found what I'm looking for yet. So basically if I had a standard bar chart with data such as below:
John - 68%
Fred - 75%
Mary - 32%
Anne - 88%
Displaying it in one series with names as the x axis and percentages ...
My application needs to identify every form of every opened application. For example, if i press "Ctrl+f1" when i am in any application(lets say microsoft outlook), and if i am in the "new message" form, i need to send a message to my application with the following information:
process=outlook.exe
form="new message" form id? (or whate...
I created a custom treeview control that inherits from TreeView control. I have my own TreeNodes and event args but when the tree node is rendered I get:
<a id="ctl00_ContentPlaceHolder1_navTreet0" style="text-decoration: none;" onclick="TreeView_SelectNode(ctl00_ContentPlaceHolder1_navTree_Data, this,'ctl00_ContentPlaceHolder1_navTree...
I have WCF services structured like suggested by Miguel Castro. This means that I have set everything up manually, and have a console application hosting my services using ServiceHost objects.
I want to keep my service classes thin, and they are currently just passing on calls to behavior classes. My problem now is unit testing the ser...
I have an HTTP Handler that is binding an XmlTextWriter instance to Response.Output like so...
Sub GenerateXml(ByRef Response As HttpWebResponse)
Using Writer As New XmlTextWriter(Response.Output)
' Build XML
End Using
End Sub
And now I also want the same XML to be saved to the local hard drive (in addition to being st...
This is the code for function that I use for setting folder permission:
Public Sub AddFileSecurity(ByVal filePath As String, ByVal username As String, ByVal power As String)
Dim dirinfo As DirectoryInfo = New DirectoryInfo(filePath)
Dim dirsecurity As DirectorySecurity = dirinfo.GetAccessControl()
Select Case...
I would like to learn from and possibly use the section serializer that Jeff Attwood posted in his The Last Configuration Section Handler.. Revisited blog posting. But, alas, it appears to have been lost in the great coding horror backup failure.
Does anybody have a copy, or similar code that I can learn from or use?
...
I used to work with a custom data mapping library, and curently I'm trying to switch to a more widespread ORM solution.
After some experimentation, I refined my requirements to the following:
able to generate usable classes from database schema (SQL Server support is enough),
support for ActiveRecord pattern,
programmaticaly configura...
I need to monitor several systems going thru stress testing. I want to make a client-server .NET(C#) application that will ping the systems to check temperature, memory usage etc.
The client will provide system info (cpu-mem-hdd configuration) at start then it will undergo through several benchmark/stress tests. The server will keep tr...
I have two tables:
CalendarEntry
Id
Date
...
Holiday
Id
Date
...
In my CalendarEntry class, I have a property like this
public ISet<Holiday> Holidays { ... }
which I want to associate to the Holiday instances that occur on the same Date as the CalendarEntry. However, I can't come up with how to do this.
I've tried ma...
Hello everyone,
I have made a generic save function for EF:
public void Save(T entity)
{
using (C context = new C())
{
string entitySetName = context.FindEntitySetByEntity<T>();
T entityInDDBB = GetEntityByKey(entity, entitySetName, context);
//if we didn't find the entity in da...
Hi there.
Is there a way to create LINQ query that will have different grouping fields.
I.E. I have a class
public class Stat
{
public DateTime Date { get; set; }
public int ApplicationId { get; set; }
public int ActionType { get; set; }
public string Version { get; set; }
}
Now I need to query table with t...
I want to create a .NET assembly that can be accessed from unmanaged code (Delphi 5).
I have found Unmanaged Exports and followed the steps there but I am unable to successfuly compile even the basic example:
using RGiesecke.DllExport;
namespace DelphiNET
{
public class Class1
{
[DllExport("add")]
public stati...
I tried this:
http://channel9.msdn.com/posts/RobBagby/deCast-Entity-Framework-Modeling-Implementing-Entity-Splitting/Default.aspx?wa=wsignin1.0
...with the Northwind sample database from Codeplex, using the Employee and Contact tables. I wanted to create a EmployeeContact entity that basically pulls in the FirstName and LastName column...
Anybody have any idea why the BCL team chose to use Byte* instead of IntPtr in the constructors for UnmanagedMemoryStream? This forces you into using an unsafe context in order to construct the type. It seems like they could have used IntPtr and that wouldn't have forced the unsafe context.
...
I have a solution in C# that has 1 main project Kingrey (exe) and one project called DllReporter and another called ProductReportClasses.
When I do try to list all assemblies in my exe from DllReporter level:
AppDomain.CurrentDomain.GetAssemblies()
I get only Kingrey and DllReporter, but not ProductReportClasses.
But when I di this ...
I have a C# class library that contains several resources files organized in folders. Since I want the generated classes to be all in the same namespace I'm setting the CustomToolNamespace property of each resource file.
However I discovered through Reflector that although the classes are all being generated in the same namespace the pa...