/// <summary> /// Got attributes? /// </summary> internal AttributeCollection GetAttributes(object component) { ArrayList attrs = new ArrayList(); if (component is NativeMethods.IManagedPerPropertyBrowsing) { object[] temp = Com2IManagedPerPropertyBrowsingHandler.GetComponentAttributes((NativeMethods.IManagedPerPropertyBrowsing)component, NativeMethods.MEMBERID_NIL); for (int i = 0; i < temp.Length; ++i) { attrs.Add(temp[i]); } } if (Com2ComponentEditor.NeedsComponentEditor(component)) { EditorAttribute a = new EditorAttribute(typeof(Com2ComponentEditor), typeof(ComponentEditor)); attrs.Add(a); } if (attrs == null || attrs.Count == 0) { return(staticAttrs); } else { Attribute[] temp = new Attribute[attrs.Count]; attrs.CopyTo(temp, 0); return(new AttributeCollection(temp)); } }
internal AttributeCollection GetAttributes(object component) { ArrayList attrs = new ArrayList(); if (component is VSSDK.IVSMDPerPropertyBrowsing) { object[] temp = Com2IManagedPerPropertyBrowsingHandler.GetComponentAttributes((VSSDK.IVSMDPerPropertyBrowsing)component, DispatchID.MEMBERID_NIL); for (int i = 0; i < temp.Length; ++i) { attrs.Add(temp[i]); } } if (Com2ComponentEditor.NeedsComponentEditor(component)) { EditorAttribute a = new EditorAttribute(typeof(Com2ComponentEditor), typeof(ComponentEditor)); attrs.Add(a); } if (attrs is null || attrs.Count == 0) { return(staticAttrs); }