/// <summary> /// Factory method. Loads a <see cref="PropertyRequiredList"/> collection. /// </summary> /// <returns>A reference to the fetched <see cref="PropertyRequiredList"/> collection.</returns> public static PropertyRequiredList GetPropertyRequiredList() { if (_list == null) { _list = DataPortal.Fetch <PropertyRequiredList>(); } return(_list); }
/// <summary> /// Factory method. Loads a <see cref="PropertyRequiredList"/> collection, based on given parameters. /// </summary> /// <param name="objectName">The ObjectName parameter of the PropertyRequiredList to fetch.</param> /// <returns>A reference to the fetched <see cref="PropertyRequiredList"/> collection.</returns> public static PropertyRequiredList GetPropertyRequiredList(string objectName) { if (!IsCached) { GetPropertyRequiredList(); } List <PropertyRequiredInfo> list = _list .Where(propertyConfigurationInfo => propertyConfigurationInfo.ObjectName == objectName) .Select(propertyConfigurationInfo => propertyConfigurationInfo).ToList(); var result = new PropertyRequiredList { RaiseListChangedEvents = false, IsReadOnly = false }; result.AddRange(list); result.IsReadOnly = true; return(result); }
/// <summary> /// Clears the in-memory DocClassNVL cache so it is reloaded on the next request. /// </summary> public static void InvalidateCache() { _list = null; }