public static IEnumerable <LabeledProperty> GetLabeledProperties(string providerName, EntityToken entityToken) { if (string.IsNullOrEmpty(providerName)) { throw new ArgumentNullException("providerName"); } if (entityToken == null) { throw new ArgumentNullException("entityToken"); } ILabeledPropertiesElementProvider labledElementProvider = GetElementProvider(providerName) as ILabeledPropertiesElementProvider; if (labledElementProvider == null) { throw new ArgumentException(string.Format("The Element Provider identified by the specified provider name does not implement {0}", typeof(ILabeledPropertiesElementProvider))); } IEnumerable <LabeledProperty> properties = labledElementProvider.GetLabeledProperties(entityToken); if (properties == null) { return(new List <LabeledProperty>()); } return(properties); }
public static IEnumerable <LabeledProperty> GetLabeledProperties(string providerName, EntityToken entityToken) { Verify.ArgumentNotNullOrEmpty(providerName, nameof(providerName)); Verify.ArgumentNotNull(entityToken, nameof(entityToken)); ILabeledPropertiesElementProvider labledElementProvider = GetElementProvider(providerName) as ILabeledPropertiesElementProvider; if (labledElementProvider == null) { throw new ArgumentException($"The Element Provider identified by the specified provider name does not implement {typeof(ILabeledPropertiesElementProvider)}"); } IEnumerable <LabeledProperty> properties = labledElementProvider.GetLabeledProperties(entityToken); return(properties ?? Enumerable.Empty <LabeledProperty>()); }