Example #1
0
        /// <summary>
        /// Create a new IDCHainDefinition of the <paramref name="myType"/> and the chain of attributes.
        /// </summary>
        /// <param name="myType"></param>
        /// <param name="myAttribute"></param>
        /// <returns></returns>
        public static IDChainDefinition Create(String myType, params String[] myAttribute)
        {
            var chain = new IDChainDefinition(myType + "." + myAttribute, new List <TypeReferenceDefinition>()
            {
                new TypeReferenceDefinition(myType, myType)
            });

            foreach (var attr in myAttribute)
            {
                chain.AddPart(new ChainPartTypeOrAttributeDefinition(attr));
            }

            return(chain);
        }