Beispiel #1
0
        /// <summary>
        /// Retreive a user's profile from the database.
        /// </summary>
        /// <param name="identity">An authenticated user's identity with a username that
        /// matches a user in the Users table.</param>
        /// <returns>An object representing the profile of the user.  Return value can be a string,
        /// deserialized object, or a Hashtable of values.</returns>
        /// <remarks>
        /// <strong>Null</strong> is returned if the user or profile does not exist.</remarks>
        public object GetProfile(IIdentity identity)
        {
            ArgumentValidation.CheckForNullReference(identity, "identity");

            byte[] serializedProfile = LoadProfile(identity.Name);

            SecurityProfileLoadEvent.Fire(identity.Name);

            object profile = null;

            if (serializedProfile != null)
            {
                profile = DeserializeProfile(serializedProfile);
            }

            return(profile);
        }
Beispiel #2
0
 private void FireSecurityProfileLoadEvent()
 {
     SecurityProfileLoadEvent.Fire(testMessage);
 }
 private void FireSecurityProfileLoadEvent()
 {
     SecurityProfileLoadEvent.Fire("test");
 }