LearnLanguages.DataAccess.DalHelper.CheckAuthorizationMustRunOnServer C# (CSharp) Method

CheckAuthorizationMustRunOnServer() public static method

public static CheckAuthorizationMustRunOnServer ( ) : void
return void
    public static void CheckAuthorizationMustRunOnServer()
    {
#if SILVERLIGHT
      throw new Exceptions.MustRunOnServerException();
#endif
    }
  }

Usage Example

Example #1
0
        public Result <UserDto> Fetch(string username)
        {
            Result <UserDto> retResult = Result <UserDto> .Undefined(null);

            try
            {
                DalHelper.CheckAuthorizationMustRunOnServer();

                //Common.CommonHelper.CheckAuthentication();

                var userDto = FetchImpl(username);
                if (userDto == null)
                {
                    throw new Exceptions.UsernameNotFoundException(username);
                }
                retResult = Result <UserDto> .Success(userDto);
            }
            catch (Exception ex)
            {
                var wrapperEx = new Exceptions.GetUserFailedException(ex, username);
                retResult = Result <UserDto> .FailureWithInfo(null, wrapperEx);
            }

            return(retResult);
        }
All Usage Examples Of LearnLanguages.DataAccess.DalHelper::CheckAuthorizationMustRunOnServer