I am using a dictionary in castle windsor configuration to build an
authenticator factory.  The dictionary key represents a URL  and then
the object represents each specific authenticator service.

//config
<component id="AuthenticatorFactory" lifestyle="singleton"
service="Security.IAuthenticatorFactory, Security"
type="Security.AuthenticatorFactory, Security">
        <parameters>
          <authenticators>
            <dictionary>
              <entry key="https://smpc.acme.com/sts/sts.svc/
anonymoususer">${AnonymousUserAuthenticator}</entry>
              <entry key="https://wcvpc-w7.acme.com/sts/sts.svc/
anonymoususer">${AnonymousUserAuthenticator}</entry>
              <entry key="https://tkpc.acme.com/sts/sts.svc/
anonymoususer">${AnonymousUserAuthenticator}</entry>
            </dictionary>
           </authenticators>
          </parameters>
      </component>

//code
public class AuthenticatorFactory : IAuthenticatorFactory
{
        private Dictionary<string, IAuthenticator> m_authenticators =
new Dictionary<string, IAuthenticator>();

        public AuthenticatorFactory(Dictionary<string, IAuthenticator>
authenticators)
        {
                m_authenticators = authenticators;
        }

        public IAuthenticator GetAuthenticator(string url)
        {
            IAuthenticator retVal = null;

            if (m_authenticators.ContainsKey(url))
            {
                retVal = m_authenticators[url.ToString()];
            }

            return retVal;
        }
}

By default the dictionary appears to be case sensitive.  Is there a
way to have castle construction a case insensitive dictionary?



scottm

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to