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;
}
}
}
}