private void RegisterParsers()
{
MethodInfo[] methods = this.GetType().GetMethods();
// loop through all methods and look for ones marked with attributes
for ( int i = 0; i < methods.Length; i++ )
{
// get the current method in the loop
MethodInfo method = methods[ i ];
// see if the method should be used to parse one or more material attributes
ParserCommandAttribute[] parserAtts =
(ParserCommandAttribute[])method.GetCustomAttributes( typeof( ParserCommandAttribute ), true );
// loop through each one we found and register its parser
for ( int j = 0; j < parserAtts.Length; j++ )
{
ParserCommandAttribute parserAtt = parserAtts[ j ];
switch ( parserAtt.ParserType )
{
// this method should parse a material attribute
case PARTICLE:
// attribParsers.Add(parserAtt.Name, Delegate.CreateDelegate(typeof(ParticleSystemRendererAttributeParser), method));
attribParsers[ parserAtt.Name ] = method;
break;
} // switch
} // for
} // for
}