Transformer.NET.TextTransformer.InitTagsMap C# (CSharp) Method

InitTagsMap() protected method

protected InitTagsMap ( ) : void
return void
        protected virtual void InitTagsMap()
        {
            if (this.tagsMap == null)
            {
                this.tagsMap = new Dictionary<string, Type>(this.tokensType.Count);

                foreach (Type tokenType in this.tokensType)
                {
                    object[] attrs = tokenType.GetCustomAttributes(typeof(TagNameAttribute), true);
                    string tn = ((TagNameAttribute)attrs[0]).Name;
                    this.tagsMap.Add(tn, tokenType);
                    this.Groups.Add(tn, new List<Token>());
                }
            }
        }