/// <summary>
        /// Gets an array of property descriptors for a property editing context. This array
        /// represents the properties common to all items in the context's selection.</summary>
        /// <param name="context">Property editing context</param>
        /// <returns>Array of property descriptors common to all items in the context's selection</returns>
        public static PropertyDescriptor[] GetPropertyDescriptors(PropertyEditingContext context)
        {
            if (context == null || context.m_selection.Length == 0)
                return new PropertyDescriptor[0];

            if (context.m_propertyDescriptors != null)
                return context.m_propertyDescriptors;

            PropertyDescriptor[] result = context.CreatePropertyDescriptors();

            context.m_propertyDescriptors = result;
            return result;
        }
        /// <summary>
        /// Gets an array of property descriptors for a property editing context. This array
        /// represents the properties common to all items in the context's selection.</summary>
        /// <param name="context">Property editing context</param>
        /// <returns>Array of property descriptors common to all items in the context's selection</returns>
        public static PropertyDescriptor[] GetPropertyDescriptors(PropertyEditingContext context)
        {
            if (context == null || context.m_selection.Length == 0)
            {
                return(new PropertyDescriptor[0]);
            }

            if (context.m_propertyDescriptors != null)
            {
                return(context.m_propertyDescriptors);
            }

            PropertyDescriptor[] result = context.CreatePropertyDescriptors();

            context.m_propertyDescriptors = result;
            return(result);
        }
 /// <summary>
 /// Constructor with selected objects and inner context</summary>
 /// <param name="selection">Selected objects, in order of selection</param>
 /// <param name="innerContext">Inner context containing this context</param>
 public PropertyEditingContext(object[] selection, PropertyEditingContext innerContext)
 {
     m_selection    = selection;
     m_innerContext = innerContext;
 }
 /// <summary>
 /// Constructor with selected objects and inner context</summary>
 /// <param name="selection">Selected objects, in order of selection</param>
 /// <param name="innerContext">Inner context containing this context</param>
 public PropertyEditingContext(object[] selection, PropertyEditingContext innerContext)
 {
     m_selection = selection;
     m_innerContext = innerContext;
 }