Click here to Skip to main content
15,917,005 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: When Worlds (or best practices) Collide Pin
Marc Clifton18-Jul-17 5:03
mvaMarc Clifton18-Jul-17 5:03 
GeneralRe: When Worlds (or best practices) Collide Pin
jschell19-Jul-17 8:02
jschell19-Jul-17 8:02 
GeneralRe: When Worlds (or best practices) Collide Pin
KarstenK18-Jul-17 4:32
mveKarstenK18-Jul-17 4:32 
GeneralRe: When Worlds (or best practices) Collide Pin
Marc Clifton18-Jul-17 4:48
mvaMarc Clifton18-Jul-17 4:48 
JokeRe: When Worlds (or best practices) Collide Pin
User 1106097918-Jul-17 5:13
User 1106097918-Jul-17 5:13 
GeneralRe: When Worlds (or best practices) Collide Pin
Sander Rossel18-Jul-17 5:50
professionalSander Rossel18-Jul-17 5:50 
GeneralRe: When Worlds (or best practices) Collide Pin
Gary Wheeler18-Jul-17 6:24
Gary Wheeler18-Jul-17 6:24 
GeneralRe: When Worlds (or best practices) Collide Pin
TheGreatAndPowerfulOz18-Jul-17 6:32
TheGreatAndPowerfulOz18-Jul-17 6:32 
It's understandable that you wrote VerifyToken that way. Seems logical and "Clean" - you're not repeating yourself. But at the cost of introducing a dependency on 'IContext' in VerifyToken that has nothing to do with it's job. So, in my way of thinking, that's not "Clean". Consequently you can repeat yourself or find another way, maybe more correct, to report the error.

Another option is to refactor the code a bit. Have one function VerifyToken() and have another VerfyTokenAndRespondIfBad(). The second would call the first.
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun

GeneralRe: When Worlds (or best practices) Collide Pin
_Maxxx_18-Jul-17 17:10
professional_Maxxx_18-Jul-17 17:10 
GeneralRe: When Worlds (or best practices) Collide Pin
Vivi Chellappa18-Jul-17 21:14
professionalVivi Chellappa18-Jul-17 21:14 
GeneralRe: When Worlds (or best practices) Collide Pin
Jirajha18-Jul-17 22:52
professionalJirajha18-Jul-17 22:52 
GeneralIdentical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
ZurdoDev18-Jul-17 3:05
professionalZurdoDev18-Jul-17 3:05 
GeneralRe: Identical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
Jacquers18-Jul-17 3:18
Jacquers18-Jul-17 3:18 
GeneralRe: Identical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
Darkness_0718-Jul-17 3:34
Darkness_0718-Jul-17 3:34 
GeneralRe: Identical Looking Strangers Seated Together on Plane; Same Hotel, Too Pin
MacSpudster18-Jul-17 4:21
professionalMacSpudster18-Jul-17 4:21 
RantThe USA, Liberia and Myanmar Pin
Cornelius Henning18-Jul-17 1:03
professionalCornelius Henning18-Jul-17 1:03 
GeneralRe: The USA, Liberia and Myanmar Pin
Richard Deeming18-Jul-17 1:06
mveRichard Deeming18-Jul-17 1:06 
GeneralRe: The USA, Liberia and Myanmar Pin
OriginalGriff18-Jul-17 1:14
mveOriginalGriff18-Jul-17 1:14 
GeneralRe: The USA, Liberia and Myanmar Pin
Richard Deeming18-Jul-17 1:24
mveRichard Deeming18-Jul-17 1:24 
GeneralRe: The USA, Liberia and Myanmar Pin
CodeWraith18-Jul-17 1:27
CodeWraith18-Jul-17 1:27 
GeneralRe: The USA, Liberia and Myanmar Pin
OriginalGriff18-Jul-17 1:36
mveOriginalGriff18-Jul-17 1:36 
GeneralRe: The USA, Liberia and Myanmar Pin
Daniel Pfeffer18-Jul-17 1:52
professionalDaniel Pfeffer18-Jul-17 1:52 
GeneralRe: The USA, Liberia and Myanmar Pin
OriginalGriff18-Jul-17 2:06
mveOriginalGriff18-Jul-17 2:06 
GeneralRe: The USA, Liberia and Myanmar Pin
CodeWraith18-Jul-17 2:15
CodeWraith18-Jul-17 2:15 
GeneralRe: The USA, Liberia and Myanmar Pin
Cornelius Henning18-Jul-17 2:16
professionalCornelius Henning18-Jul-17 2:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.