├── .editorconfig ├── .gitattributes ├── .gitignore ├── Key.snk ├── LicenseHeaderManager.2019 ├── LicenseHeaderManager.2019.csproj ├── LicenseHeaders.vsct ├── Properties │ └── AssemblyInfo.cs ├── app.config └── source.extension.vsixmanifest ├── LicenseHeaderManager.Console ├── App.config ├── ConsoleProgress.cs ├── LicenseHeaderManager.Console.csproj ├── Options.cs ├── Program.cs ├── Properties │ └── AssemblyInfo.cs ├── UpdateMode.cs └── UpdateTarget.cs ├── LicenseHeaderManager.Core.Tests ├── AdditionalPropertyTest.cs ├── CommentParserTest.cs ├── CoreOptionsTest.cs ├── DocumentHeaderPropertiesTest.cs ├── DocumentHeaderPropertyTest.cs ├── DocumentHeaderTest.cs ├── DocumentTest.cs ├── JsonOptionsManagerTest.cs ├── LanguageTest.cs ├── LicenseHeaderContentInputTest.cs ├── LicenseHeaderExtractorTest.cs ├── LicenseHeaderInputBaseTest.cs ├── LicenseHeaderManager.Core.Tests.csproj ├── LicenseHeaderPathInputTest.cs ├── LicenseHeaderPreparerTest.cs ├── LicenseHeaderReplacerTest.cs ├── LineManagerTest.cs ├── NotSupportedOptions.cs ├── PathUtilityTest.cs ├── Properties │ └── AssemblyInfo.cs ├── ReplacerErrorTest.cs ├── ReplacerProgressContentReportTest.cs ├── ReplacerResultTest.cs ├── ReplacerSuccessTest.cs ├── StringArrayExtensions.cs ├── StringExtensionsTest.cs ├── UserInfoTest.cs └── app.config ├── LicenseHeaderManager.Core ├── AdditionalProperty.cs ├── AssemblyInfo.cs ├── CommentParser.cs ├── CreateDocumentResult.cs ├── Document.cs ├── DocumentHeader.cs ├── DocumentHeaderProperties.cs ├── DocumentHeaderProperty.cs ├── ICommentParser.cs ├── IDocumentHeader.cs ├── ILicenseHeaderExtractor.cs ├── ILicenseHeaderReplacer.cs ├── Language.cs ├── LicenseHeaderContentInput.cs ├── LicenseHeaderExtractor.cs ├── LicenseHeaderInput.cs ├── LicenseHeaderInputMode.cs ├── LicenseHeaderManager.Core.csproj ├── LicenseHeaderPathInput.cs ├── LicenseHeaderPreparer.cs ├── LicenseHeaderReplacer.cs ├── LineEndInformation.cs ├── NewLineConst.cs ├── NewLineManager.cs ├── Options │ ├── CoreOptions.cs │ ├── CoreOptionsRepository.cs │ ├── JsonOptionsManager.cs │ └── LicenseHeaderManagerOptionsAttribute.cs ├── ParseException.cs ├── PathUtility.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── ReplacerError.cs ├── ReplacerErrorType.cs ├── ReplacerProgressContentReport.cs ├── ReplacerProgressReport.cs ├── ReplacerResult.cs ├── ReplacerSuccess.cs ├── StringExtensions.cs ├── UserInfo.cs └── app.config ├── LicenseHeaderManager.Shared ├── GlobalSuppressions.cs ├── Headers │ ├── LicenseHeaderDefinitionFileHelper.cs │ ├── LicenseHeaderFinder.cs │ └── NewLineConst.cs ├── Interfaces │ ├── ILicenseHeaderExtension.cs │ ├── ILinkedFileFilter.cs │ └── IMenuItemButtonHandler.cs ├── LicenseHeaderManager.Shared.projitems ├── LicenseHeaderManager.Shared.shproj ├── LicenseHeadersPackage.cs ├── MenuItemButtonHandler │ ├── FolderProjectMenuItemButtonHandler.cs │ ├── Implementations │ │ ├── AddLicenseHeaderToAllFilesInFolderProjectImplementation.cs │ │ ├── AddLicenseHeaderToAllFilesInSolutionImplementation.cs │ │ ├── RemoveLicenseHeaderFromAllFilesInSolutionImplementation.cs │ │ └── RemoveLicenseHeaderToAllFilesInFolderProjectImplementation.cs │ ├── MenuItemButtonHandlerFactory.cs │ ├── MenuItemButtonHandlerImplementation.cs │ ├── MenuItemButtonLevel.cs │ ├── MenuItemButtonOperation.cs │ └── SolutionMenuItemButtonHandler.cs ├── MenuItemCommands │ ├── Common │ │ ├── AddLicenseHeaderToAllFilesInProjectHelper.cs │ │ ├── ExistingLicenseHeaderDefinitionFileAdder.cs │ │ ├── FolderProjectMenuHelper.cs │ │ └── RemoveLicenseHeaderFromAllFilesInProjectHelper.cs │ ├── EditorMenu │ │ ├── AddLicenseHeaderEditorAdvancedMenuCommand.cs │ │ └── RemoveLicenseHeaderEditorAdvancedMenuCommand.cs │ ├── FolderMenu │ │ ├── AddExistingLicenseHeaderDefinitionFileToFolderCommand.cs │ │ ├── AddLicenseHeaderToAllFilesInFolderCommand.cs │ │ ├── AddNewLicenseHeaderDefinitionFileToFolderCommand.cs │ │ └── RemoveLicenseHeaderFromAllFilesInFolderCommand.cs │ ├── ProjectItemMenu │ │ ├── AddHeaderToProjectItemCommand.cs │ │ └── RemoveHeaderFromProjectItemCommand.cs │ ├── ProjectMenu │ │ ├── AddExistingLicenseHeaderDefinitionFileToProjectCommand.cs │ │ ├── AddLicenseHeaderToAllFilesInProjectCommand.cs │ │ ├── AddNewLicenseHeaderDefinitionFileToProjectCommand.cs │ │ ├── LicenseHeaderOptionsCommand.cs │ │ └── RemoveLicenseHeaderFromAllFilesInProjectCommand.cs │ └── SolutionMenu │ │ ├── AddLicenseHeaderToAllFilesInSolutionCommand.cs │ │ ├── AddNewSolutionLicenseHeaderDefinitionFileCommand.cs │ │ ├── OpenSolutionLicenseHeaderDefinitionFileCommand.cs │ │ ├── RemoveLicenseHeaderFromAllFilesInSolutionCommand.cs │ │ └── RemoveSolutionLicenseHeaderDefinitionFileCommand.cs ├── Options │ ├── Converters │ │ ├── ExtensionConverter.cs │ │ ├── LanguageConverter.cs │ │ ├── LinkedCommandConverter.cs │ │ └── XmlTypeConverter.cs │ ├── DialogPageControls │ │ ├── WpfCommandDialog.xaml │ │ ├── WpfCommandDialog.xaml.cs │ │ ├── WpfDefaultLicenseHeader.xaml │ │ ├── WpfDefaultLicenseHeader.xaml.cs │ │ ├── WpfEditDefaultLicenseHeaderDialog.xaml │ │ ├── WpfEditDefaultLicenseHeaderDialog.xaml.cs │ │ ├── WpfLanguageDialog.xaml │ │ ├── WpfLanguageDialog.xaml.cs │ │ ├── WpfLanguages.xaml │ │ ├── WpfLanguages.xaml.cs │ │ ├── WpfOptions.xaml │ │ └── WpfOptions.xaml.cs │ ├── DialogPages │ │ ├── BaseOptionPage.cs │ │ ├── DefaultLicenseHeaderPage.cs │ │ ├── LanguagesPage.cs │ │ ├── OptionsPage.cs │ │ └── OptionsStoreMode.cs │ ├── LinkedCommand.cs │ ├── Model │ │ ├── BaseOptionPageModel.cs │ │ ├── DefaultLicenseHeaderPageModel.cs │ │ ├── GeneralOptionsPageModel.cs │ │ ├── IDefaultLicenseHeaderPageModel.cs │ │ ├── IGeneralOptionsPageModel.cs │ │ ├── ILanguagesPageModel.cs │ │ └── LanguagesPageModel.cs │ ├── OptionsFacade.cs │ ├── UpdateStep.cs │ ├── VisualStudioOptions.cs │ ├── WpfHost.Designer.cs │ ├── WpfHost.cs │ └── WpfHost.resx ├── Resources.Designer.cs ├── Resources.resx ├── Resources │ └── Package.ico ├── ResultObjects │ └── AddLicenseHeaderToAllFilesResult.cs ├── UpdateViewModels │ ├── BaseUpdateViewModel.cs │ ├── FolderProjectUpdateViewModel.cs │ ├── RelayCommand.cs │ └── SolutionUpdateViewModel.cs ├── UpdateViews │ ├── FolderProjectUpdateDialog.xaml │ ├── FolderProjectUpdateDialog.xaml.cs │ ├── IntToMaximumConverter.cs │ ├── SolutionUpdateDialog.xaml │ └── SolutionUpdateDialog.xaml.cs ├── Utils │ ├── AllSolutionProjectsSearcher.cs │ ├── CommandUtility.cs │ ├── CoreHelpers.cs │ ├── Extensions.cs │ ├── LinkedFileFilter.cs │ ├── LinkedFileHandler.cs │ ├── MessageBoxHelper.cs │ ├── OutputPaneAppender.cs │ ├── ProjectItemInspection.cs │ ├── ProjectItemParentFinder.cs │ └── ReplacerProgress.cs └── VSPackage.resx ├── LicenseHeaderManager.Tests ├── AllSolutionProjectsSearcherTest.cs ├── GeneralOptionsPageModelTest.cs ├── LicenseHeaderManager.Tests.csproj ├── LinkedFileFilterTest.cs ├── LinkedFileHandlerTest.cs ├── ProjectItemInspectionTest.cs ├── Properties │ └── AssemblyInfo.cs └── VisualStudioTestContext.cs ├── LicenseHeaderManager.sln ├── LicenseHeaderManager.sln.licenseheader ├── LicenseHeaderManager ├── LicenseHeaderManager.csproj ├── LicenseHeaders.vsct ├── Properties │ └── AssemblyInfo.cs ├── app.config ├── license.txt └── source.extension.vsixmanifest ├── README.md ├── SharedResources ├── Images.bmp └── Images.pdn ├── SharedVsixInformation ├── Icon.png └── Preview.png ├── TestPlan.md ├── TestSolution └── LHM-CsProjTest │ ├── .editorconfig │ ├── .vs │ └── config │ │ └── applicationhost.config │ ├── App1 │ ├── App.xaml │ ├── App.xaml.cs │ ├── App1.csproj │ ├── App1.licenseheader │ ├── Assets │ │ ├── Logo.scale-240.png │ │ ├── SmallLogo.scale-240.png │ │ ├── SplashScreen.scale-240.png │ │ ├── Square71x71Logo.scale-240.png │ │ ├── StoreLogo.scale-240.png │ │ └── WideLogo.scale-240.png │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── NewFolder1 │ │ ├── Class1.cs │ │ └── NewFolder1 │ │ │ └── Class1.cs │ ├── Package.appxmanifest │ └── Properties │ │ └── AssemblyInfo.cs │ ├── App2 │ ├── App2.Shared │ │ ├── App.xaml │ │ ├── App.xaml.cpp │ │ ├── App.xaml.h │ │ ├── App2.Shared.licenseheader │ │ ├── App2.Shared.vcxitems │ │ ├── App2.Shared.vcxitems.filters │ │ ├── pch.cpp │ │ └── pch.h │ ├── App2.Windows │ │ ├── App2.Windows.vcxproj │ │ ├── App2.Windows.vcxproj.filters │ │ ├── Assets │ │ │ ├── Logo.scale-100.png │ │ │ ├── SmallLogo.scale-100.png │ │ │ ├── SplashScreen.scale-100.png │ │ │ └── StoreLogo.scale-100.png │ │ ├── Generated Files │ │ │ ├── App.g.h │ │ │ ├── App.g.hpp │ │ │ ├── App.xaml │ │ │ ├── App.xbf │ │ │ ├── MainPage.g.h │ │ │ ├── MainPage.g.hpp │ │ │ ├── MainPage.xaml │ │ │ ├── MainPage.xbf │ │ │ ├── XamlLibMetadataProvider.g.cpp │ │ │ ├── XamlTypeInfo.Impl.g.cpp │ │ │ ├── XamlTypeInfo.g.cpp │ │ │ └── XamlTypeInfo.g.h │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cpp │ │ ├── MainPage.xaml.h │ │ └── Package.appxmanifest │ └── App2.WindowsPhone │ │ ├── App2.WindowsPhone.licenseheader │ │ ├── App2.WindowsPhone.vcxproj │ │ ├── App2.WindowsPhone.vcxproj.filters │ │ ├── Assets │ │ ├── Logo.scale-240.png │ │ ├── SmallLogo.scale-240.png │ │ ├── SplashScreen.scale-240.png │ │ ├── Square71x71Logo.scale-240.png │ │ ├── StoreLogo.scale-240.png │ │ └── WideLogo.scale-240.png │ │ ├── Generated Files │ │ ├── App.g.h │ │ ├── App.g.hpp │ │ ├── App.xaml │ │ ├── App.xbf │ │ ├── MainPage.g.h │ │ ├── MainPage.g.hpp │ │ ├── MainPage.xaml │ │ ├── MainPage.xbf │ │ ├── XamlLibMetadataProvider.g.cpp │ │ ├── XamlTypeInfo.Impl.g.cpp │ │ ├── XamlTypeInfo.g.cpp │ │ └── XamlTypeInfo.g.h │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cpp │ │ ├── MainPage.xaml.h │ │ └── Package.appxmanifest │ ├── BlankSharedApp1 │ ├── BlankSharedApp1.Shared │ │ ├── BlankSharedApp1.Shared.projitems │ │ ├── BlankSharedApp1.Shared.shproj │ │ ├── TypeScriptHTMLApp1.licenseheader │ │ └── js │ │ │ └── default.js │ ├── BlankSharedApp1.Windows │ │ ├── BlankSharedApp1.Windows.jsproj │ │ ├── css │ │ │ └── default.css │ │ ├── default.html │ │ ├── images │ │ │ ├── logo.png │ │ │ ├── smalllogo.png │ │ │ ├── splashscreen.png │ │ │ └── storelogo.png │ │ └── package.appxmanifest │ └── BlankSharedApp1.WindowsPhone │ │ ├── BlankSharedApp1.WindowsPhone.jsproj │ │ ├── css │ │ ├── NewFolder │ │ │ └── file.ts │ │ ├── TypeScriptHTMLApp1.licenseheader │ │ ├── default.css │ │ ├── ui-themed.css │ │ ├── ui-themed.theme-dark.css │ │ └── ui-themed.theme-light.css │ │ ├── default.html │ │ ├── images │ │ ├── SplashScreen.scale-240.png │ │ ├── Square150x150Logo.scale-240.png │ │ ├── Square44x44Logo.scale-240.png │ │ ├── Square71x71Logo.scale-240.png │ │ ├── StoreLogo.scale-240.png │ │ └── Wide310x150Logo.scale-240.png │ │ └── package.appxmanifest │ ├── ConsoleApplication1 │ ├── App.config │ ├── ConsoleApplication1.fsproj │ ├── ConsoleApplication1.licenseheader │ ├── Program.fs │ └── newfolder1 │ │ ├── File1.fs │ │ ├── NewFolder2 │ │ └── File2.fs │ │ └── TypeScriptHTMLApp1.licenseheader │ ├── LHM-CsProjTest.VC.db │ ├── LHM-CsProjTest.sln │ ├── LHM-CsProjTest │ ├── App.config │ ├── LHM-CsProjTest.csproj │ ├── LHM-CsProjTest.licenseheader │ ├── NewFolder1 │ │ ├── Class1.cs │ │ └── NewFolder1 │ │ │ └── Class1.cs │ ├── Program.cs │ └── Properties │ │ └── AssemblyInfo.cs │ ├── OfficeApp1 │ ├── OfficeApp1.csproj │ ├── OfficeApp1.licenseheader │ └── OfficeApp1Manifest │ │ ├── OfficeApp1.xml │ │ └── SharePointProjectItem.spdata │ ├── OfficeApp1Web │ ├── App │ │ ├── App.css │ │ ├── App.js │ │ └── Home │ │ │ ├── Home.css │ │ │ ├── Home.html │ │ │ └── Home.js │ ├── Content │ │ ├── Office.css │ │ └── OfficeThemes.css │ ├── Images │ │ └── Close.png │ ├── NewFolder1 │ │ ├── NewFolder1 │ │ │ └── HtmlPage1.html │ │ └── StyleSheet1.css │ ├── OfficeApp1Web.csproj │ ├── OfficeApp1Web.licenseheader │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Scripts │ │ ├── Office │ │ │ ├── 1.1 │ │ │ │ ├── access-web-16.00.debug.js │ │ │ │ ├── access-web-16.00.js │ │ │ │ ├── ar-sa │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── bg-bg │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── ca-es │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── cs-cz │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── da-dk │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── de-de │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── el-gr │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── en-us │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── es-es │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── et-ee │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── eu-es │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── excel-15.01.debug.js │ │ │ │ ├── excel-15.01.js │ │ │ │ ├── excel-15.debug.js │ │ │ │ ├── excel-15.js │ │ │ │ ├── excel-ios-16.00.debug.js │ │ │ │ ├── excel-ios-16.00.js │ │ │ │ ├── excel-web-16.00.debug.js │ │ │ │ ├── excel-web-16.00.js │ │ │ │ ├── excel-win32-16.00.debug.js │ │ │ │ ├── excel-win32-16.00.js │ │ │ │ ├── excelios-15.debug.js │ │ │ │ ├── excelios-15.js │ │ │ │ ├── excelwebapp-15.01.debug.js │ │ │ │ ├── excelwebapp-15.01.js │ │ │ │ ├── excelwebapp-15.debug.js │ │ │ │ ├── excelwebapp-15.js │ │ │ │ ├── fi-fi │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── fr-fr │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── gl-es │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── he-il │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── hi-in │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── hr-hr │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── hu-hu │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── id-id │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── it-it │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── ja-jp │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── kk-kz │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── ko-kr │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── lt-lt │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── lv-lv │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── ms-my │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── nb-no │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── nl-nl │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── o15apptofilemappingtable.debug.js │ │ │ │ ├── o15apptofilemappingtable.js │ │ │ │ ├── office-vsdoc.js │ │ │ │ ├── office.debug.js │ │ │ │ ├── office.js │ │ │ │ ├── outlook-15.01.debug.js │ │ │ │ ├── outlook-15.01.js │ │ │ │ ├── outlook-15.02.debug.js │ │ │ │ ├── outlook-15.02.js │ │ │ │ ├── outlook-15.debug.js │ │ │ │ ├── outlook-15.js │ │ │ │ ├── outlook-web-16.00.debug.js │ │ │ │ ├── outlook-web-16.00.js │ │ │ │ ├── outlook-win32-16.00.debug.js │ │ │ │ ├── outlook-win32-16.00.js │ │ │ │ ├── outlook-win32.debug-vsdoc.js │ │ │ │ ├── outlookwebapp-15.01.debug.js │ │ │ │ ├── outlookwebapp-15.01.js │ │ │ │ ├── outlookwebapp-15.debug.js │ │ │ │ ├── outlookwebapp-15.js │ │ │ │ ├── pl-pl │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── powerpoint-15.01.debug.js │ │ │ │ ├── powerpoint-15.01.js │ │ │ │ ├── powerpoint-15.debug.js │ │ │ │ ├── powerpoint-15.js │ │ │ │ ├── powerpoint-ios-16.00.debug.js │ │ │ │ ├── powerpoint-ios-16.00.js │ │ │ │ ├── powerpoint-web-16.00.debug.js │ │ │ │ ├── powerpoint-web-16.00.js │ │ │ │ ├── powerpoint-win32-16.00.debug.js │ │ │ │ ├── powerpoint-win32-16.00.js │ │ │ │ ├── powerpointios-15.debug.js │ │ │ │ ├── powerpointios-15.js │ │ │ │ ├── project-15.01.debug.js │ │ │ │ ├── project-15.01.js │ │ │ │ ├── project-15.debug.js │ │ │ │ ├── project-15.js │ │ │ │ ├── project-win32-16.00.debug.js │ │ │ │ ├── project-win32-16.00.js │ │ │ │ ├── pt-br │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── pt-pt │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── ro-ro │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── ru-ru │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── sk-sk │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── sl-si │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── sr-cyrl-cs │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── sr-cyrl-rs │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── sr-latn-cs │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── sr-latn-rs │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── sv-se │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── th-th │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── tr-tr │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── uk-ua │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── vi-vn │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ ├── word-15.01.debug.js │ │ │ │ ├── word-15.01.js │ │ │ │ ├── word-15.debug.js │ │ │ │ ├── word-15.js │ │ │ │ ├── word-ios-16.00.debug.js │ │ │ │ ├── word-ios-16.00.js │ │ │ │ ├── word-web-16.00.debug.js │ │ │ │ ├── word-web-16.00.js │ │ │ │ ├── word-win32-16.00.debug.js │ │ │ │ ├── word-win32-16.00.js │ │ │ │ ├── wordios-15.debug.js │ │ │ │ ├── wordios-15.js │ │ │ │ ├── zh-cn │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ │ └── zh-tw │ │ │ │ │ ├── office_strings.debug.js │ │ │ │ │ ├── office_strings.js │ │ │ │ │ ├── outlook_strings.debug.js │ │ │ │ │ └── outlook_strings.js │ │ │ ├── MicrosoftAjax.js │ │ │ └── metadata │ │ │ │ ├── endpoints.xml │ │ │ │ └── features.xml │ │ ├── _officeintellisense.js │ │ ├── _references.js │ │ ├── jquery-1.9.1.intellisense.js │ │ ├── jquery-1.9.1.js │ │ ├── jquery-1.9.1.min.js │ │ ├── jquery-1.9.1.min.js.map │ │ └── jquery-1.9.1.min.map │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ └── packages.config │ ├── PHPWebProject1 │ ├── NewFolder1 │ │ ├── Class1.php │ │ └── NewFolder1 │ │ │ └── Class1.php │ ├── PHPWebProject1.phpproj │ └── index.php │ ├── PythonApplication1 │ ├── NewFolder1 │ │ └── class1.py │ ├── NewFolder2 │ │ └── PythonApplication1.py │ ├── NewFolder3 │ │ ├── NewFolder1 │ │ │ └── class1.py │ │ └── class1.py │ ├── PythonApplication1.py │ └── PythonApplication1.pyproj │ ├── PythonToolsLinks1 │ ├── PythonTools.html │ ├── PythonToolsLinks1.csproj │ └── vslogo.png │ ├── ReportsApplication1 │ ├── App.config │ ├── Form1.Designer.cs │ ├── Form1.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Report1.rdlc │ ├── ReportsApplication1.csproj │ └── ReportsApplication1.licenseheader │ ├── Settings.FSharpLint │ ├── SetupProject1 │ ├── Include1.wxi │ ├── NewFolder1 │ │ ├── File1.wxs │ │ ├── Include1.wxi │ │ ├── NewFolder1 │ │ │ └── Include1.wxi │ │ └── Strings1.wxl │ ├── Product.wxs │ ├── Script1.ps1 │ ├── Script2.ps1 │ ├── SetupProject1.licenseheader │ ├── SetupProject1.wixproj │ └── testFolder.licenseheader │ └── TypeScriptHTMLApp1 │ ├── TypeScriptHTMLApp1.csproj │ ├── TypeScriptHTMLApp1.licenseheader │ ├── app.css │ ├── app.js │ ├── app.js.map │ ├── app.ts │ ├── index.html │ ├── testFolder │ ├── NewFolder1 │ │ ├── file1.js │ │ ├── file1.js.map │ │ └── file1.ts │ ├── file1.js │ ├── file1.js.map │ ├── file1.ts │ └── testFolder.licenseheader │ ├── web.Debug.config │ ├── web.Release.config │ └── web.config ├── license └── MIT.txt ├── nuget.config └── teamcity.properties /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | indent_style = space 3 | indent_size = 2 4 | dotnet_style_qualification_for_field = false 5 | dotnet_style_qualification_for_property = false 6 | dotnet_style_qualification_for_method = false 7 | dotnet_style_qualification_for_event = false -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # DotSettings files have LFs, not CRLFs 5 | *.DotSettings text eol=lf 6 | 7 | #Github language statistic should ignore specific languages, so that the project is still defined as c# project 8 | special-vendored-path/* linguist-vendored 9 | *.js linguist-vendored=true 10 | *.cpp linguist-vendored=true 11 | *.h linguist-vendored=true -------------------------------------------------------------------------------- /Key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubicon-oss/LicenseHeaderManager/9c9e3627dabaefe1462a1adcb18c39e28f6e320b/Key.snk -------------------------------------------------------------------------------- /LicenseHeaderManager.2019/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LicenseHeaderManager.2019/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | License Header Manager 8 | An extension for adding license headers to source code files. 9 | https://github.com/rubicon-oss/LicenseHeaderManager 10 | https://github.com/rubicon-oss/LicenseHeaderManager/wiki 11 | VsixInformation/Icon.png 12 | VsixInformation/Preview.png 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Console/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Console/ConsoleProgress.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Console 17 | { 18 | /// 19 | /// This class ensures that the files are processed and printed in the correct order to the console. 20 | /// 21 | /// The type of progress information sent. 22 | public class ConsoleProgress : IProgress 23 | { 24 | private readonly Action _action; 25 | 26 | public ConsoleProgress (Action action) 27 | { 28 | _action = action ?? throw new ArgumentNullException (nameof(action)); 29 | } 30 | 31 | public void Report (T value) 32 | { 33 | _action (value); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Console/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle ("LicenseHeaderManager.Console")] 9 | [assembly: AssemblyDescription ("")] 10 | [assembly: AssemblyConfiguration ("")] 11 | [assembly: AssemblyCompany ("")] 12 | [assembly: AssemblyProduct ("LicenseHeaderManager.Console")] 13 | [assembly: AssemblyCopyright ("Copyright © 2021")] 14 | [assembly: AssemblyTrademark ("")] 15 | [assembly: AssemblyCulture ("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible (false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid ("912f8a5e-80bb-45cb-89f8-47d4b3c3a658")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion ("5.0.1.0")] 36 | [assembly: AssemblyFileVersion ("5.0.1.0")] 37 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Console/UpdateMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LicenseHeaderManager.Console 4 | { 5 | /// 6 | /// Specifies if the license headers should be inserted or removed from the files. 7 | /// 8 | public enum UpdateMode 9 | { 10 | Add = 0, 11 | Remove = 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Console/UpdateTarget.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace LicenseHeaderManager.Console 4 | { 5 | /// 6 | /// Specifies the target of the license header update operation. 7 | /// 8 | public enum UpdateTarget 9 | { 10 | Files = 0, 11 | Directory = 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/AdditionalPropertyTest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using NUnit.Framework; 16 | 17 | namespace LicenseHeaderManager.Core.Tests 18 | { 19 | [TestFixture] 20 | public class AdditionalPropertyTest 21 | { 22 | [Test] 23 | public void AdditionalProperty_ValidInput_ReturnsValidProperties () 24 | { 25 | const string token = "%TestToken%"; 26 | const string value = "Property value"; 27 | var property = new AdditionalProperty (token, value); 28 | 29 | var actualToken = property.Token; 30 | var actualValue = property.Value; 31 | 32 | Assert.That (actualToken, Is.EqualTo (token)); 33 | Assert.That (actualValue, Is.EqualTo (value)); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/LicenseHeaderInputBaseTest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using System.Collections.Generic; 16 | using System.IO; 17 | using System.Text; 18 | using NUnit.Framework; 19 | 20 | namespace LicenseHeaderManager.Core.Tests 21 | { 22 | [TestFixture] 23 | public abstract class LicenseHeaderInputBaseTest 24 | { 25 | protected List Paths; 26 | 27 | [SetUp] 28 | public void Setup () 29 | { 30 | Paths = new List(); 31 | } 32 | 33 | [TearDown] 34 | public void TearDown () 35 | { 36 | foreach (var path in Paths) 37 | File.Delete (path); 38 | } 39 | 40 | protected string CreateTestFile (string extension = null) 41 | { 42 | if (extension == null) 43 | extension = ".cs"; 44 | 45 | var testFile = Path.Combine (Path.GetTempPath(), Guid.NewGuid() + extension); 46 | Paths.Add (testFile); 47 | 48 | using (var fs = File.Create (testFile)) 49 | { 50 | var content = Encoding.UTF8.GetBytes (""); 51 | fs.Write (content, 0, content.Length); 52 | } 53 | 54 | return testFile; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/NotSupportedOptions.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using System.Collections.Generic; 16 | using LicenseHeaderManager.Core.Options; 17 | 18 | namespace LicenseHeaderManager.Core.Tests 19 | { 20 | /// 21 | /// This option class that is used for testing purposes is not supported because there is no built-in 22 | /// converter to (de-)serialize the Dictionary<int, string> type of the property NotSupportedMember. 23 | /// 24 | [LicenseHeaderManagerOptions] 25 | internal class NotSupportedOptions 26 | { 27 | public NotSupportedOptions () 28 | { 29 | NotSupportedMember = new Dictionary 30 | { 31 | { 1, "one" }, 32 | { 2, "two" } 33 | }; 34 | } 35 | 36 | public Dictionary NotSupportedMember { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/ReplacerErrorTest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using NUnit.Framework; 16 | 17 | namespace LicenseHeaderManager.Core.Tests 18 | { 19 | [TestFixture] 20 | public class ReplacerErrorTest 21 | { 22 | [Test] 23 | public void ReplacerError_ValidInput_ReturnsValidProperties () 24 | { 25 | const string description = "error description"; 26 | var replacerError = new ReplacerError (null, ReplacerErrorType.Miscellaneous, description); 27 | 28 | var actualInput = replacerError.Input; 29 | var actualType = replacerError.Type; 30 | var actualDescription = replacerError.Description; 31 | 32 | Assert.That (actualInput, Is.Null); 33 | Assert.That (actualType, Is.EqualTo (ReplacerErrorType.Miscellaneous)); 34 | Assert.That (actualDescription, Is.EqualTo (description)); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/ReplacerSuccessTest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using NUnit.Framework; 16 | 17 | namespace LicenseHeaderManager.Core.Tests 18 | { 19 | [TestFixture] 20 | public class ReplacerSuccessTest 21 | { 22 | [Test] 23 | public void ReplacerSuccess_ValidInput_ReturnsValidProperties () 24 | { 25 | const string filePath = @"C:\"; 26 | const string newContent = "new content text"; 27 | var replacerSuccess = new ReplacerSuccess (filePath, newContent); 28 | 29 | var actualFilePath = replacerSuccess.FilePath; 30 | var actualNewContent = replacerSuccess.NewContent; 31 | 32 | Assert.That (actualFilePath, Is.EqualTo (filePath)); 33 | Assert.That (actualNewContent, Is.EqualTo (newContent)); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/StringArrayExtensions.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Core.Tests 17 | { 18 | public static class StringArrayExtensions 19 | { 20 | public static string JoinWithNewLine (this string[] array) 21 | { 22 | return string.Join (Environment.NewLine, array); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/UserInfoTest.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using NUnit.Framework; 16 | 17 | namespace LicenseHeaderManager.Core.Tests 18 | { 19 | [TestFixture] 20 | public class UserInfoTest 21 | { 22 | [Test] 23 | public void Name_ReturnsName () 24 | { 25 | var name = UserInfo.Name; 26 | Assert.That (name, Is.Not.Null.Or.Empty); 27 | } 28 | 29 | [Test] 30 | public void DisplayName_ReturnsDisplayName () 31 | { 32 | var name = UserInfo.DisplayName; 33 | Assert.That (name, Is.Not.Null.Or.Empty); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core.Tests/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using System.Runtime.CompilerServices; 16 | 17 | [assembly: 18 | InternalsVisibleTo ( 19 | "LicenseHeaderManager.Core.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100a518" 20 | + "63ec92c8300ac3838c02fc45700305e1d0c531fc50bb69386935bbe857706dfcaf2025f9b7d88fbf232e68308db5d131d0" 21 | + "4fed6d1b5f628d9f62bee787a4b59232a12f2d8a9524ca0b598203c75c3f3f348a5f9dc26516c8275de7b665126edb9cd8" 22 | + "627bac1f4ec69aa98f16912b8f604bd1bdf07edf008ce165436031b6")] 23 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/ICommentParser.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Core 17 | { 18 | public interface ICommentParser 19 | { 20 | /// 21 | /// Parses a given text according to a language-specific comment syntax. Given a text, it extracts the comments. 22 | /// 23 | /// The text to be parsed. 24 | /// Returns the comments contained in , according to the language-specific comment syntax. 25 | /// Thrown if parsing comments fails due to invalid syntax. 26 | /// 27 | /// The language-specific comment syntax may be configured using the constructor of an 28 | /// implementation. 29 | /// 30 | string Parse (string text); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/IDocumentHeader.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using System.IO; 16 | 17 | namespace LicenseHeaderManager.Core 18 | { 19 | public interface IDocumentHeader 20 | { 21 | /// 22 | /// Gets a value denoting the header represented by this is non-existing, i. e. if the 23 | /// property is null. 24 | /// 25 | bool IsEmpty { get; } 26 | 27 | /// 28 | /// Gets the object associated with the file this refers to. 29 | /// 30 | FileInfo FileInfo { get; } 31 | 32 | /// 33 | /// Gets the effective text denoting the license header text represented by this instance, 34 | /// with expandable properties having been replaced. 35 | /// 36 | string Text { get; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/ILicenseHeaderExtractor.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using System.Collections.Generic; 16 | using System.IO; 17 | 18 | namespace LicenseHeaderManager.Core 19 | { 20 | /// 21 | /// Provides members to parse and extract information describing license headers from given license header definition files. 22 | /// 23 | public interface ILicenseHeaderExtractor 24 | { 25 | /// 26 | /// Extracts license header definitions from a license header definition file represented by its path. 27 | /// 28 | /// 29 | /// The path to the license header definition file whose header definitions should be 30 | /// extracted. 31 | /// 32 | /// If the file represented by does not exists. 33 | /// 34 | /// Returns a whose keys are extensions identifying a language and whose 35 | /// values represent the license header definition for the corresponding language. If the dictionary is , a 36 | /// respective file's header is to be removed. 37 | /// 38 | Dictionary ExtractHeaderDefinitions (string definitionFilePath); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/LicenseHeaderInputMode.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Core 17 | { 18 | /// 19 | /// Identifies different kinds of input supported by the . 20 | /// 21 | /// 22 | internal enum LicenseHeaderInputMode 23 | { 24 | /// 25 | /// License Headers are updated solely based on the input files' paths. Reading and writing files is done by the Core. 26 | /// 27 | FilePath = 0, 28 | 29 | /// 30 | /// License Headers are updated solely based on the input files' contents. Only the content itself, represented as 31 | /// , is manipulated. 32 | /// 33 | Content = 1 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/LineEndInformation.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Core 17 | { 18 | /// 19 | /// Class for summarizing the information about the line end, where is it (index) and what character is it (CR, LR, 20 | /// CR+LF). 21 | /// 22 | internal class LineEndInformation 23 | { 24 | /// 25 | /// Initializes a new instance. 26 | /// 27 | /// Index of occurrence. 28 | /// Line ending (CR, LR or CR+LF). 29 | public LineEndInformation (int index, string lineEnd) 30 | { 31 | Index = index; 32 | LineEnd = lineEnd; 33 | } 34 | 35 | /// 36 | /// Index of occurrence. 37 | /// 38 | public int Index { get; } 39 | 40 | /// 41 | /// Length of the line ending this was initialized with. 42 | /// 43 | public int LineEndLength => LineEnd.Length; 44 | 45 | /// 46 | /// Line ending (CR, LR or CR+LF). 47 | /// 48 | private string LineEnd { get; } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/NewLineConst.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using System.Diagnostics.CodeAnalysis; 16 | 17 | namespace LicenseHeaderManager.Core 18 | { 19 | /// 20 | /// Contains new line constants. 21 | /// 22 | [SuppressMessage ("ReSharper", "InconsistentNaming", Justification = "For such special constants, different notations would be uncommon and maybe confusing")] 23 | internal static class NewLineConst 24 | { 25 | /// 26 | /// Carriage Return. 27 | /// 28 | public const string CR = "\r"; 29 | 30 | /// 31 | /// Line feed. 32 | /// 33 | public const string LF = "\n"; 34 | 35 | /// 36 | /// Carriage return, followed by line feed. 37 | /// 38 | public const string CRLF = "\r\n"; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/Options/LicenseHeaderManagerOptionsAttribute.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Core.Options 17 | { 18 | /// 19 | /// Represents an attribute discerning types eligible for serialization and deserialization via 20 | /// . 21 | /// 22 | /// 23 | [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct)] 24 | public class LicenseHeaderManagerOptionsAttribute : Attribute 25 | { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/ParseException.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using LicenseHeaderManager.Core.Properties; 16 | 17 | namespace LicenseHeaderManager.Core 18 | { 19 | /// 20 | /// An used to denote errors while parsing comments. 21 | /// 22 | [Serializable] 23 | internal class ParseException : Exception 24 | { 25 | /// 26 | public ParseException () 27 | : base (string.Format (Resources.Error_InvalidLicenseHeader, string.Empty)) 28 | { 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/ReplacerSuccess.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Core 17 | { 18 | /// 19 | /// Represents information linked to a successful license header update operation when the 20 | /// was invoked with file contents. 21 | /// 22 | public class ReplacerSuccess 23 | { 24 | /// 25 | /// Initializes a new instance. 26 | /// 27 | /// The path of the file whose license headers have been successfully updated. 28 | /// The new content of the file whose license headers have been successfully updated. 29 | public ReplacerSuccess (string filePath, string newContent) 30 | { 31 | FilePath = filePath; 32 | NewContent = newContent; 33 | } 34 | 35 | /// 36 | /// The path of the file whose license headers have been successfully updated. 37 | /// 38 | public string FilePath { get; } 39 | 40 | /// 41 | /// The new content of the file whose license headers have been successfully updated. 42 | /// 43 | public string NewContent { get; } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Core/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Shared/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | using System.Diagnostics.CodeAnalysis; 16 | 17 | [assembly: SuppressMessage ("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")] -------------------------------------------------------------------------------- /LicenseHeaderManager.Shared/Headers/NewLineConst.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.Headers 17 | { 18 | /// 19 | /// Contains new line constants. 20 | /// 21 | public class NewLineConst 22 | { 23 | /// 24 | /// Carriage Return. 25 | /// 26 | public const string CR = "\r"; 27 | 28 | /// 29 | /// Line feed. 30 | /// 31 | public const string LF = "\n"; 32 | 33 | /// 34 | /// Carriage return, followed by line feed. 35 | /// 36 | public const string CRLF = "\r\n"; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Shared/LicenseHeaderManager.Shared.shproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {4F20BA37-5942-466D-B51F-85105CB74277} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Shared/MenuItemButtonHandler/MenuItemButtonLevel.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.MenuItemButtonHandler 17 | { 18 | /// 19 | /// Provides different levels/scopes menu item buttons may reside in. 20 | /// 21 | public enum MenuItemButtonLevel 22 | { 23 | /// 24 | /// A menu item button that appears in the right click menu of a solution node. 25 | /// 26 | Solution, 27 | 28 | /// 29 | /// A menu item button that appears in the right click menu of a project node. 30 | /// 31 | Project, 32 | 33 | /// 34 | /// A menu item button that appears in the right click menu of a folder node. 35 | /// 36 | Folder 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Shared/MenuItemButtonHandler/MenuItemButtonOperation.cs: -------------------------------------------------------------------------------- 1 | /* Copyright (c) rubicon IT GmbH 2 | * 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), 4 | * to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 5 | * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | * 7 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 10 | * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 11 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | */ 13 | 14 | using System; 15 | 16 | namespace LicenseHeaderManager.MenuItemButtonHandler 17 | { 18 | /// 19 | /// Specifies different types of operations the click of a menu item button may invoke 20 | /// 21 | public enum MenuItemButtonOperation 22 | { 23 | /// 24 | /// Inserts license headers into one or multiple files or replaces them. 25 | /// 26 | Add, 27 | 28 | /// 29 | /// Removes license headers from one or multiple files. 30 | /// 31 | Remove 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LicenseHeaderManager.Shared/Options/DialogPageControls/WpfDefaultLicenseHeader.xaml: -------------------------------------------------------------------------------- 1 |  14 | 22 | 23 | 26 |