System.ComponentModel.PropertyTabAttribute.InitializeArrays C# (CSharp) Method

InitializeArrays() private method

private InitializeArrays ( string tabClassNames, Type tabClasses, PropertyTabScope tabScopes ) : void
tabClassNames string
tabClasses System.Type
tabScopes PropertyTabScope
return void
        private void InitializeArrays(string[] tabClassNames, Type[] tabClasses, PropertyTabScope[] tabScopes)
        {
            if (tabClasses != null)
            {
                if (tabScopes != null && tabClasses.Length != tabScopes.Length)
                {
                    throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch);
                }
                _tabClasses = (Type[])tabClasses.Clone();
            }
            else if (tabClassNames != null)
            {
                if (tabScopes != null && tabClasses.Length != tabScopes.Length)
                {
                    throw new ArgumentException(SR.PropertyTabAttributeArrayLengthMismatch);
                }
                _tabClassNames = (string[])tabClassNames.Clone();
                _tabClasses = null;
            }
            else if (_tabClasses == null && _tabClassNames == null)
            {
                throw new ArgumentException(SR.PropertyTabAttributeParamsBothNull);
            }

            if (tabScopes != null)
            {
                for (int i = 0; i < tabScopes.Length; i++)
                {
                    if (tabScopes[i] < PropertyTabScope.Document)
                    {
                        throw new ArgumentException(SR.PropertyTabAttributeBadPropertyTabScope);
                    }
                }
                _tabScopes = (PropertyTabScope[])tabScopes.Clone();
            }
            else
            {
                _tabScopes = new PropertyTabScope[tabClasses.Length];

                for (int i = 0; i < TabScopes.Length; i++)
                {
                    _tabScopes[i] = PropertyTabScope.Component;
                }
            }
        }
    }

Same methods

PropertyTabAttribute::InitializeArrays ( Type tabClasses, PropertyTabScope tabScopes ) : void
PropertyTabAttribute::InitializeArrays ( string tabClassNames, PropertyTabScope tabScopes ) : void