|
Wow, pretty good.
Nitpick: You didn't declare IArmour (five points off)
I also question the public abstract class Warrior : IWeapon, IArmour on the basis that that means that a Warrior IS_A Weapon and Armour (which has some merit) rather than HAS_A.
Perhaps the Warrior should have properties for the IWeapon and IArmour.
Warrior Conan = new HumanWarrior() ;
Conan.Weapon = new EnormousBattleAxe() ;
Conan.Armour = new LoinCloth ( Material.Leather ) ;
Conan.Weapon.Strike ( BigAssSnake ) ;
(I only saw the movie once, long ago, so please pardon any mistakes.)
P.S. Whoops, the IWarrior should have a Weapons collection. What was I thinking?
modified on Friday, March 21, 2008 11:44 AM
|
|
|
|
|
I didn't think it was too bad, considering I just threw the code together. Yup you're right - this would have been better with a HAS_A relationship, but I suppose you could argue that a warrior is his weapons and armour.
|
|
|
|
|
Pete O'Hanlon wrote: a warrior is his weapons and armour
I would say that the warrior is the weapon and shield of the king (or whoever).
|
|
|
|
|
Thanks for all the fish wrote: Worior
Worior is spelt warrior... You should perhaps consider using a code spellchecker like Visual Assist X (you'll see the ads for it on some of the pages on Code Project; it's pretty good)
|
|
|
|
|
To me it is a matter of being typesafe. If your property is designed to only take input of Type AlienWeapon and you try to give it a HumanWeapon type it should through an error because of mismatched types, no matter of what the real base type is.
Its the same thing as a property knowing the difference between an Integer and a Long. They both inherit from type Object but they are different enough so that a property expecting a type of Integer will not take a type of Long.
|
|
|
|
|
Hi I’m developing an internet ASP.NET application, which needs to interact with Microsoft Certification Authority Server, the
client (browser) will request a certificate to sign a file (word, pdf) later.
I'm really disoriented. Must I use CAPICOM? Signing in the server, and sending the certificate through an SSL connection? Is
there any class in the .Net Framework to interact with Certification Authority Service without CAPICOM or an external Api?
Where can i get a code example?
Regards
Sergio
|
|
|
|
|
Did you deliberately set out to spam the forums? Or are you just too lazy/ignorant to read the forum guidelines?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Ok, I've got a .NET 1.0 web app that has worked for YEARS until now. All of a sudden I'm getting an error saying "The file or assembly, xxxxxxx.dll, or one of its dependencies cannot be found." Each time the xxxxxxx is a different string of random characters. Now, I've googled this error and everything I've found says this is because the aspnet worker process doesn't have read and write privileges on the %window%\temp directory. Hmmm..... that doesn't make sense. Why would it all of a sudden not have read and write privileges? Well, sure enough, it DOES have full control privileges on the temp directory.
So, does anybody have any OTHER ideas what can be causing this?
Oh yeah....urgent. plz help.
"How come you can't taste your tongue?" - Jon Arbuckle
|
|
|
|
|
FyreWyrm wrote: Why would it all of a sudden not have read and write privileges?
That happens all the time in our enterprise due to the automatic execution (pushing) of GPOs (Group Policy Options) by our network nazis who obviously don't know what they are doing.
led mike
|
|
|
|
|
led mike wrote: GPO
GestaPO?
I just started encountering something similar; the IT director decided that everyone should have the company intranet as their home page (I prefer about:blank). The Sysadmin says that once I set my preference it should stay set and doesn't believe me when I say it stays set while I stay logged in but when I log in in the morning it's back to the company intranet.
|
|
|
|
|
LMAO Yeah, they don't change it daily but still and then the CIO gets on a company wide video conference and takes credit for all the hits they have!
What a bunch of monkeys!
led mike
|
|
|
|
|
Me: Yeah, I was trying to get to a page on MSDN.com and the web filter says it's blocked.
Network Nazi: What was the page?
Me: http://blogs.msdn.com...
Network Nazi: Ah. It's blocked because it's a blog.
Me: OK. I need it unblocked.
Network Nazi: Sorry. All personal blogs are blocked.
Me: Yeah, but I'm a programmer and I need access to this site.
Network Nazi: Sorry. I can't unblock this.
Well, I complained to my supervisor who called our department's Vice President, who called this guy's supervisor. In less than two hours blogs.msdn.com was no longer blocked.
"How come you can't taste your tongue?" - Jon Arbuckle
|
|
|
|
|
I'd like to thank everyone who took the time to answer me. Your responses were overwhelming.
More information on the problem:
This is the only .NET 1.0 app out of about 20 on the server that is having this problem. Also, this is the only app that consumes web services. It just so happens, that this error is only received on pages that consume a web service (which unfortunately the login page does so we couldn't get past go). Switching the vitrual directory for this app to .NET 1.1 fixes the problem.
Conclusion:
The XMLSerializer in .NET 1.0 is not functioning properly. More specifically, the .NET 1.0 installation on this server is FUBAR.
"How come you can't taste your tongue?" - Jon Arbuckle
|
|
|
|
|
Dang, I was gonna say, probably XML Serialization :p
|
|
|
|
|
I appear to have an encoding problem. Cannot use any upper ascii in the email address string. In my particular example, I can't get an umlaut in the address. Add method throws "The specified string is not in the form required for an e-mail address."
MailAddress addr = new MailAddress("tüny@hotmail.com");
to.Add(addr);
I need a kind bump in the right direction as everything works till an address comes along with an umlaut.
|
|
|
|
|
I suggest you read this article[^] on the character limitations imposed on email addresses.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
My client application signs the body of the soap envelope as can be seen below. But the binarysecuritytoken needs to be signed as well.
How can I do that in WSE?
<wsse:Security soap:mustUnderstand="1">
<wsu:Timestamp wsu:Id="Timestamp-23b3b588-1d7e-4d2d-a99c-fdb160cd925f">
<wsu:Created>2008-03-12T09:47:42Z</wsu:Created>
<wsu:Expires>2008-03-12T09:52:42Z</wsu:Expires>
</wsu:Timestamp>
this----> <wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-dfb912bc-1af3-4205-9a5f-87d036806779">xxxxxxx</wsse:BinarySecurityToken>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
....
<Reference URI="#Id-c9da23f8-4b72-4e09-80e3-295c8e94a303">
<Transforms>
<Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue>rHCdlMgaO9pnQvxFp59sSNdiMqA=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>ZotsBPyV8P7EMU09M7PaQjFeByoFeNRgn6exRNm...
<soap:Body wsu:Id="Id-c9da23f8-4b72-4e09-80e3-295c8e94a303">
<downloadFileListin xmlns="http://xyz.fi/Service">
<RequestHeader xmlns="java:fi.bxd.model">
....
<div class="ForumMod">modified on Tuesday, March 18, 2008 3:11 PM</div>
|
|
|
|
|
dear group,
I would like to learn Biztalk Server 2006 with a project.
If any one of you know is there any institute in INDIA.
please let me know.
thanks,
Are
|
|
|
|
|
Hi
Is there a way of getting the last write time of a file that is saved in an IsolatedStorage?. I need to synchronize some files between IsolatedStorage and a shared folder from the net. To do it a need the last time they were written.
Thanks in advance.
Benjamin
|
|
|
|
|
Hi!
I am developing a web application which contains a WinForm Control and an Infragistcs menu. If the WinForm Control is displayed, even an empty one, the menu doesn´t expand correctly. When I move the mouse on the header of the menu, it expands half and I have to move the mouse again, to let it expand completly.
Thanks in advance.
Jannis
|
|
|
|
|
I would suspect that you should run this one on the Infragistics forums.
|
|
|
|
|
My application uses the .NET framework 2.0
it works fine on Windows XP but it does not work on Windows Vista.
As I understand the .net framework 2.0 is a apart of Windows Vista.
So why do you think my application does not work on Vista?
Mohammed Said Emam Osman
Software Engineer
|
|
|
|
|
We haven't got a clue. You need to tell us what errors you are getting.
Kevin
|
|
|
|
|
Mohammed Emam wrote:
So why do you think my application does not work on Vista?
Have not idea since you failed to describe what is going wrong....
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I'm guessing that your application is breaking some of the Vista no-no rules.
|
|
|
|