/// <include file='doc\GridEntry.uex' path='docs/doc[@for="GridEntry.Create"]/*' /> /// <devdoc> /// Create the base prop entries given an object or set of objects /// </devdoc> internal static IRootGridEntry Create(PropertyGridView view, object[] rgobjs, IServiceProvider baseProvider, IDesignerHost currentHost, PropertyTab tab, PropertySort initialSortType) { IRootGridEntry pe = null; if (rgobjs == null || rgobjs.Length == 0) { return null; } try { if (rgobjs.Length == 1) { pe = new SingleSelectRootGridEntry(view, rgobjs[0], baseProvider, currentHost, tab, initialSortType); } else { pe = new MultiSelectRootGridEntry(view, rgobjs, baseProvider, currentHost, tab, initialSortType); } } catch (Exception e) { //Debug.fail("Couldn't create a top-level GridEntry"); Debug.Fail(e.ToString()); throw; } return pe; }
internal static IRootGridEntry Create(PropertyGridView view, object[] rgobjs, IServiceProvider baseProvider, IDesignerHost currentHost, PropertyTab tab, System.Windows.Forms.PropertySort initialSortType) { IRootGridEntry entry = null; if ((rgobjs == null) || (rgobjs.Length == 0)) { return null; } try { if (rgobjs.Length == 1) { return new SingleSelectRootGridEntry(view, rgobjs[0], baseProvider, currentHost, tab, initialSortType); } entry = new MultiSelectRootGridEntry(view, rgobjs, baseProvider, currentHost, tab, initialSortType); } catch (Exception) { throw; } return entry; }