coderushforroslyn-120409-configuration-options-copyright-header.md
The Add Copyright Header Code Provider and the h template enable you to add a copyright comment at the beginning of a source code file. The default Copyright Header looks as follows:
//-----------------------------------------------------------------------
// <copyright file="«?FileName»" company="«?GetUserInfo(Company)»">
// Author: «?GetUserFirstName» «?GetUserLastName»
// Copyright (c) «?GetUserInfo(Company)». All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
'-----------------------------------------------------------------------
' <copyright file="«?FileName»" company="«?GetUserInfo(Company)»">
' Author: «?GetUserFirstName» «?GetUserLastName»
' Copyright (c) «?GetUserInfo(Company)». All rights reserved.
' </copyright>
'-----------------------------------------------------------------------
This text is stored as an h template expansion. Templates support Text Commands and String Providers in their expansions. The default Copyright Header uses the following String Providers :
You should configure the “First Name”, “Last Name” and “Company” fields on the IDE | User Info options page to use the default Copyright Header :
The Add Copyright Header and the h template generate the following text with the configuration above:
//-----------------------------------------------------------------------
// <copyright file="D:\Projects\CodeRushDemo\CodeRushDemo\Program.cs" company="Developer Express">
// Author: CodeRush User
// Copyright (c) Developer Express. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
'-----------------------------------------------------------------------
' <copyright file="D:\Projects\CodeRushDemo\CodeRushDemo\MainModule.vb" company="Developer Express">
' Author: CodeRush User
' Copyright (c) Developer Express. All rights reserved.
' </copyright>
'-----------------------------------------------------------------------