public ValidTag(string tagDefinition)
{
if(tagDefinition == null || tagDefinition.Length == 0 ){
throw new ArgumentNullException( "tagDefinition" );
}
// tags are defined as tag@att1@att2
// so splitting on @ should give us what we need
string[] splitDef = tagDefinition.Split('@');
// first item is the name
this.name = splitDef[0];
// check for attributes and copy to collection
if( splitDef.Length == 1 ){
attributes= new string[0];
}else{
attributes = new string[ splitDef.Length - 1 ];
Array.Copy( splitDef, 1, attributes, 0, attributes.Length );
Array.Sort( attributes, new CaseInsensitiveComparer( CultureInfo.InvariantCulture ));
}
}