static void addTranAsType(Type typeRef, TransformsDictionary op) { TransformAction operation = (TransformAction)Activator.CreateInstance(Type.GetType(typeRef.FullName)); op.Add(operation.Uri.ToString(), operation); }
/// <summary> /// Creates a transform action. /// </summary> /// <param name="action">The identifier of the transform action to create.</param> /// <param name="transforms">Dictionary of transforms.</param> /// <returns>An action used to transform claims.</returns> public static TransformAction Create(Uri action, TransformsDictionary transforms) { _ = action ?? throw new ArgumentNullException(nameof(action)); TransformAction transformAction; if (transforms == null) { transformAction = TransformsDictionary.Default [action.ToString()]; //CaplConfigurationManager.Transforms[action.ToString()]; } else { transformAction = transforms[action.ToString()]; } return(transformAction); }