Ejemplo n.º 1
0
        public Taggable()
        {
            string vocabIndex = string.Empty;

            System.Reflection.MemberInfo info = this.GetType();
            object[] attributes = info.GetCustomAttributes(true);

            IList <System.Reflection.CustomAttributeData> Cads = info.GetCustomAttributesData();

            foreach (System.Reflection.CustomAttributeData cad in Cads)
            {
                if (cad.AttributeType == typeof(TagTypeAttribute))
                {
                    vocabIndex = cad.ConstructorArguments[0].Value as string;
                }
            }


            Vocab = Vocabulary.GetInstance(vocabIndex);
        }