Exemplo n.º 1
0
        /// <summary>
        /// Adds abstract inner methods for all methods in the alphabet.
        /// </summary>
        /// <param name="typeDeclaration">The <see cref="CodeTypeDeclaration"/>
        /// to add the abstract methods to.</param>
        private void AddAbstractImplementation(CodeTypeDeclaration typeDeclaration)
        {
            foreach (MethodInfo methodInfo in mAlphabet)
            {
                CodeMemberMethod memberMethod = methodInfo.ToMemberMethod();

                memberMethod.Name = "Inner" + memberMethod.Name;

                memberMethod.ReturnType = typeDeclaration.ToTypeReferece();

                memberMethod.Attributes = MemberAttributes.Abstract | MemberAttributes.Family;

                typeDeclaration.Members.Add(memberMethod);
            }
        }