The indexer on SecurityTokenHandlerCollectionManager
is not read-only:
// Summary:
// Returns the security token handler collection for the specified usage.
//
// Parameters:
// usage:
// The usage name for the token handler collection.
//
// Returns:
// The token handler collection associated with the specified usage.
public SecurityTokenHandlerCollection this[string usage] { get; set; }
Simply set the SecurityTokenHandlerCollection
for the given key to the desired collection:
SecurityTokenHandlerCollectionManager["ActAs"] = new SecurityTokenHandlerCollection();
// or:
SecurityTokenHandlerCollectionManager[SecurityTokenHandlerCollectionManager.Usage.ActAs] = new SecurityTokenHandlerCollection();