DevTreks.Data/Helpers/LinqHelpers.cs
/// <summary>
/// Filters the linkedViews addin list by the isdefault property = true
/// </summary>
Filters the linkedViews addin list by the isdefault property = true
Filters the linkedViews addin list by the isdefault property = true
public static ContentURI GetLinkedViewIsDefaultAddIn(
            IList<System.Linq.IGrouping<int, ContentURI>> linkedViews)
        {
            ContentURI oLinkedView = null;
            if (linkedViews != null)
            {
                foreach (var linkedviewparent in linkedViews)
                {
                    foreach (ContentURI linkedview in linkedviewparent)
                    {
                        string sNodeName = ContentURI.GetURIPatternPart(linkedview.URIPattern, ContentURI.URIPATTERNPART.node);
                        if (sNodeName == AppHelpers.LinkedViews.LINKEDVIEWS_TYPES.linkedview.ToString())
                        {
                            if (linkedview.URIDataManager.IsDefault == true
                                && AddInHelper.IsAddIn(linkedview))
                            {
                                return linkedview;
                            }
                        }
                    }
                }
            }
            return oLinkedView;
        }
public static ContentURI GetLinkedViewIsDefaultAddIn ( IList < System . Linq . IGrouping < int , ContentURI > > linkedViews ) { ContentURI oLinkedView = null ; if ( linkedViews != null ) { foreach ( var linkedviewparent in linkedViews ) { foreach ( ContentURI linkedview in linkedviewparent ) { string sNodeName = ContentURI . GetURIPatternPart ( linkedview . URIPattern , ContentURI . URIPATTERNPART . node ) ; if ( sNodeName == AppHelpers . LinkedViews . LINKEDVIEWS_TYPES . linkedview . ToString ( ) ) { if ( linkedview . URIDataManager . IsDefault == true && AddInHelper . IsAddIn ( linkedview ) ) { return linkedview ; } } } } } return oLinkedView ; }
Filters the linkedViews addin list by the isdefault property = true
Filters the linkedViews addin list by the isdefault property = true
//refactor with query syntax
linkedViews
IList<System.Linq.IGrouping<int, ContentURI>>