|
Can they span multiple assemblys (sp)? I am assuming that they can, but can’t seem to find anything that says definitively 'YES'. I will admit that it is late and I am probably not searching right on Goggle... but I just can't find it...
Also, Are there any recommendations for namespace hierarchies? I am considering:
[company_name]
[app_name]
[section_name1]
…..
[section_name2]
I assume that if I set the root namespace for each project to [company_name] then preced each class with the ‘namespace’ directive for [app_name] I can then nest the [section_name] namespaces inside of that.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
Ray Cassick wrote:
but can’t seem to find anything that says definitively 'YES'.
'YES'
This is used extensively throughout the framework, especially when you look at the assemblies that are meant to assist development (System.Design.dll).
Ray Cassick wrote:
I assume that if I set the root namespace for each project to [company_name] then preced each class with the ‘namespace’ directive for [app_name] I can then nest the [section_name] namespaces inside of that.
Pretty much
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
|
|
Has anyone here used it for any projects?
Log4net clickety[^]
I have been looking it over for a project and am looking for some other impartial views of it.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
|
|
|
|
|
|
I've not used NUnit yet, but I do plan on including it with the development of my University degree's final year project (a big distributed commercial web service -- see a post below for a basic overview).
Anyway, NUnit is just a way of building automated unit tests, with the aim of producing a suite of tests that you can run to prove that the code does what it's supposed to -- and that anything you add hasn't broken something old.
The way I'm looking at including it from the outset (you add attributes 'n stuff ) is around a kind of one-person eXtreme Programming. By using these tests I can ensure to a certain degree that the code is successful, and should give me some good info to put in the report with regards to testing.
The other thing about XP (as far as I've understood it) is that one of the aims is to build elements of a system as quickly as possible, once its functional you move on. So I can do tests for features, once the tests complete ok I can move on ... there isn't a great deal of design involved before the coding.
I have to say its quite bureaucratic (including all this NUnit testing support) but I'm hoping it'll be worthwhile in the long-run, and should be a good learning experience.
--
Paul
"If you can keep your head when all around you have lost theirs, then you probably haven't understood the seriousness of the situation."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
Use NUnit (and NAnt which is awesome) for team development: daily builds and automated testing are essential whenever you're working with others on a project.
I didn't look into Log4net yet; i think it uses the pattern of Listeners which you can attach to a general logging system; just as you can do with the Trace classes in .NET
Gertjan Schuurmans
Amsterdam
The Netherlands
|
|
|
|
|
The "current node" is not the node that I am right clicking on to bring up the popup menu.
The menu handler looks like this:
private void mnuAddElement_Click(object sender, System.EventArgs e)
{
TreeNode tn=tvSchema.SelectedNode;
tn.Nodes.Add(new TreeNode("Element"));
tn.Expand();
}
And the node is correctly highlighted, but after adding the new node the highlight reverts back to whatever node was selected using a left click.
What do I do about this? I want it to work like it should--right clicking operates on the node that the user clicked on, not the last left-clicked node.
Help!
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka
|
|
|
|
|
|
Thanks!
Almost works. The mouse position by this point is over the item the user clicked in the popup menu.
You led me down the correct path though, which is to write a mouse down event handler:
private void EventMouseDown(object sender, MouseEventArgs e)
{
tn=tvSchema.GetNodeAt(e.X, e.Y);
}
and save the node the user clicked on.
Note that it has to be a mouse down event. I tried mouse up, but that doesn't fire until the popup menu is done, and thus the mouse position is again wrong.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka
|
|
|
|
|
I've got a Windows Forms application (C#) and I have several cursors that I've drawn which I want to be able to embed in the application. I am able to load the cursors from a file, but not as an embedded resource.
Can anyone give me some pointers about how this is accomplished? I am using VisualStudio.Net.
Thanks.
|
|
|
|
|
Ok, this is going to be a little off-topic, but its a .NET Architectural-type question.
I'm working on the architecture to my University final year project, which is based around a commercial XML Web Service providing access to high performance analytics (courtesy of a third-party database).
However, it will also need to perform a number of menial housekeeping work too -- providing audit trails, reporting etc. It would be useful to have some kind of application that can effectively monitor the web-service too, i.e. current load that kind of thing.
I am considering using the following design:
ASP.NET Web Service <----> Windows Service <-----> Databases
With the Windows Service providing access to all the gubbins that hooks the web service together. That way, an administrative application can then access the windows service to get at the reporting info.
Does anyone have any opinions, or suggestions as to how this kind of thing might be done?
Alternatively I'd thought about adding filters using Microsoft's recently released Web Services Enhancements pack. Adding filters for logging requests etc.
All opinions would be greatly received,
--
Paul
"If you can keep your head when all around you have lost theirs, then you probably haven't understood the seriousness of the situation."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Sonork: 100.22446
|
|
|
|
|
Hi Paul,
Having this pipeline from Web Service -> Windows Service -> Database and back forces you to write (and debug) a lot of soap and remoting stuff (from outside to the WebSvc and back, from the ASP.NET Web Service to the Windows Service (remoting) and vice versa.
Consider the following approach:
Windows UI/Console client [*remoted]
|
Windows Service
|
v
Internet <---> ASP.NET <--> Busines Logic DLL <--> Database
^
|
Windows UI/Console client [*simple]
This way you can concentrate on core functionality by developing the Busines Logic Class Library and add all kinds of connectivity afterwards.
greetings,
Gertjan Schuurmans
Amsterdam
The Netherlands
|
|
|
|
|
I'd like a "BetaExpiration" attribute (DECLARITIVE security) on my classes that is enforced automatically when the assembly containing the classes is used. A security exception should be thrown if the classes are being used outside beta period.
[AllowedUse(From = "2003-1-30")]
public class x
{
public x()
{}
}
CodeAccessSecurity permission is the way to do it and I've already got an test implementation. The major problem is that my custom CodeAccessSecurity derived permission assembly should be registered on the user's machine using CasPol etc for the .Net security system to find and use it. This is not desirable. The app should just be installed and my custom codesecurity access should be enforced...
Another way is implement another custom permissing, implement IPermission, ISecurityEncodable. Unfortunately, the declarative notation is never instantiated, unless I do it myself in code; the imparative method is working fine, but I'd like to use attributes for this!
public x()
{
AllowedUse2 au = new AllowedUse2();
au.From = "2003-1-30";
au.Demand();
}
Does anyone have a bright idea how to enforce custom CodeAccessSecurity using declarative notation without requiring .Net registration of the permission assembly?
Victor
|
|
|
|
|
Never mind, I thought of a solution.
VictorV
|
|
|
|
|
On many newsgroups/forums have I repeatedly seen the question: "How do I bind a TreeView to a datasource?" Now, I'm attempting to create a DataTreeView by inheriting from TreeView and providing complex data-binding, but have run into many design issues. I have seen several solutions, such as the ones here:
http://msdn.microsoft.com/library/en-us/dnwinforms/html/custcntrlsamp3.asp#custcntrlsamp3_download
http://www.abderaware.com/WhitePapers/datatreeview.htm
However, the problem with all these solutions (and many other things .NET) is their exclusive focus on DataSets. I'm trying to create a more versatile control that can additionally support actual tree structures, lists of lists, or any other class.
One solution I considered - specifying a DisplayMember/ValueMember/ChildCollectionMember for the control - limits you to using a single type throughout the entire tree (or at least all types with the same display/value/children property names).
Another solution requires ITreeNode and ITreeNodeCollection interfaces to be implemented by the data source. For existing classes like the DataSet, this means either re-implementation or ITreeNode/Collection "adapter" classes. This is the best I've come up with, but I'm wondering if anybody can provide me with some more insight and/or has already done this (since a databound TreeView is one of the more sought-after controls). Or better yet, have an article that discusses how to accomplish this on the site.
What? Were you expecting something witty or funny here?
|
|
|
|
|
Hi all, I was wondering if anyone out there had tried using .NET objects from a pre-.NET scripting environment (I want to use Windows Script hosted JScript). I'm sure it is possible through COM interop, but can anyone tell me of an article or web page to get this running quickly and easily?
Thanks for any suggestions,
Nick
|
|
|
|
|
You can call a .NET component from the outside world. That's done through CCW, COM Callable wrapper, which is by the way the keyword to use to find articles on Cp, MSDN, ...
The procedure is as follows :
- write a component using C#, or whatever .NET language you can think of
- register the component to the unmanaged world using the regasm.exe cmdline. Doing so, this component looks like a standard COM component, except the fact that the InProcServer32/LocalServer32 registry key points to mscoree.dll instead (that's the CLR entry point).
- use JScript to create an instance of this object. Here is how you create COM instances :
var ExcelSheet;
ExcelApp = new ActiveXObject("Excel.Application");
ExcelSheet = new ActiveXObject("Excel.Sheet");
ExcelSheet.Application.Visible = true;
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column A, row 1";
ExcelSheet.SaveAs("C:\\TEST.XLS");
ExcelSheet.Application.Quit();
A useful link[^] on MSDN.
|
|
|
|
|
Thanks, I looked around for a while but unless you know a couple of 'magic keywords' like CCW its pretty hard to search for anything containing .NET and JScript. Thanks again, there are a world of cool possibilities for this stuff
|
|
|
|
|
Does anyone know if there are .Net file exists/delete methods that will handle wildcards? File.Exist and File.Delete do not. Thankyou!!
Lorne
|
|
|
|
|
|
Hello,
I've got a C# windows app and I'd like to keep the resources in a centralized place so I've added a resx file to my project where I store all my english strings. This is I guess what they call an embedded resource. My question is, can I add another resx file to hold my german strings and embed it into the same assembly? If so, can anyone pls outline how to do that?
Thanks in advance. Any help is highly appreceated.
Matthias
In theory, there is no difference between theory and practice. In practice, however, there is.
(unknown author)
|
|
|
|
|
Matthias Steinbart wrote:
embed it into the same assembly
Although it's probably doable, I don't recommend it. It's part of the usefulness of assemblies to have a culture attached to them (AssemblyInfo.cs file). Typically you provide an assembly for each supported culture, and doing so the run-time automatically loads the appropriate assembly. This saves you time, effort, plumbering, and... bugs.
|
|
|
|
|
Hi all,
What is the easiest way to tell if a computer has the .NET Framework installed? The more non-technical the better. Is it the same for each OS or are there different methods?
Thanks in advance
Andy
|
|
|
|