Ooh, thank you Greg! Currying explained in C#, just days after I was trying
to explain it to a colleague, and was still trying to understand it
practically.
> -Original Message-
> From: Discussion of advanced .NET topics. [mailto:ADVANCED-
> [EMAIL PROTECTED] On Behalf Of Greg Young
> Sen
C is a best practice ... It is much more clear to name it double ...
but for all of this code I think the inheritance model is a terrible
fit ... I prefer http://diditwith.net/2007/08/15/TheArtOfCurrying.aspx
Cheers,
Greg
On Nov 21, 2007 9:35 AM, Abhijit Gadkari <[EMAIL PROTECTED]> wrote:
> Cor
Correct me if I am wrong, this is what I understood
A. If you override, do it because you want to extend the existing
functionality but not to replace the existing functionality from the base
class
B. override will break the substitution
C. Avoid functional polymorphism for example, as sug
Yes, the built-in multilingual support in WinForms is dependant on culture
names (like "en-US"). If you wanted to use the built-in functionality
you'd have to create and install your own locales.
I've seen people use dictionaries, as Paul mentioned. I've also seen
people use database lookups, wr
I did something similar recently.
I stored all the values in a Singleton which contains a dictionary of values
and then I used an Enum as an indexer.
I also had to give each name a singular or plural meaning.
It relies on the FillDictionary method being called. This means you can fill
it wit
I've got an application that I want to install for multiple clientsall
use English as the principle language but each client has (different)
specific terms for specific domain specific things...
e.g. what is ones clients 'IS department' is 'Technology' for another
client.
so the functionality
On Tue, 20 Nov 2007 13:36:41 -0500, Abhijit Gadkari
<[EMAIL PROTECTED]> wrote:
>I was doing some code review. I saw something interesting Liskov
>implementation. [for more info, check out
>http://en.wikipedia.org/wiki/Liskov_substitution_principle]
>
>Here is the sample implementation of the sam
So I can pass a delegate into GetAll.
Then I can overload GetAll and not break the existing.
I'll think that is a good way Frans
[EMAIL PROTECTED]
> Date: Wed, 21 Nov 2007 11:23:33 +0100> From: [EMAIL PROTECTED]> Subject: Re:
> [ADVANCED-DOTNET] Code review> To: ADVANCED-DOTNET@DISCUSS.DE
I tend to create a couple of IsInRole overloads (or utility methods if are
using a sealed IIdentity & IPrincipal) to help...
usually
bool IsInRoleAll(roles string())
bool IsInRoleAny(roles string())
-Original Message-
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] B
> That is a good point about the ordering of roles.
> That is definitely flaky.
>
> But I will still be left with the inline if statements.
>
> Can I somehow abstract them away from the method?
You could do it like:
businessFunctions = CommonService.GetAll(
"Deleted",
Secur
Hi Paul,
Use Tracing as well as use Profile like RedGate's ANTS Profiler or
Jetbrains Profiler, they are both great and well worth the money, they
will go to extent to even find our slowest lines of code.
Also have a close look at SQL Profiler, I think 90% of web pages
unresponsiveness happens b
That is a good point about the ordering of roles.
That is definitely flaky.
But I will still be left with the inline if statements.
Can I somehow abstract them away from the [EMAIL PROTECTED]
> Date: Wed, 21 Nov 2007 09:49:15 +0100> From: [EMAIL PROTECTED]> Subject: Re:
> [ADVANCED-DOTNET
> I am writing an ASP.NET application that is heavily influenced by users and
> roles. I am finding my code becoming increasing cluttered with the
following
> type of thing:
> IList businessFunctions;
> if (CurrentUser.RoleIsAbove(Role.BusinessUnitAdmin))
> {
> if (CurrentUser.IsSystemAdmin)
>
Hi all,
I am writing an ASP.NET application that is heavily influenced by users and
roles. I am finding my code becoming increasing cluttered with the following
type of thing:
IList businessFunctions;
if (CurrentUser.RoleIsAbove(Role.BusinessUnitAdmin))
{
if (CurrentUser.IsSystemAdmin)
14 matches
Mail list logo