#pragma warning disable 612 public static List <EntityTokenHook> GetHooks(string providerName) { Verify.ArgumentNotNullOrEmpty(providerName, nameof(providerName)); IElementProvider provider = GetElementProvider(providerName) as IElementProvider; if (provider == null) { throw new ArgumentException($"The Element Provider identified by the specified provider name does not implement {typeof(IElementProvider)}"); } List <EntityTokenHook> hooks = provider.GetHooks(); return(hooks ?? new List <EntityTokenHook>()); }
#pragma warning disable 612 public static List <EntityTokenHook> GetHooks(string providerName) { if (string.IsNullOrEmpty(providerName)) { throw new ArgumentNullException("providerName"); } IElementProvider provider = GetElementProvider(providerName) as IElementProvider; if (provider == null) { throw new ArgumentException(string.Format("The Element Provider identified by the specified provider name does not implement {0}", typeof(IElementProvider))); } List <EntityTokenHook> hooks = provider.GetHooks(); if (hooks == null) { return(new List <EntityTokenHook>()); } return(hooks); }