On Jun 17, 2008, at 11:53 AM, Paul McNett wrote:
>> public Address GetAddress(Guid addressId)
>> {
>> //Verfiy Validity of arguments
>> if (addressId == Guid.Empty)
>> {
>> InvalidArgumentFaultDetail.ThrowException("addressId",
>> "addressId cannot be null.");
>> }
>>
>> //Get the current user
>> UserIdentity user =
>> ((UserIdentity)ServiceSecurityContext.Current.PrimaryIdentity);
>>
>> //Run the query
>
> Pardon me, but *yuck*!
Just what I was thinking. I much prefer:
import securityContext
def getAddress(addressID):
if not addressID:
raise ValueError, "Address ID cannot be null"
user = securityContext.currentUser.primaryID
# Run the query
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.