/// <summary> /// Get the names of all properties from the given /// <see cref="IFlowData"/> instance that have type 'JavaScript'. /// </summary> /// <param name="data"> /// The <see cref="IFlowData"/> to get properties from. /// </param> /// <param name="availableProperties"> /// A list of the full string names (i.e. prefixed with the element /// data key for the element that populates that property) of the /// available properties in dot-separated format. /// </param> /// <returns> /// A list of the full string names of the properties that are of /// type 'JavaScript' /// </returns> /// <exception cref="ArgumentNullException"> /// Thrown if the supplied flow data is null. /// </exception> protected virtual IList <string> GetJavaScriptProperties( IFlowData data, IList <string> availableProperties) { if (data == null) { throw new ArgumentNullException(nameof(data)); } // Get a list of all the JavaScript properties which are available. var javascriptPropertiesEnumerable = data.GetWhere( p => p.Type != null && Utils.IsTypeOrAspectPropertyValue <JavaScript>(p.Type)) .Where(p => availableProperties.Contains(p.Key)); List <string> javascriptPropeties = new List <string>(); foreach (var property in javascriptPropertiesEnumerable) { javascriptPropeties.Add(property.Key); } return(javascriptPropeties); }