Axiom.ParticleSystems.BillboardParticleRenderer.RegisterParsers C# (CSharp) Method

RegisterParsers() private method

Registers all attribute names with their respective parser.
Methods meant to serve as attribute parsers should use a method attribute to
private RegisterParsers ( ) : void
return void
		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
		}