├── DLL ├── CSkin.dll ├── NLog.dll ├── AppDomainToolkit.dll ├── NLog.Windows.Forms.dll ├── Microsoft.Build.Locator.dll ├── Microsoft.WindowsAPICodePack.dll └── Microsoft.WindowsAPICodePack.Shell.dll ├── AntDeploy ├── Key.snk ├── NLog.dll ├── AntDeployApp.exe ├── AntDeployApp.pdb ├── LibGit2Sharp.dll ├── LibGit2Sharp.pdb ├── Renci.SshNet.dll ├── Resources │ ├── qq.jpg │ ├── Logo.ico │ ├── Logo1.ico │ ├── ant.ico │ ├── ant16.bmp │ ├── Images.png │ ├── Package.ico │ ├── antpreview.png │ └── __TemplateIcon.png ├── ToastHelper.dll ├── netstandard.dll ├── Newtonsoft.Json.dll ├── System.Buffers.dll ├── System.Reactive.dll ├── AntDeployWinform.dll ├── AntDeployWinform.pdb ├── System.ValueTuple.dll ├── WinFormAnimation.dll ├── CircularProgressBar.dll ├── NLog.Windows.Forms.dll ├── Microsoft.Build.Locator.dll ├── lib │ └── win32 │ │ ├── x64 │ │ └── git2-572e4d8.dll │ │ └── x86 │ │ └── git2-572e4d8.dll ├── en │ └── AntDeployWinform.resources.dll ├── zh │ └── AntDeployWinform.resources.dll ├── zh-CN │ └── AntDeployWinform.resources.dll ├── System.Threading.Tasks.Extensions.dll ├── zh-Hans │ ├── AntDeployWinform.resources.dll │ └── extension.vsixlangpack ├── System.Net.WebSockets.Client.Managed.dll ├── System.Runtime.CompilerServices.Unsafe.dll ├── PkgCmdID.cs ├── Guids.cs ├── Ids.cs ├── app.config ├── GlobalSuppressions.cs ├── MsBuildHelper.cs ├── AntDeployApp.exe.config ├── Commands │ ├── EditProjectsCommand.cs │ └── BaseCommand.cs ├── VSPackage.Designer.cs ├── nlog.config ├── Properties │ └── AssemblyInfo.cs ├── Models │ └── ProjectKinds.cs ├── EditProjectPackage.vsct ├── EditProjectPackage.cs ├── EditProjectPackage.zh-Hans.vsct ├── EditProjectPackage.en.vsct ├── source.extension.vsixmanifest └── VSPackage.tt ├── AntDeployApp ├── Logo1.ico ├── Logo12.ico ├── netstandard.dll ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ └── AssemblyInfo.cs ├── AntDeploy.json └── App.config ├── AntDeployAgentService ├── nssm.exe ├── _deploy_end_.bat ├── Properties │ └── PublishProfiles │ │ └── FolderProfile.pubxml ├── App.config └── AntDeployAgentService.csproj ├── AntDeploy2022 └── AntDeployV2 │ ├── Key.snk │ ├── NLog.dll │ ├── CSkin.dll │ ├── ToastHelper.dll │ ├── netstandard.dll │ ├── AntDeployApp.exe │ ├── LibGit2Sharp.dll │ ├── Renci.SshNet.dll │ ├── Resources │ ├── Logo.ico │ ├── ant.ico │ ├── qq.jpg │ ├── Images.png │ ├── Logo1.ico │ ├── ant16.bmp │ ├── Package.ico │ ├── antpreview.png │ ├── __TemplateIcon.png │ └── AntDeployPackage.ico │ ├── System.Buffers.dll │ ├── AntDeployWinform.dll │ ├── Newtonsoft.Json.dll │ ├── System.Reactive.dll │ ├── WinFormAnimation.dll │ ├── CircularProgressBar.dll │ ├── NLog.Windows.Forms.dll │ ├── System.ValueTuple.dll │ ├── Microsoft.Build.Locator.dll │ ├── System.Numerics.Vectors.dll │ ├── Microsoft.WindowsAPICodePack.dll │ ├── en │ └── AntDeployWinform.resources.dll │ ├── zh │ └── AntDeployWinform.resources.dll │ ├── Microsoft.WindowsAPICodePack.Shell.dll │ ├── System.Threading.Tasks.Extensions.dll │ ├── zh-CN │ └── AntDeployWinform.resources.dll │ ├── zh-Hans │ ├── AntDeployWinform.resources.dll │ └── extension.vsixlangpack │ ├── System.Net.WebSockets.Client.Managed.dll │ ├── System.Runtime.CompilerServices.Unsafe.dll │ ├── PkgCmdID.cs │ ├── Guids.cs │ ├── AntDeployApp.exe.config │ ├── MsBuildHelper.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── source.extension.vsixmanifest ├── AntDeployWinform ├── Resources │ ├── ant.ico │ ├── qq.jpg │ ├── zan.png │ ├── Logo1.ico │ ├── video.png │ └── Logo12.ico ├── Models │ ├── ExRichTextBox.cs │ ├── Helpers │ │ ├── ExtensionMethods.cs │ │ └── Transparenter.cs │ ├── LinuxArgModel.cs │ ├── FileStruct.cs │ ├── ProjectParam.cs │ ├── GetVersionResult.cs │ ├── ExTreeView.cs │ └── TempFileHelper.cs ├── AntDeployForm.cs ├── Properties │ ├── Settings.settings │ ├── Settings.Designer.cs │ └── AssemblyInfo.cs ├── Vsix.cs ├── Util │ └── WindowsMessageHelper.cs └── Winform │ ├── FirstService.cs │ └── About.cs ├── AntDeploy2019 └── AntDeployVsix │ ├── Key.snk │ ├── NLog.dll │ ├── CSkin.dll │ ├── AntDeployApp.exe │ ├── LibGit2Sharp.dll │ ├── Renci.SshNet.dll │ ├── Resources │ ├── qq.jpg │ ├── Logo.ico │ ├── ant.ico │ ├── Images.png │ ├── Logo1.ico │ ├── Package.ico │ ├── ant16.bmp │ ├── antpreview.png │ ├── __TemplateIcon.png │ └── AntDeployPackage.ico │ ├── ToastHelper.dll │ ├── netstandard.dll │ ├── System.Buffers.dll │ ├── AntDeployWinform.dll │ ├── Newtonsoft.Json.dll │ ├── System.Reactive.dll │ ├── System.ValueTuple.dll │ ├── WinFormAnimation.dll │ ├── CircularProgressBar.dll │ ├── NLog.Windows.Forms.dll │ ├── Microsoft.Build.Locator.dll │ ├── System.Numerics.Vectors.dll │ ├── en │ └── AntDeployWinform.resources.dll │ ├── zh │ └── AntDeployWinform.resources.dll │ ├── zh-CN │ └── AntDeployWinform.resources.dll │ ├── System.Threading.Tasks.Extensions.dll │ ├── zh-Hans │ ├── AntDeployWinform.resources.dll │ └── extension.vsixlangpack │ ├── System.Net.WebSockets.Client.Managed.dll │ ├── System.Runtime.CompilerServices.Unsafe.dll │ ├── PkgCmdID.cs │ ├── Guids.cs │ ├── AntDeployApp.exe.config │ ├── MsBuildHelper.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── source.extension.vsixmanifest ├── AntDeployAgentWindowsService ├── WindowsServiceTool.exe ├── AntDeploy.json ├── ProjectInstaller.cs ├── Program.cs ├── App.config ├── Service1.Designer.cs ├── Properties │ └── AssemblyInfo.cs ├── Service1.cs └── ProjectInstaller.designer.cs ├── AntDeployAgent ├── Vsix.cs ├── MyApp │ └── Service │ │ ├── ICommon.cs │ │ ├── CommonProcessor.cs │ │ ├── IPublishProviderAPI.cs │ │ └── PublishProviderFactory.cs ├── Operation │ ├── OperationStep.cs │ ├── IOperations.cs │ ├── OperationsFactory.cs │ └── Arguments.cs ├── WebApiCore │ ├── IWebApiRouter.cs │ ├── MyWebApiRouter.cs │ └── WebApiMiddleware.cs ├── Model │ ├── LoggerModel.cs │ ├── DeployResult.cs │ ├── GetVersionVm.cs │ └── IIsSiteCheckResult.cs ├── Util │ └── CodingHelper.cs ├── System.Configuration │ ├── MachineConfig.cs │ ├── ValidatorCallback.cs │ ├── ConfigurationUserLevel.cs │ ├── NonEmptyStringFlags.cs │ ├── ConfigurationAllowExeDefinition.cs │ ├── PropertyValueOrigin.cs │ ├── TimeSpanSerializedFormat.cs │ ├── TimeSpanPropertyFlags.cs │ ├── ConfigurationAllowDefinition.cs │ ├── ConfigurationElementCollectionType.cs │ ├── ExeConfigurationFileMap.cs │ ├── ConfigurationValidatorBase.cs │ ├── DefaultValidator.cs │ ├── ConfigurationElementProperty.cs │ ├── ConfigHelper.cs │ ├── ConfigurationPropertyOptions.cs │ ├── KeyValueInternalCollection.cs │ ├── InternalConfigurationRoot.cs │ ├── PositiveTimeSpanValidator.cs │ ├── ContextInformation.cs │ ├── PositiveTimeSpanValidatorAttribute.cs │ ├── CallbackValidator.cs │ ├── IgnoreSection.cs │ ├── ConfigurationConverterBase.cs │ ├── RegexStringValidator.cs │ ├── TypeNameConverter.cs │ ├── RegexStringValidatorAttribute.cs │ ├── SubclassTypeValidator.cs │ ├── ConfigurationCollectionAttribute.cs │ └── WhiteSpaceTrimStringConverter.cs ├── WebSocketApp │ └── WebSocketMiddleware.cs └── System.Configuration.Internal │ ├── IInternalConfigRoot.cs │ ├── IConfigSystem.cs │ ├── IInternalConfigSystem.cs │ └── IInternalConfigConfigurationFactory.cs ├── AntDeployAgentWindows ├── Vsix.cs ├── MyApp │ └── Service │ │ ├── ICommon.cs │ │ ├── CommonProcessor.cs │ │ ├── IPublishProviderAPI.cs │ │ └── PublishProviderFactory.cs ├── packages.config ├── Operation │ ├── OperationStep.cs │ ├── IOperations.cs │ ├── OperationsFactory.cs │ └── Arguments.cs ├── Model │ ├── GetVersionVm.cs │ ├── LoggerModel.cs │ └── DeployResult.cs ├── WebApiCore │ ├── IWebApiRouter.cs │ ├── MyWebApiRouter.cs │ └── WebApiMiddleware.cs ├── App.config ├── Properties │ └── AssemblyInfo.cs ├── WebSocketApp │ └── WebSocketMiddleware.cs └── Program.cs ├── CMD └── AntDeployCommand │ ├── Model │ └── Vsix.cs │ ├── Interface │ └── IOperations.cs │ ├── Properties │ └── PublishProfiles │ │ └── FolderProfile.pubxml │ ├── Utils │ └── LogHelper.cs │ ├── AntDeployCommand.csproj │ └── Program.cs ├── MigrationBackup └── 1efa518c │ └── AntDeployAgentWindowsService │ └── packages.config └── AntDeployAgentLinuxService └── AntDeployAgentLinuxService ├── AntAgent.service ├── Properties └── PublishProfiles │ └── FolderProfile.pubxml ├── AntDeployAgentLinuxService.config ├── AntDeployAgentLinuxService.csproj ├── Program.cs └── AntDeployAgentService.cs /DLL/CSkin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/DLL/CSkin.dll -------------------------------------------------------------------------------- /DLL/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/DLL/NLog.dll -------------------------------------------------------------------------------- /AntDeploy/Key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Key.snk -------------------------------------------------------------------------------- /AntDeploy/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/NLog.dll -------------------------------------------------------------------------------- /AntDeployApp/Logo1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployApp/Logo1.ico -------------------------------------------------------------------------------- /AntDeployApp/Logo12.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployApp/Logo12.ico -------------------------------------------------------------------------------- /DLL/AppDomainToolkit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/DLL/AppDomainToolkit.dll -------------------------------------------------------------------------------- /AntDeploy/AntDeployApp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/AntDeployApp.exe -------------------------------------------------------------------------------- /AntDeploy/AntDeployApp.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/AntDeployApp.pdb -------------------------------------------------------------------------------- /AntDeploy/LibGit2Sharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/LibGit2Sharp.dll -------------------------------------------------------------------------------- /AntDeploy/LibGit2Sharp.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/LibGit2Sharp.pdb -------------------------------------------------------------------------------- /AntDeploy/Renci.SshNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Renci.SshNet.dll -------------------------------------------------------------------------------- /AntDeploy/Resources/qq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/qq.jpg -------------------------------------------------------------------------------- /AntDeploy/ToastHelper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/ToastHelper.dll -------------------------------------------------------------------------------- /AntDeploy/netstandard.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/netstandard.dll -------------------------------------------------------------------------------- /DLL/NLog.Windows.Forms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/DLL/NLog.Windows.Forms.dll -------------------------------------------------------------------------------- /AntDeploy/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AntDeploy/Resources/Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/Logo.ico -------------------------------------------------------------------------------- /AntDeploy/Resources/Logo1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/Logo1.ico -------------------------------------------------------------------------------- /AntDeploy/Resources/ant.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/ant.ico -------------------------------------------------------------------------------- /AntDeploy/Resources/ant16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/ant16.bmp -------------------------------------------------------------------------------- /AntDeploy/System.Buffers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/System.Buffers.dll -------------------------------------------------------------------------------- /AntDeploy/System.Reactive.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/System.Reactive.dll -------------------------------------------------------------------------------- /AntDeployApp/netstandard.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployApp/netstandard.dll -------------------------------------------------------------------------------- /AntDeploy/AntDeployWinform.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/AntDeployWinform.dll -------------------------------------------------------------------------------- /AntDeploy/AntDeployWinform.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/AntDeployWinform.pdb -------------------------------------------------------------------------------- /AntDeploy/Resources/Images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/Images.png -------------------------------------------------------------------------------- /AntDeploy/Resources/Package.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/Package.ico -------------------------------------------------------------------------------- /AntDeploy/System.ValueTuple.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/System.ValueTuple.dll -------------------------------------------------------------------------------- /AntDeploy/WinFormAnimation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/WinFormAnimation.dll -------------------------------------------------------------------------------- /AntDeployAgentService/nssm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployAgentService/nssm.exe -------------------------------------------------------------------------------- /DLL/Microsoft.Build.Locator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/DLL/Microsoft.Build.Locator.dll -------------------------------------------------------------------------------- /AntDeploy/CircularProgressBar.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/CircularProgressBar.dll -------------------------------------------------------------------------------- /AntDeploy/NLog.Windows.Forms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/NLog.Windows.Forms.dll -------------------------------------------------------------------------------- /AntDeploy/Resources/antpreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/antpreview.png -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Key.snk -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/NLog.dll -------------------------------------------------------------------------------- /AntDeployWinform/Resources/ant.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployWinform/Resources/ant.ico -------------------------------------------------------------------------------- /AntDeployWinform/Resources/qq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployWinform/Resources/qq.jpg -------------------------------------------------------------------------------- /AntDeployWinform/Resources/zan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployWinform/Resources/zan.png -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Key.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Key.snk -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/NLog.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/NLog.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/CSkin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/CSkin.dll -------------------------------------------------------------------------------- /AntDeployWinform/Resources/Logo1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployWinform/Resources/Logo1.ico -------------------------------------------------------------------------------- /AntDeployWinform/Resources/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployWinform/Resources/video.png -------------------------------------------------------------------------------- /DLL/Microsoft.WindowsAPICodePack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/DLL/Microsoft.WindowsAPICodePack.dll -------------------------------------------------------------------------------- /AntDeploy/Microsoft.Build.Locator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Microsoft.Build.Locator.dll -------------------------------------------------------------------------------- /AntDeploy/Resources/__TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/Resources/__TemplateIcon.png -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/CSkin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/CSkin.dll -------------------------------------------------------------------------------- /AntDeployWinform/Resources/Logo12.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployWinform/Resources/Logo12.ico -------------------------------------------------------------------------------- /AntDeploy/lib/win32/x64/git2-572e4d8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/lib/win32/x64/git2-572e4d8.dll -------------------------------------------------------------------------------- /AntDeploy/lib/win32/x86/git2-572e4d8.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/lib/win32/x86/git2-572e4d8.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/ToastHelper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/ToastHelper.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/netstandard.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/netstandard.dll -------------------------------------------------------------------------------- /AntDeployWinform/Models/ExRichTextBox.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployWinform/Models/ExRichTextBox.cs -------------------------------------------------------------------------------- /AntDeploy/en/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/en/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy/zh/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/zh/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/AntDeployApp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/AntDeployApp.exe -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/LibGit2Sharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/LibGit2Sharp.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Renci.SshNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Renci.SshNet.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/qq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/qq.jpg -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/ToastHelper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/ToastHelper.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/netstandard.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/netstandard.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/AntDeployApp.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/AntDeployApp.exe -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/LibGit2Sharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/LibGit2Sharp.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Renci.SshNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Renci.SshNet.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/Logo.ico -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/ant.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/ant.ico -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/qq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/qq.jpg -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/System.Buffers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/System.Buffers.dll -------------------------------------------------------------------------------- /DLL/Microsoft.WindowsAPICodePack.Shell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/DLL/Microsoft.WindowsAPICodePack.Shell.dll -------------------------------------------------------------------------------- /AntDeploy/zh-CN/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/zh-CN/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/Logo.ico -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/ant.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/ant.ico -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/System.Buffers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/System.Buffers.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/AntDeployWinform.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/AntDeployWinform.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/Images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/Images.png -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/Logo1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/Logo1.ico -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/ant16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/ant16.bmp -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/System.Reactive.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/System.Reactive.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/WinFormAnimation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/WinFormAnimation.dll -------------------------------------------------------------------------------- /AntDeploy/System.Threading.Tasks.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/System.Threading.Tasks.Extensions.dll -------------------------------------------------------------------------------- /AntDeploy/zh-Hans/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/zh-Hans/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/AntDeployWinform.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/AntDeployWinform.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/Images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/Images.png -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/Logo1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/Logo1.ico -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/Package.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/Package.ico -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/ant16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/ant16.bmp -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/System.Reactive.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/System.Reactive.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/System.ValueTuple.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/System.ValueTuple.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/WinFormAnimation.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/WinFormAnimation.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/CircularProgressBar.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/CircularProgressBar.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/NLog.Windows.Forms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/NLog.Windows.Forms.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/Package.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/Package.ico -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/System.ValueTuple.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/System.ValueTuple.dll -------------------------------------------------------------------------------- /AntDeploy/System.Net.WebSockets.Client.Managed.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/System.Net.WebSockets.Client.Managed.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/CircularProgressBar.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/CircularProgressBar.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/NLog.Windows.Forms.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/NLog.Windows.Forms.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/antpreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/antpreview.png -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/WindowsServiceTool.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeployAgentWindowsService/WindowsServiceTool.exe -------------------------------------------------------------------------------- /AntDeploy/System.Runtime.CompilerServices.Unsafe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy/System.Runtime.CompilerServices.Unsafe.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/antpreview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/antpreview.png -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Microsoft.Build.Locator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Microsoft.Build.Locator.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/__TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/__TemplateIcon.png -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/System.Numerics.Vectors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/System.Numerics.Vectors.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Microsoft.Build.Locator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Microsoft.Build.Locator.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/__TemplateIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/__TemplateIcon.png -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/System.Numerics.Vectors.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/System.Numerics.Vectors.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Resources/AntDeployPackage.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Resources/AntDeployPackage.ico -------------------------------------------------------------------------------- /AntDeployAgent/Vsix.cs: -------------------------------------------------------------------------------- 1 | namespace AntDeployAgent 2 | { 3 | public static class Version 4 | { 5 | public const string VERSION = "7.1"; 6 | } 7 | } -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Resources/AntDeployPackage.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/Resources/AntDeployPackage.ico -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Microsoft.WindowsAPICodePack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Microsoft.WindowsAPICodePack.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/en/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/en/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/zh/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/zh/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/en/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/en/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/zh/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/zh/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/zh-CN/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/zh-CN/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Microsoft.WindowsAPICodePack.Shell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/Microsoft.WindowsAPICodePack.Shell.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/System.Threading.Tasks.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/System.Threading.Tasks.Extensions.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/zh-CN/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/zh-CN/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/zh-Hans/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/zh-Hans/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeployAgentWindows/Vsix.cs: -------------------------------------------------------------------------------- 1 | namespace AntDeployAgentWindows 2 | { 3 | public static class Version 4 | { 5 | public const string VERSION = "3.5"; 6 | } 7 | } -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/System.Threading.Tasks.Extensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/System.Threading.Tasks.Extensions.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/zh-Hans/AntDeployWinform.resources.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/zh-Hans/AntDeployWinform.resources.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/System.Net.WebSockets.Client.Managed.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/System.Net.WebSockets.Client.Managed.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/System.Net.WebSockets.Client.Managed.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/System.Net.WebSockets.Client.Managed.dll -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/System.Runtime.CompilerServices.Unsafe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2022/AntDeployV2/System.Runtime.CompilerServices.Unsafe.dll -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/System.Runtime.CompilerServices.Unsafe.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yuzd/AntDeploy/HEAD/AntDeploy2019/AntDeployVsix/System.Runtime.CompilerServices.Unsafe.dll -------------------------------------------------------------------------------- /AntDeployAgentService/_deploy_end_.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | sc stop AntDeployAgentWindowsService ::这句的意思是停止Agent服务 3 | xcopy /e $DeployFolder$ $AppFolder$ /y ::这句里面有占位符,意思是复制文件 4 | sc start AntDeployAgentWindowsService ::这句的意思是启动Agent服务 -------------------------------------------------------------------------------- /AntDeploy/PkgCmdID.cs: -------------------------------------------------------------------------------- 1 | // PkgCmdID.cs 2 | // MUST match PkgCmdID.h 3 | using System; 4 | 5 | namespace yuzd.AntDeploy 6 | { 7 | static class PkgCmdIDList 8 | { 9 | public const uint AntDeployCommand = 0x100; 10 | 11 | 12 | }; 13 | } -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/PkgCmdID.cs: -------------------------------------------------------------------------------- 1 | // PkgCmdID.cs 2 | // MUST match PkgCmdID.h 3 | using System; 4 | 5 | namespace yuzd.AntDeploy 6 | { 7 | static class PkgCmdIDList 8 | { 9 | public const uint AntDeployCommand = 0x100; 10 | 11 | 12 | }; 13 | } -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/PkgCmdID.cs: -------------------------------------------------------------------------------- 1 | // PkgCmdID.cs 2 | // MUST match PkgCmdID.h 3 | using System; 4 | 5 | namespace yuzd.AntDeploy 6 | { 7 | static class PkgCmdIDList 8 | { 9 | public const uint AntDeployCommand = 0x100; 10 | 11 | 12 | }; 13 | } -------------------------------------------------------------------------------- /CMD/AntDeployCommand/Model/Vsix.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace AntDeployCommand.Model 6 | { 7 | public static class Vsix 8 | { 9 | public const string AGENTVERSION = "7.0"; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AntDeployAgent/MyApp/Service/ICommon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.MyApp.Service 8 | { 9 | public interface ICommon 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /AntDeployApp/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MigrationBackup/1efa518c/AntDeployAgentWindowsService/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AntDeployWinform/AntDeployForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AntDeployWinform.Models; 7 | using AntDeployWinform.Winform; 8 | 9 | namespace AntDeployWinform 10 | { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /AntDeployWinform/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/MyApp/Service/ICommon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.MyApp.Service 8 | { 9 | public interface ICommon 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /AntDeployWinform/Models/Helpers/ExtensionMethods.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | 3 | namespace AltoControls 4 | { 5 | public static class ExtensionMethods 6 | { 7 | public static Color FromHex(this string hex) 8 | { 9 | return ColorTranslator.FromHtml(hex); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /AntDeployAgent/MyApp/Service/CommonProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.MyApp.Service 8 | { 9 | public abstract class CommonProcessor : ICommon 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/MyApp/Service/CommonProcessor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.MyApp.Service 8 | { 9 | public abstract class CommonProcessor : ICommon 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AntDeployAgentLinuxService/AntDeployAgentLinuxService/AntAgent.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=AntAgent 3 | 4 | [Service] 5 | Type=notify 6 | WorkingDirectory=/usr/AntAgent 7 | ExecStart=/usr/AntAgent/AntDeployAgentLinuxService 8 | SyslogIdentifier=AntAgent 9 | Restart=always 10 | RestartSec=5 11 | KillSignal=SIGINT 12 | 13 | [Install] 14 | WantedBy=multi-user.target -------------------------------------------------------------------------------- /AntDeploy/zh-Hans/extension.vsixlangpack: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AntDeploy 5 | 一键发布部署到服务器Docker,iis,windows服务(支持netcore和netframework) 6 | 7 | -------------------------------------------------------------------------------- /AntDeployAgent/Operation/OperationStep.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Operation 8 | { 9 | enum OperationStep 10 | { 11 | NONE, 12 | BACKEDUP, 13 | STOPPED, 14 | DEPLOYED, 15 | STARTED 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/zh-Hans/extension.vsixlangpack: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AntDeploy 5 | 一键发布部署到服务器Docker,iis,windows服务(支持netcore和netframework) 6 | 7 | -------------------------------------------------------------------------------- /CMD/AntDeployCommand/Interface/IOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Threading.Tasks; 5 | 6 | namespace AntDeployCommand.Interface 7 | { 8 | public interface IOperations 9 | { 10 | 11 | void ValidateArguments(); 12 | 13 | Task Execute(); 14 | 15 | string Name { get; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/zh-Hans/extension.vsixlangpack: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AntDeploy 5 | 一键发布部署到服务器Docker,iis,windows服务(支持netcore和netframework) 6 | 7 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Operation/OperationStep.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Operation 8 | { 9 | enum OperationStep 10 | { 11 | NONE, 12 | BACKEDUP, 13 | STOPPED, 14 | DEPLOYED, 15 | STARTED 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AntDeployAgent/WebApiCore/IWebApiRouter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.Owin; 7 | 8 | namespace AntDeployAgentWindows.WebApiCore 9 | { 10 | /// 11 | /// 路由配置 12 | /// 13 | interface IWebApiRouter 14 | { 15 | BaseWebApi RouteTo(IOwinContext c); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Model/GetVersionVm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Model 8 | { 9 | public class GetVersionVm 10 | { 11 | public string Token { get; set; } 12 | public string Type { get; set; } 13 | public string Name { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /AntDeployAgent/Model/LoggerModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Model 8 | { 9 | 10 | 11 | public class LoggerModel 12 | { 13 | public string Msg { get; set; } 14 | public DateTime Date { get; set; } 15 | public bool IsActive { get; set; } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/WebApiCore/IWebApiRouter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.Owin; 7 | 8 | namespace AntDeployAgentWindows.WebApiCore 9 | { 10 | /// 11 | /// 路由配置 12 | /// 13 | interface IWebApiRouter 14 | { 15 | BaseWebApi RouteTo(IOwinContext c); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Model/LoggerModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Model 8 | { 9 | 10 | 11 | public class LoggerModel 12 | { 13 | public string Msg { get; set; } 14 | public DateTime Date { get; set; } 15 | public bool IsActive { get; set; } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AntDeployWinform/Vsix.cs: -------------------------------------------------------------------------------- 1 | namespace AntDeployWinform 2 | { 3 | public static class Vsix 4 | { 5 | public const string FORM_NAME = "AntDeploy("+VERSION+")"; 6 | public const string VERSION = "7.48"; 7 | public const string AGENTVERSION = "7.1"; 8 | public const string PRODUCT = "yuzd"; 9 | public const string PACKAGE = "AntDeploy"; 10 | public const string URL = "https://github.com/yuzd"; 11 | } 12 | } -------------------------------------------------------------------------------- /AntDeployApp/AntDeploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Env": [], 3 | "IIsConfig": { 4 | "SdkType": null, 5 | "WebSiteName": "", 6 | "LastEnvName": null 7 | }, 8 | "WindowsServiveConfig": { 9 | "ServiceName": "", 10 | "SdkType": null, 11 | "LastEnvName": null 12 | }, 13 | "DockerConfig": { 14 | "Prot": "", 15 | "AspNetCoreEnv": "", 16 | "LastEnvName": null, 17 | "RemoveDaysFromPublished": "10", 18 | "Volume": "" 19 | } 20 | } -------------------------------------------------------------------------------- /AntDeployWinform/Models/LinuxArgModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployWinform.Models 8 | { 9 | public class LinuxArgModel 10 | { 11 | public string Remark { get; set; } 12 | public string Mac { get; set; } 13 | public string Ip { get; set; } 14 | public string Pc { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AntDeploy/Guids.cs: -------------------------------------------------------------------------------- 1 | // Guids.cs 2 | // MUST match guids.h 3 | using System; 4 | 5 | namespace yuzd.AntDeploy 6 | { 7 | static class GuidList 8 | { 9 | public const string guidAntDeployPkgString = "2f0edaeb-127f-4467-acd7-918195a1a583"; 10 | public const string guidAntDeployCmdSetString = "ebc2240c-7db6-400f-8ccc-d10d958a4dd9"; 11 | 12 | public static readonly Guid guidAntDeployCmdSet = new Guid(guidAntDeployCmdSetString); 13 | }; 14 | } -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Guids.cs: -------------------------------------------------------------------------------- 1 | // Guids.cs 2 | // MUST match guids.h 3 | using System; 4 | 5 | namespace yuzd.AntDeploy 6 | { 7 | static class GuidList 8 | { 9 | public const string guidAntDeployPkgString = "2f0edaeb-127f-4467-acd7-918195a1a583"; 10 | public const string guidAntDeployCmdSetString = "ebc2240c-7db6-400f-8ccc-d10d958a4dd9"; 11 | 12 | public static readonly Guid guidAntDeployCmdSet = new Guid(guidAntDeployCmdSetString); 13 | }; 14 | } -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Guids.cs: -------------------------------------------------------------------------------- 1 | // Guids.cs 2 | // MUST match guids.h 3 | using System; 4 | 5 | namespace yuzd.AntDeploy 6 | { 7 | static class GuidList 8 | { 9 | public const string guidAntDeployPkgString = "2f0edaeb-127f-4467-acd7-918195a1a583"; 10 | public const string guidAntDeployCmdSetString = "b17151eb-1835-477e-a501-5f5cb7d1db91"; 11 | 12 | public static readonly Guid guidAntDeployCmdSet = new Guid(guidAntDeployCmdSetString); 13 | }; 14 | } -------------------------------------------------------------------------------- /AntDeploy/Ids.cs: -------------------------------------------------------------------------------- 1 | namespace AntDeploy 2 | { 3 | internal static class Ids 4 | { 5 | public const string PACKAGE = "08a2610d-b354-402c-99a8-9c2113e89ad8"; 6 | public const string CMD_SET = "6c7e3ed8-7da3-456d-802f-e11c4f8f8438"; 7 | public const string AUTO_LOAD_CONTEXT = "1B44FA30-D435-4754-B4A2-0A0E2906398C"; 8 | 9 | public const int EDIT_PROJECT_MENU_COMMAND_ID = 0x0100; 10 | public const int EDIT_PROJECTS_MENU_COMMAND_ID = 0x0110; 11 | } 12 | } -------------------------------------------------------------------------------- /AntDeploy/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /AntDeployAgent/Model/DeployResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Model 8 | { 9 | public class DeployResult: DeployResult 10 | { 11 | 12 | public T Data { get; set; } 13 | } 14 | 15 | public class DeployResult 16 | { 17 | public bool Success { get; set; } 18 | public string Msg { get; set; } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AntDeployAgent/Model/GetVersionVm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Model 8 | { 9 | public class GetVersionVm 10 | { 11 | public string Token { get; set; } 12 | public string Type { get; set; } 13 | public string Name { get; set; } 14 | public string Mac { get; set; } 15 | public bool WithArgs { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AntDeployAgent/Operation/IOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Operation 8 | { 9 | interface IOperations 10 | { 11 | void ValidateArguments(); 12 | void Backup(); 13 | void Restore(); 14 | void Stop(); 15 | void Deploy(); 16 | void Start(); 17 | void Execute(); 18 | void Rollback(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Model/DeployResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Model 8 | { 9 | public class DeployResult: DeployResult 10 | { 11 | 12 | public T Data { get; set; } 13 | } 14 | 15 | public class DeployResult 16 | { 17 | public bool Success { get; set; } 18 | public string Msg { get; set; } 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Operation/IOperations.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Operation 8 | { 9 | interface IOperations 10 | { 11 | void ValidateArguments(); 12 | void Backup(); 13 | void Restore(); 14 | void Stop(); 15 | void Deploy(); 16 | void Start(); 17 | void Execute(); 18 | void Rollback(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/AntDeploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "Env": [ 3 | { 4 | "Name": "fat", 5 | "ServerList": [ 6 | { 7 | "Host": "localhost:8088", 8 | "Token": "aaaa" 9 | } 10 | ] 11 | } 12 | ], 13 | "IgnoreList": [], 14 | "IIsConfig": { 15 | "SdkType": null, 16 | "WebSiteName": "", 17 | "LastEnvName": null 18 | }, 19 | "WindowsServiveConfig": { 20 | "StopTimeOutSeconds": "", 21 | "ServiceName": "aaaa", 22 | "SdkType": "netframework", 23 | "LastEnvName": "fat" 24 | } 25 | } -------------------------------------------------------------------------------- /AntDeployAgent/Model/IIsSiteCheckResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgent.Model 8 | { 9 | public class CheckExistResult 10 | { 11 | 12 | public string WebSiteName { get; set; } 13 | 14 | public string Level1Name { get; set; } 15 | public bool Level1Exist { get; set; } 16 | public bool Success { get; set; } 17 | 18 | public bool Level2Exist { get; set; } 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /AntDeployApp/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/AntDeployApp.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/AntDeployApp.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AntDeployAgent/Util/CodingHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography; 3 | using System.Text; 4 | using Newtonsoft.Json; 5 | 6 | namespace AntDeployAgent.Util 7 | { 8 | public static class CodingHelper 9 | { 10 | 11 | public static T JsonToObject(this string str) 12 | { 13 | try 14 | { 15 | var resultModel = JsonConvert.DeserializeObject(str); 16 | return resultModel; 17 | } 18 | catch (Exception) 19 | { 20 | return default(T); 21 | } 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AntDeploy/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 | // This file is used by Code Analysis to maintain SuppressMessage 2 | // attributes that are applied to this project. Project-level 3 | // suppressions either have no target or are given a specific target 4 | // and scoped to a namespace, type, member, etc. 5 | // 6 | // To add a suppression to this file, right-click the message in the 7 | // Error List, point to "Suppress Message(s)", and click "In Project 8 | // Suppression File". You do not need to add suppressions to this 9 | // file manually. 10 | 11 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1017:MarkAssembliesWithComVisible")] 12 | -------------------------------------------------------------------------------- /AntDeploy/MsBuildHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace yuzd.AntDeploy 8 | { 9 | public class MsBuildHelper 10 | { 11 | public string GetMsBuildPath() 12 | { 13 | try 14 | { 15 | var getmS = Microsoft.Build.Utilities.ToolLocationHelper.GetPathToBuildTools(Microsoft.Build.Utilities.ToolLocationHelper.CurrentToolsVersion); 16 | return getmS; 17 | } 18 | catch (Exception e) 19 | { 20 | return string.Empty; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/MsBuildHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace yuzd.AntDeploy 8 | { 9 | public class MsBuildHelper 10 | { 11 | public string GetMsBuildPath() 12 | { 13 | try 14 | { 15 | var getmS = Microsoft.Build.Utilities.ToolLocationHelper.GetPathToBuildTools(Microsoft.Build.Utilities.ToolLocationHelper.CurrentToolsVersion); 16 | return getmS; 17 | } 18 | catch (Exception e) 19 | { 20 | return string.Empty; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/MsBuildHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace yuzd.AntDeploy 8 | { 9 | public class MsBuildHelper 10 | { 11 | public string GetMsBuildPath() 12 | { 13 | try 14 | { 15 | var getmS = Microsoft.Build.Utilities.ToolLocationHelper.GetPathToBuildTools(Microsoft.Build.Utilities.ToolLocationHelper.CurrentToolsVersion); 16 | return getmS; 17 | } 18 | catch (Exception e) 19 | { 20 | return string.Empty; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /CMD/AntDeployCommand/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | FileSystem 8 | Release 9 | Any CPU 10 | netcoreapp2.2 11 | bin\Release\netcoreapp2.2\publish\ 12 | osx-x64 13 | true 14 | <_IsPortable>false 15 | 16 | -------------------------------------------------------------------------------- /AntDeploy/AntDeployApp.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /AntDeployAgent/MyApp/Service/IPublishProviderAPI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AntDeployAgentWindows.WebApiCore; 7 | 8 | namespace AntDeployAgentWindows.MyApp.Service 9 | { 10 | 11 | public interface IPublishProviderAPI 12 | { 13 | string ProviderName { get; } 14 | string LoggerKey { get; set;} 15 | 16 | /// 17 | /// 发布 18 | /// 19 | /// 20 | string Deploy(FormHandler.FormItem fileItem); 21 | string RollBack(); 22 | 23 | string Check(FormHandler formHandler); 24 | 25 | 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /AntDeploy/Commands/EditProjectsCommand.cs: -------------------------------------------------------------------------------- 1 | namespace AntDeploy.Commands 2 | { 3 | internal sealed class EditProjectsCommand : BaseCommand 4 | { 5 | public static EditProjectsCommand Instance { get; private set; } 6 | 7 | public static void Initialize(EditProjectPackage package) 8 | { 9 | Instance = new EditProjectsCommand(package); 10 | package.CommandService.AddCommand(Instance); 11 | } 12 | 13 | public EditProjectsCommand(EditProjectPackage package) 14 | : base(package, Ids.CMD_SET, Ids.EDIT_PROJECTS_MENU_COMMAND_ID) 15 | { 16 | } 17 | 18 | protected override void OnExecute() 19 | { 20 | 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /AntDeployAgentWindows/MyApp/Service/IPublishProviderAPI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AntDeployAgentWindows.WebApiCore; 7 | 8 | namespace AntDeployAgentWindows.MyApp.Service 9 | { 10 | 11 | public interface IPublishProviderAPI 12 | { 13 | string ProviderName { get; } 14 | string LoggerKey { get; set;} 15 | 16 | /// 17 | /// 发布 18 | /// 19 | /// 20 | string Deploy(FormHandler.FormItem fileItem); 21 | string RollBack(); 22 | 23 | string Check(FormHandler formHandler); 24 | 25 | 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/ProjectInstaller.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Configuration.Install; 6 | using System.Linq; 7 | using System.ServiceProcess; 8 | using System.Threading.Tasks; 9 | 10 | namespace Hangfire.WindowsService 11 | { 12 | [RunInstaller(true)] 13 | public partial class ProjectInstaller : System.Configuration.Install.Installer 14 | { 15 | public ProjectInstaller() 16 | { 17 | InitializeComponent(); 18 | this.serviceInstaller1.ServiceName = "AntDeployAgentWindowsService"; 19 | this.serviceInstaller1.StartType = ServiceStartMode.Automatic; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AntDeployAgentLinuxService/AntDeployAgentLinuxService/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | Release 8 | Any CPU 9 | bin\Release\net5.0\publish\ 10 | FileSystem 11 | net5.0 12 | linux-x64 13 | true 14 | True 15 | True 16 | 17 | -------------------------------------------------------------------------------- /AntDeployAgentService/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | FileSystem 8 | Release 9 | Any CPU 10 | net6.0 11 | bin\Release\net5.0\publish\ 12 | win-x64 13 | true 14 | <_IsPortable>false 15 | true 16 | false 17 | 18 | -------------------------------------------------------------------------------- /AntDeployAgentLinuxService/AntDeployAgentLinuxService/AntDeployAgentLinuxService.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 | -------------------------------------------------------------------------------- /CMD/AntDeployCommand/Utils/LogHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace AntDeployCommand.Utils 6 | { 7 | public class LogHelper 8 | { 9 | /// 10 | /// 日志 11 | /// 12 | public static Action LoggerProvider = Console.WriteLine; 13 | 14 | public static void Info(string txt) 15 | { 16 | LoggerProvider($"【INFO】{txt}"); 17 | } 18 | 19 | public static void Debug(string txt) 20 | { 21 | LoggerProvider($"【DEBG】{txt}"); 22 | } 23 | 24 | public static void Warn(string txt) 25 | { 26 | LoggerProvider($"【WARN】{txt}"); 27 | } 28 | 29 | public static void Error(string txt) 30 | { 31 | LoggerProvider($"【FAIL】{txt}"); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /AntDeployAgent/Operation/OperationsFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AntDeployAgentWindows.Operation.OperationTypes; 7 | 8 | namespace AntDeployAgentWindows.Operation 9 | { 10 | class OperationsFactory 11 | { 12 | //public static IOperations Create(Arguments args) 13 | //{ 14 | // switch (args.DeployType) 15 | // { 16 | // case "IIS": 17 | // return new OperationsIIS(args); 18 | // case "WINDOWSSERVICE": 19 | // return new OperationsWINDOWSSERVICE(args); 20 | // default: 21 | // throw new NotImplementedException("/deployType:" + (args.DeployType ?? string.Empty) + " is not implemented"); 22 | // } 23 | //} 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AntDeployWinform/Models/FileStruct.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployWinform.Models 8 | { 9 | /// 10 | /// 文件结构 11 | /// 12 | [Serializable] 13 | public class FileStruct 14 | { 15 | /// 16 | /// 文件绝对路径 17 | /// 18 | public string FileFullName { get; set; } 19 | /// 20 | /// 文件修改时间 21 | /// 22 | public DateTime UpdateTime { get; set; } = new DateTime(1970, 1, 1); 23 | /// 24 | /// 相对路径 25 | /// 26 | public string RelativePath { get; set; } 27 | /// 28 | /// 是文件 29 | /// 30 | public bool IsFile { get; set; } = true; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Operation/OperationsFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AntDeployAgentWindows.Operation.OperationTypes; 7 | 8 | namespace AntDeployAgentWindows.Operation 9 | { 10 | class OperationsFactory 11 | { 12 | //public static IOperations Create(Arguments args) 13 | //{ 14 | // switch (args.DeployType) 15 | // { 16 | // case "IIS": 17 | // return new OperationsIIS(args); 18 | // case "WINDOWSSERVICE": 19 | // return new OperationsWINDOWSSERVICE(args); 20 | // default: 21 | // throw new NotImplementedException("/deployType:" + (args.DeployType ?? string.Empty) + " is not implemented"); 22 | // } 23 | //} 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/MyApp/Service/PublishProviderFactory.cs: -------------------------------------------------------------------------------- 1 | using AntDeployAgentWindows.MyApp.Service.Impl; 2 | using System; 3 | 4 | namespace AntDeployAgentWindows.MyApp.Service 5 | { 6 | public class PublishProviderFactory 7 | { 8 | 9 | 10 | public static IPublishProviderAPI GetProcessor(string key) 11 | { 12 | switch (key) 13 | { 14 | case "iis": 15 | return new IIsPublisher(); 16 | case "iis_rollback": 17 | return new IIsRollback(); 18 | case "windowservice": 19 | return new WindowServicePublisher(); 20 | case "windowservice_rollback": 21 | return new WindowServiceRollback(); 22 | default: 23 | throw new Exception($"key:{key} not supported"); 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.ServiceProcess; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AntDeployAgentWindowsService 9 | { 10 | static class Program 11 | { 12 | /// 13 | /// 应用程序的主入口点。 14 | /// 15 | static void Main(string[] args) 16 | { 17 | AntDeployAgentWindowsService s = new AntDeployAgentWindowsService(); 18 | if (Environment.UserInteractive) 19 | { 20 | s.RunAsConsole(args); 21 | } 22 | else 23 | { 24 | ServiceBase[] ServicesToRun; 25 | ServicesToRun = new ServiceBase[] 26 | { 27 | s 28 | }; 29 | ServiceBase.Run(ServicesToRun); 30 | } 31 | 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /AntDeploy/VSPackage.Designer.cs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | // ------------------------------------------------------------------------------ 12 | // 13 | // This file was generated by T4 Template. 14 | // 15 | // ------------------------------------------------------------------------------ 16 | 17 | using System.Resources; 18 | 19 | namespace AntDeploy 20 | { 21 | /// 22 | /// A strongly-typed resource class, for looking up localized strings. 23 | /// 24 | static class VSPackage 25 | { 26 | static readonly ResourceManager Resx = new ResourceManager("AntDeploy.VSPackage", typeof(VSPackage).Assembly); 27 | 28 | 29 | public static string _110 { get; } = Resx.GetString("110"); 30 | 31 | public static string _112 { get; } = Resx.GetString("112"); 32 | 33 | public static string EditMenuPattern { get; } = Resx.GetString("EditMenuPattern"); 34 | 35 | } 36 | } -------------------------------------------------------------------------------- /AntDeployAgentService/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 | 28 | -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/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 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /AntDeployApp/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace AntDeployApp.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AntDeployWinform/Models/ProjectParam.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployWinform.Models 8 | { 9 | [Serializable] 10 | public class ProjectParam 11 | { 12 | /// 13 | /// 经过vssdk判断是web项目的 14 | /// 15 | public bool IsWebProejct { get; set; } 16 | 17 | /// 18 | /// 经过vssdk判断是netcore项目的 19 | /// 20 | public bool IsNetcorePorject { get; set; } 21 | 22 | /// 23 | /// 经过vssdk获取到的outputname 24 | /// 25 | public string OutPutName { get; set; } 26 | public string VsVersion { get; set; } 27 | public string MsBuildPath { get; set; } 28 | public string ProjectPath { get; set; } 29 | public string NetCoreSDKVersion { get; set; } 30 | public string DomainPath { get; set; } 31 | public bool IsFirst { get; set; } 32 | //是否是打开新的窗口 33 | public bool OpenNewWindow { get; set; } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AntDeployWinform/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace AntDeployWinform.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.2.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AntDeployApp/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("AntDeployApp")] 9 | [assembly: AssemblyDescription("zdyu")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("zdyu")] 12 | [assembly: AssemblyProduct("AntDeployApp")] 13 | [assembly: AssemblyCopyright("Copyright © 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("43a14241-ba20-4402-b1e3-9cd0838b9181")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /AntDeploy/nlog.config: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Operation/Arguments.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Operation 8 | { 9 | class Arguments 10 | { 11 | public string DeployType { get; set; } 12 | public string BackupFolder { get; set; } 13 | public string AppName { get; set; } 14 | public int WaitForWindowsServiceStopTimeOut { get; set; } 15 | public string AppFolder { get; set; } 16 | public string DeployFolder { get; set; } 17 | public string CategoryName { get; set; } 18 | public string FireDaemonPath { get; set; } 19 | public bool Restore { get; set; } 20 | public string RestorePath { get; set; } 21 | public string ApplicationPoolName { get; set; } 22 | public string SiteName { get; set; } 23 | public bool NoBackup { get; set; } 24 | public bool NoStop { get; set; } 25 | public bool NoStart { get; set; } 26 | public List BackUpIgnoreList { get; set; } 27 | 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/Service1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace AntDeployAgentWindowsService 2 | { 3 | partial class AntDeployAgentWindowsService 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region 组件设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | components = new System.ComponentModel.Container(); 32 | this.ServiceName = "AntDeployAgentWindowsService"; 33 | } 34 | 35 | #endregion 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /AntDeployWinform/Models/Helpers/Transparenter.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Windows.Forms; 3 | 4 | namespace AltoControls 5 | { 6 | public class Transparenter 7 | { 8 | public static void MakeTransparent(Control control, Graphics g) 9 | { 10 | var parent = control.Parent; 11 | if (parent == null) return; 12 | var bounds = control.Bounds; 13 | var siblings = parent.Controls; 14 | int index = siblings.IndexOf(control); 15 | Bitmap behind = null; 16 | for (int i = siblings.Count - 1; i > index; i--) 17 | { 18 | var c = siblings[i]; 19 | if (!c.Bounds.IntersectsWith(bounds)) continue; 20 | if (behind == null) 21 | behind = new Bitmap(control.Parent.ClientSize.Width, control.Parent.ClientSize.Height); 22 | c.DrawToBitmap(behind, c.Bounds); 23 | } 24 | if (behind == null) return; 25 | g.DrawImage(behind, control.ClientRectangle, bounds, GraphicsUnit.Pixel); 26 | behind.Dispose(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /AntDeployWinform/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | 6 | // 有关程序集的一般信息由以下 7 | // 控制。更改这些特性值可修改 8 | // 与程序集关联的信息。 9 | [assembly: AssemblyTitle("AntDeployWinform")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("Microsoft")] 13 | [assembly: AssemblyProduct("AntDeployWinform")] 14 | [assembly: AssemblyCopyright("Copyright © Microsoft 2019")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // 将 ComVisible 设置为 false 会使此程序集中的类型 19 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 20 | //请将此类型的 ComVisible 特性设置为 true。 21 | [assembly: ComVisible(true)] 22 | 23 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 24 | [assembly: Guid("dd2721a8-5956-4259-b68f-4e6b21a7bf0f")] 25 | 26 | // 程序集的版本信息由下列四个值组成: 27 | // 28 | // 主版本 29 | // 次版本 30 | // 生成号 31 | // 修订号 32 | // 33 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 34 | // 方法是按如下所示使用“*”: : 35 | // [assembly: AssemblyVersion("1.0.*")] 36 | [assembly: AssemblyVersion("2.0.0.0")] 37 | [assembly: AssemblyFileVersion("2.0.0.0")] 38 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("AntDeployAgentWindows")] 9 | [assembly: AssemblyDescription("AntDeploy windows 发布 agent")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("https://github.com/yuzd")] 12 | [assembly: AssemblyProduct("AntDeploy windows 发布 agent")] 13 | [assembly: AssemblyCopyright("Copyright ©yuzd 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("821ceb3f-4e45-48d7-b5f8-a347d5284af5")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.5.0.0")] 36 | [assembly: AssemblyFileVersion("3.5.0.0")] 37 | -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的一般信息由以下 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("AntDeployAgentWindowsService")] 9 | [assembly: AssemblyDescription("AntDeploy windows 发布 agent")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("https://github.com/yuzd")] 12 | [assembly: AssemblyProduct("AntDeploy windows 发布 agent")] 13 | [assembly: AssemblyCopyright("Copyright ©yuzd 2019")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 19 | //请将此类型的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("d9587a7d-e2e5-4ef4-ba90-5f45be6c472a")] 24 | 25 | // 程序集的版本信息由下列四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 33 | // 方法是按如下所示使用“*”: : 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("3.5.0.0")] 36 | [assembly: AssemblyFileVersion("3.5.0.0")] 37 | -------------------------------------------------------------------------------- /AntDeployAgentLinuxService/AntDeployAgentLinuxService/AntDeployAgentLinuxService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | 7 | 8 | false 9 | true 10 | DEBUG;NETSTANDARD 11 | 12 | 13 | 14 | TRACE;NETSTANDARD 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Always 27 | 28 | 29 | Always 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /AntDeploy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Resources; 4 | using System.Runtime.CompilerServices; 5 | using System.Runtime.InteropServices; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("yuzd")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("yuzd")] 14 | [assembly: AssemblyProduct("yuzd")] 15 | [assembly: AssemblyCopyright("")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | [assembly: ComVisible(false)] 19 | [assembly: CLSCompliant(false)] 20 | [assembly: NeutralResourcesLanguage("en-US")] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Revision and Build Numbers 30 | // by using the '*' as shown below: 31 | 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /AntDeployAgent/MyApp/Service/PublishProviderFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using AntDeployAgent.MyApp.Service.Impl; 3 | 4 | namespace AntDeployAgentWindows.MyApp.Service 5 | { 6 | public class PublishProviderFactory 7 | { 8 | 9 | 10 | public static IPublishProviderAPI GetProcessor(string key) 11 | { 12 | switch (key) 13 | { 14 | case "docker": 15 | return new DockerPublisher(); 16 | case "docker_rollback": 17 | return new DockerRollback(); 18 | case "linux": 19 | return new LinuxPublisher(); 20 | case "linux_rollback": 21 | return new LinuxRollback(); 22 | case "iis": 23 | return new IIsPublisher(); 24 | case "iis_rollback": 25 | return new IIsRollback(); 26 | case "windowservice": 27 | return new WindowServicePublisher(); 28 | case "windowservice_rollback": 29 | return new WindowServiceRollback(); 30 | default: 31 | throw new Exception($"key:{key} not supported"); 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /AntDeployAgent/WebApiCore/MyWebApiRouter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AntDeployAgentWindows.MyApp; 7 | using Microsoft.Owin; 8 | 9 | namespace AntDeployAgentWindows.WebApiCore 10 | { 11 | /// 12 | /// 路由器:自定义URL路由规则 13 | /// 14 | class MyWebApiRouter : IWebApiRouter 15 | { 16 | /// 17 | /// 返回一个处理对象,如果当前请求不在处理之列则返回空 18 | /// 19 | /// 20 | /// 21 | public BaseWebApi RouteTo(IOwinContext c) 22 | { 23 | 24 | //用户请求的URL路径 25 | var path = c.Request.Path.Value; 26 | 27 | //将不同的请求路径交给不同的处理模块处理 28 | if (path == "/publish" || path.StartsWith("/publish/")) return new PublishService(); 29 | if (path == "/rollback" || path.StartsWith("/rollback/")) return new RollbackService(); 30 | if (path == "/version" || path.StartsWith("/version/")) return new VersionService(); 31 | if (path == "/logger" || path.StartsWith("/logger/")) return new LoggerService(); 32 | 33 | 34 | return null; 35 | 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/WebApiCore/MyWebApiRouter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AntDeployAgentWindows.MyApp; 7 | using Microsoft.Owin; 8 | 9 | namespace AntDeployAgentWindows.WebApiCore 10 | { 11 | /// 12 | /// 路由器:自定义URL路由规则 13 | /// 14 | class MyWebApiRouter : IWebApiRouter 15 | { 16 | /// 17 | /// 返回一个处理对象,如果当前请求不在处理之列则返回空 18 | /// 19 | /// 20 | /// 21 | public BaseWebApi RouteTo(IOwinContext c) 22 | { 23 | 24 | //用户请求的URL路径 25 | var path = c.Request.Path.Value; 26 | 27 | //将不同的请求路径交给不同的处理模块处理 28 | if (path == "/publish" || path.StartsWith("/publish/")) return new PublishService(); 29 | if (path == "/rollback" || path.StartsWith("/rollback/")) return new RollbackService(); 30 | if (path == "/version" || path.StartsWith("/version/")) return new VersionService(); 31 | if (path == "/logger" || path.StartsWith("/logger/")) return new LoggerService(); 32 | 33 | 34 | return null; 35 | 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /CMD/AntDeployCommand/AntDeployCommand.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp2.2 6 | latest 7 | false 8 | true 9 | 1.0.6 10 | 11 | 12 | portable 13 | TRACE;DEBUG 14 | true 15 | 16 | 17 | 18 | RELEASE 19 | true 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 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("AntDeployV2")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AntDeployV2")] 13 | [assembly: AssemblyCopyright("")] 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 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 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("AntDeployVsix")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AntDeployVsix")] 13 | [assembly: AssemblyCopyright("")] 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 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /AntDeployWinform/Models/GetVersionResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployWinform.Models 8 | { 9 | public class GetVersionResult 10 | { 11 | public bool Success { get; set; } 12 | public string Msg { get; set; } 13 | public List Data { get; set; } 14 | } 15 | 16 | public class IIsSiteCheck 17 | { 18 | public bool Success { get; set; } 19 | public string Msg { get; set; } 20 | public IIsSiteCheckResult Data { get; set; } 21 | } 22 | public class IIsSiteCheckResult 23 | { 24 | 25 | public string WebSiteName { get; set; } 26 | 27 | public string Level1Name { get; set; } 28 | public bool Level1Exist { get; set; } 29 | public bool Success { get; set; } 30 | 31 | public bool Level2Exist { get; set; } 32 | } 33 | 34 | public class FirstCreateParam 35 | { 36 | public string Port { get; set; } 37 | public string PoolName { get; set; } 38 | public bool PoolAlwaysRunning { get; set; } 39 | public string PhysicalPath { get; set; } 40 | public string Desc { get; set; } 41 | public string StartUp { get; set; } 42 | public string Param { get; set; } 43 | public string useNssm { get; set; } 44 | } 45 | 46 | 47 | } -------------------------------------------------------------------------------- /AntDeploy/Commands/BaseCommand.cs: -------------------------------------------------------------------------------- 1 | using EnvDTE; 2 | using AntDeploy.Models; 3 | using Microsoft.VisualStudio.Shell; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.ComponentModel.Design; 7 | using System.IO; 8 | using System.Linq; 9 | 10 | namespace AntDeploy.Commands 11 | { 12 | internal abstract class BaseCommand : OleMenuCommand 13 | { 14 | // Editing File - Project File Watcher 15 | 16 | private static void OnBaseBeforeQueryStatus(object sender, EventArgs e) => (sender as BaseCommand).OnBeforeQueryStatus(); 17 | 18 | private static void OnBaseCommandEventHandler(object sender, EventArgs e) => (sender as BaseCommand).OnExecute(); 19 | 20 | 21 | 22 | 23 | 24 | protected BaseCommand(EditProjectPackage package, string cmdSet, int cmdId) 25 | : base(OnBaseCommandEventHandler, null, OnBaseBeforeQueryStatus, new CommandID(Guid.Parse(cmdSet), cmdId)) 26 | { 27 | Package = package; 28 | } 29 | 30 | protected EditProjectPackage Package { get; } 31 | 32 | protected IEnumerable SelectedProjects => EditProjectPackage.DTE.SelectedItems.OfType().Where(x => x.Project != null).Select(x => x.Project); 33 | 34 | protected virtual void OnBeforeQueryStatus() 35 | { 36 | Visible = false; 37 | } 38 | 39 | protected abstract void OnExecute(); 40 | 41 | 42 | } 43 | } -------------------------------------------------------------------------------- /AntDeployAgentLinuxService/AntDeployAgentLinuxService/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using AntDeployAgentWindows; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using Microsoft.Extensions.Hosting; 8 | using TinyFox; 9 | 10 | namespace AntDeployAgentLinuxService 11 | { 12 | class Program 13 | { 14 | static void Main(string[] args) 15 | { 16 | var pathToExe = Process.GetCurrentProcess().MainModule.FileName; 17 | var pathToContentRoot = Path.GetDirectoryName(pathToExe); 18 | Directory.SetCurrentDirectory(pathToContentRoot); 19 | 20 | #if !DEBUG 21 | Startup.RootPath = pathToContentRoot; 22 | TinyFoxService.WebRoot = Path.Combine(pathToContentRoot,"wwwroot"); 23 | ConfigurationManager.Initialize(pathToExe); 24 | #endif 25 | Console.WriteLine("Current Version:" + AntDeployAgent.Version.VERSION); 26 | CreateHostBuilder(args).Build().Run(); 27 | } 28 | 29 | public static IHostBuilder CreateHostBuilder(string[] args) => 30 | Host.CreateDefaultBuilder(args) 31 | #if !DEBUG 32 | .UseSystemd() 33 | #endif 34 | 35 | .ConfigureServices((hostContext, services) => 36 | { 37 | services.AddHostedService(); 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AntDeploy/Models/ProjectKinds.cs: -------------------------------------------------------------------------------- 1 | namespace AntDeploy.Models 2 | { 3 | // Looks like this is out to date since 15.8, refer to https://developercommunity.visualstudio.com/content/problem/312523/envdteprojectkind-no-longer-differentiates-between.html 4 | 5 | // https://stackoverflow.com/questions/45795759/detect-a-dotnet-core-project-from-envdte-project-api 6 | // https://www.codeproject.com/reference/720512/list-of-visual-studio-project-type-guids 7 | internal static class ProjectKinds 8 | { 9 | public const string CS_CORE_PROJECT_KIND = "{9A19103F-16F7-4668-BE54-9A1E7A4F7556}"; 10 | public const string FS_CORE_PROJECT_KIND = "{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}"; 11 | public const string VB_CORE_PROJECT_KIND = "{778DAE3C-4631-46EA-AA77-85C1314464D9}"; 12 | public const string Web_PROJECT_KIND = "{E24C65DC-7377-472B-9ABA-BC803B73C61A}"; 13 | public const string Web_PROJECT_KIND_MVC1 = "{603C0E0B-DB56-11DC-BE95-000D561079B0}"; 14 | public const string Web_PROJECT_KIND_MVC2 = "{F85E285D-A4E0-4152-9332-AB1D724D3325}"; 15 | public const string Web_PROJECT_KIND_MVC3 = "{E53F8FEA-EAE0-44A6-8774-FFD645390401}"; 16 | public const string Web_PROJECT_KIND_MVC4 = "{E3E379DF-F4C6-4180-9B81-6769533ABE47}"; 17 | public const string Web_Application = "{349C5851-65DF-11DA-9384-00065B846F21}"; 18 | public const string Web_ASPNET5 = "{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}"; 19 | } 20 | } -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/MachineConfig.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | using System.Collections.Generic; 4 | 5 | namespace System.Configuration.System.Configuration 6 | { 7 | internal static class MachineConfig 8 | { 9 | internal static readonly IReadOnlyDictionary ConfigSections = new Dictionary 10 | { 11 | {"appSettings","System.Configuration.AppSettingsSection, System.Configuration"}, 12 | {"connectionStrings","System.Configuration.ConnectionStringsSection"}, 13 | {"mscorlib","System.Configuration.IgnoreSection, System.Configuration"}, 14 | {"runtime","System.Configuration.IgnoreSection, System.Configuration"}, 15 | {"assemblyBinding","System.Configuration.IgnoreSection, System.Configuration"}, 16 | {"satelliteassemblies","System.Configuration.IgnoreSection, System.Configuration"}, 17 | {"startup","System.Configuration.IgnoreSection, System.Configuration"}, 18 | {"windows","System.Configuration.IgnoreSection, System.Configuration"}, 19 | {"system.webServer","System.Configuration.IgnoreSection, System.Configuration"}, 20 | {"system.runtime.remoting","System.Configuration.IgnoreSection, System.Configuration"}, 21 | {"system.net","System.Net.Configuration, System.Configuration"}, 22 | {"system.web","System.Web.Configuration, System.Configuration"} 23 | }; 24 | } 25 | } 26 | 27 | 28 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ValidatorCallback.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ValidatorCallback.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public delegate void ValidatorCallback(object o); 34 | } 35 | 36 | #endif -------------------------------------------------------------------------------- /AntDeploy/EditProjectPackage.vsct: -------------------------------------------------------------------------------- 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 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AntDeploy/EditProjectPackage.cs: -------------------------------------------------------------------------------- 1 | using EnvDTE80; 2 | using AntDeploy.Commands; 3 | using Microsoft.VisualStudio.Shell; 4 | using System; 5 | using System.ComponentModel.Design; 6 | using System.Runtime.InteropServices; 7 | using AntDeployWinform; 8 | using UIContextGuids = Microsoft.VisualStudio.Shell.Interop.UIContextGuids; 9 | 10 | namespace AntDeploy 11 | { 12 | [Guid(Ids.PACKAGE)] 13 | [PackageRegistration(UseManagedResourcesOnly = true)] 14 | [InstalledProductRegistration("#110", "#112", Vsix.VERSION, IconResourceID = 400)] 15 | [ProvideMenuResource("Menus.ctmenu", 1)] 16 | [ProvideAutoLoad(Ids.AUTO_LOAD_CONTEXT)] 17 | [ProvideUIContextRule(Ids.AUTO_LOAD_CONTEXT, 18 | "HasProject", 19 | "SingleProject | MultipleProjects", 20 | new[] { "SingleProject", "MultipleProjects" }, 21 | new[] { UIContextGuids.SolutionHasSingleProject, UIContextGuids.SolutionHasMultipleProjects }, 22 | delay: 1000)] 23 | public sealed class EditProjectPackage : Package 24 | { 25 | public static DTE2 DTE { get; private set; } 26 | 27 | internal OleMenuCommandService CommandService { get; private set; } 28 | 29 | protected override void Initialize() 30 | { 31 | base.Initialize(); 32 | 33 | DTE = GetService(typeof(EnvDTE.DTE)) as DTE2; 34 | CommandService = GetService(typeof(IMenuCommandService)) as OleMenuCommandService; 35 | 36 | EditProjectCommand.Initialize(this); 37 | EditProjectsCommand.Initialize(this); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationUserLevel.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationUserLevel.cs 5 | // 6 | // Authors: 7 | // Duncan Mak (duncan@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public enum ConfigurationUserLevel 34 | { 35 | None = 0 36 | } 37 | } 38 | 39 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/NonEmptyStringFlags.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.NonEmptyStringFlags.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | 32 | namespace System.Configuration 33 | { 34 | public enum NonEmptyStringFlags 35 | { 36 | None, 37 | TrimWhitespace 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/WebSocketApp/WebSocketMiddleware.cs: -------------------------------------------------------------------------------- 1 | using AntDeployAgentWindows.WebSocketApp; 2 | using Microsoft.Owin; 3 | using Owin; 4 | using System.Threading.Tasks; 5 | 6 | namespace AntDeployAgentWindows.WebSocket.WebSocketApp 7 | { 8 | class WebSocketMiddleware : OwinMiddleware 9 | { 10 | /// 11 | /// 下一个“中间件”对象 12 | /// 13 | OwinMiddleware _next; 14 | public WebSocketMiddleware(OwinMiddleware next) : base(next) 15 | { 16 | _next = next; 17 | } 18 | 19 | public override Task Invoke(IOwinContext context) 20 | { 21 | //检查是否是WebSocket会话请求 22 | if (AntDeployAgentWindows.WebSocketApp.WebSocket.IsWebSocket(context.Environment)) 23 | { 24 | return new MyWebSocketWork(context.Environment).Open(); 25 | //注:Open方法可以带参数 26 | //如:Open(new Dictionary { {"websocket.SubProtocol","yourxxx"} }); 27 | } 28 | else 29 | { 30 | return _next.Invoke(context); 31 | } 32 | 33 | } 34 | } 35 | 36 | static class WebSocketExtension 37 | { 38 | /// 39 | /// 启用 WebSocket 中间件 40 | /// 41 | /// 42 | /// 43 | /// 44 | public static IAppBuilder UseWebSocket(this IAppBuilder builder) 45 | { 46 | return builder.Use(); 47 | } 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/WebSocketApp/WebSocketMiddleware.cs: -------------------------------------------------------------------------------- 1 | using AntDeployAgentWindows.WebSocketApp; 2 | using Microsoft.Owin; 3 | using Owin; 4 | using System.Threading.Tasks; 5 | 6 | namespace AntDeployAgentWindows.WebSocket.WebSocketApp 7 | { 8 | class WebSocketMiddleware : OwinMiddleware 9 | { 10 | /// 11 | /// 下一个“中间件”对象 12 | /// 13 | OwinMiddleware _next; 14 | public WebSocketMiddleware(OwinMiddleware next) : base(next) 15 | { 16 | _next = next; 17 | } 18 | 19 | public override Task Invoke(IOwinContext context) 20 | { 21 | //检查是否是WebSocket会话请求 22 | if (AntDeployAgentWindows.WebSocketApp.WebSocket.IsWebSocket(context.Environment)) 23 | { 24 | return new MyWebSocketWork(context.Environment).Open(); 25 | //注:Open方法可以带参数 26 | //如:Open(new Dictionary { {"websocket.SubProtocol","yourxxx"} }); 27 | } 28 | else 29 | { 30 | return _next.Invoke(context); 31 | } 32 | 33 | } 34 | } 35 | 36 | static class WebSocketExtension 37 | { 38 | /// 39 | /// 启用 WebSocket 中间件 40 | /// 41 | /// 42 | /// 43 | /// 44 | public static IAppBuilder UseWebSocket(this IAppBuilder builder) 45 | { 46 | return builder.Use(); 47 | } 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationAllowExeDefinition.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationAllowExeDefinition.cs 5 | // 6 | // Authors: 7 | // Duncan Mak (duncan@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public enum ConfigurationAllowExeDefinition 34 | { 35 | MachineToApplication = 100 36 | } 37 | } 38 | 39 | #endif -------------------------------------------------------------------------------- /AntDeploy/EditProjectPackage.zh-Hans.vsct: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 22 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/PropertyValueOrigin.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.PropertyValueOrigin.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public enum PropertyValueOrigin 34 | { 35 | Default = 0, 36 | Inherited = 1, 37 | SetHere = 2 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/TimeSpanSerializedFormat.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.TimeSpanSerializedFormat.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | 32 | namespace System.Configuration 33 | { 34 | public enum TimeSpanSerializedFormat 35 | { 36 | Seconds, 37 | Minutes, 38 | Hhmmss 39 | } 40 | } 41 | 42 | #endif -------------------------------------------------------------------------------- /AntDeployAgentWindows/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | using AntDeployAgentWindows.Model; 8 | using TinyFox; 9 | 10 | namespace AntDeployAgentWindows 11 | { 12 | class Program 13 | { 14 | static void Main(string[] args) 15 | { 16 | //-------------------------------------------------------- 17 | // * OWIN WEB服务配置与启动 18 | //-------------------------------------------------------- 19 | // 一个启动对象 20 | var startup = new Startup(); 21 | var port = System.Configuration.ConfigurationManager.AppSettings["Port"]; 22 | TinyFoxService.Port = string.IsNullOrEmpty(port)?8088:int.Parse(port); //服务端口(默认是8088) 23 | //TinyFoxService.WebRoot = @"A:\Users\Administrator\AppData\Local\tx\1877682825\FileRecv\TinyFox181113\TinyFox\Demo\Demo0\bin\Debug\site"; //网站根文件夹(默认路径是:应用程序/site/wwwroot) 24 | // 启动服务 25 | TinyFoxService.Start(startup.OwinMain); //启动服务(非阻塞的) 26 | 27 | 28 | //---------------------------------------------------- 29 | // * 等候退出 30 | //----------------------------------------------------- 31 | 32 | Console.WriteLine("如要退出,请按 Ctrl+c 键"); //提示 33 | (new AutoResetEvent(false)).WaitOne(); //阻塞与等候 34 | Console.WriteLine("正在退出,拜拜!"); //提示 35 | TinyFoxService.Stop(); //这句还是比较重要的 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/TimeSpanPropertyFlags.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.TimeSpanPropertyFlags.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | 32 | namespace System.Configuration 33 | { 34 | [Flags] 35 | public enum TimeSpanPropertyFlags 36 | { 37 | None = 0, 38 | AllowInfinite = 1, 39 | AllowNegative = 2, 40 | ProhibitZero = 4 41 | } 42 | } 43 | 44 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationAllowDefinition.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationAllowDefinition.cs 5 | // 6 | // Authors: 7 | // Duncan Mak (duncan@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public enum ConfigurationAllowDefinition 34 | { 35 | MachineOnly = 0, 36 | MachineToWebRoot = 100, 37 | MachineToApplication = 200, 38 | Everywhere = 300 39 | } 40 | } 41 | 42 | #endif -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/Service1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Linq; 7 | using System.ServiceProcess; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using AntDeployAgentWindows; 11 | using TinyFox; 12 | 13 | namespace AntDeployAgentWindowsService 14 | { 15 | public partial class AntDeployAgentWindowsService : ServiceBase 16 | { 17 | private Startup _startup; 18 | public AntDeployAgentWindowsService() 19 | { 20 | InitializeComponent(); 21 | } 22 | 23 | public void RunAsConsole(string[] args) 24 | { 25 | OnStart(args); 26 | Console.WriteLine("Current Version:" + AntDeployAgentWindows.Version.VERSION); 27 | Console.WriteLine("Press any key to exit..."); 28 | Console.ReadLine(); 29 | OnStop(); 30 | } 31 | 32 | public void start(string[] args) 33 | { 34 | this.OnStart(args); 35 | } 36 | 37 | protected override void OnStart(string[] args) 38 | { 39 | var port = System.Configuration.ConfigurationManager.AppSettings["Port"]; 40 | TinyFoxService.IpAddress = TyeIpAddress.Any; 41 | TinyFoxService.Port = string.IsNullOrEmpty(port) ? 8088 : int.Parse(port); 42 | _startup = new AntDeployAgentWindows.Startup(); 43 | TinyFoxService.Start(_startup.OwinMain); 44 | } 45 | 46 | protected override void OnStop() 47 | { 48 | _startup?.Stop(); 49 | TinyFoxService.Stop(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration.Internal/IInternalConfigRoot.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.Internal.IInternalConfigRoot.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | 32 | namespace System.Configuration.Internal 33 | { 34 | public interface IInternalConfigRoot 35 | { 36 | object GetSection(string section, string configPath); 37 | string GetUniqueConfigPath(string configPath); 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationElementCollectionType.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationElementCollectionType 5 | // 6 | // Authors: 7 | // Tim Coleman (tim@timcoleman.com) 8 | // 9 | // Copyright (C) Tim Coleman, 2004 10 | // 11 | 12 | // 13 | // Permission is hereby granted, free of charge, to any person obtaining 14 | // a copy of this software and associated documentation files (the 15 | // "Software"), to deal in the Software without restriction, including 16 | // without limitation the rights to use, copy, modify, merge, publish, 17 | // distribute, sublicense, and/or sell copies of the Software, and to 18 | // permit persons to whom the Software is furnished to do so, subject to 19 | // the following conditions: 20 | // 21 | // The above copyright notice and this permission notice shall be 22 | // included in all copies or substantial portions of the Software. 23 | // 24 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | // 32 | 33 | namespace System.Configuration 34 | { 35 | public enum ConfigurationElementCollectionType 36 | { 37 | BasicMap = 0, 38 | AddRemoveClearMap = 1, 39 | BasicMapAlternate = 2, 40 | AddRemoveClearMapAlternate = 3 41 | } 42 | } 43 | 44 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/Operation/Arguments.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AntDeployAgentWindows.Operation 8 | { 9 | class Arguments 10 | { 11 | public string DeployType { get; set; } 12 | public string BackupFolder { get; set; } 13 | public string AppName { get; set; } 14 | public int WaitForWindowsServiceStopTimeOut { get; set; } 15 | public string AppFolder { get; set; } 16 | public string DeployFolder { get; set; } 17 | public string CategoryName { get; set; } 18 | public string FireDaemonPath { get; set; } 19 | public bool Restore { get; set; } 20 | public string RestorePath { get; set; } 21 | public string ApplicationPoolName { get; set; } 22 | public string SiteName { get; set; } 23 | public bool NoBackup { get; set; } 24 | public bool NoStop { get; set; } 25 | public bool NoStart { get; set; } 26 | public bool UseOfflineHtm { get; set; } 27 | 28 | /// 29 | /// 是否采用AntDeploy的Agent的工作目录的方式,彻底解决资源占用的问题 30 | /// 日期文件夹下创建 deploy 31 | /// 从iis现有的路径中先把文件给复制过来 32 | /// 然后进行替换覆盖 33 | /// 然后设置pool 和 重新设置新的虚拟路径 34 | /// pool进行回收 35 | /// 36 | public bool UseTempPhysicalPath { get; set; } 37 | public string TempPhysicalPath { get; set; } 38 | public string Site1 { get; set; } 39 | public string Site2 { get; set; } 40 | public object Extention { get; set; } 41 | 42 | public List BackUpIgnoreList { get; set; } 43 | 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration.Internal/IConfigSystem.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.Internal.IConfigSystem.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | 32 | namespace System.Configuration.Internal 33 | { 34 | public interface IConfigSystem 35 | { 36 | IInternalConfigHost Host { get; } 37 | IInternalConfigRoot Root { get; } 38 | void Init(Type typeConfigHost, params object[] hostInitParams); 39 | } 40 | } 41 | 42 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration.Internal/IInternalConfigSystem.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.Internal.IInternalConfigSystem.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | 32 | namespace System.Configuration.Internal 33 | { 34 | public interface IInternalConfigSystem 35 | { 36 | bool SupportsUserConfig { get; } 37 | object GetSection(string configKey); 38 | void RefreshConfig(string sectionName); 39 | } 40 | } 41 | 42 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ExeConfigurationFileMap.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ExeConfigurationFileMap.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public sealed class ExeConfigurationFileMap 34 | { 35 | public ExeConfigurationFileMap() 36 | { 37 | ExeConfigFilename = ""; 38 | } 39 | 40 | public string ExeConfigFilename { get; set; } 41 | } 42 | } 43 | 44 | #endif -------------------------------------------------------------------------------- /AntDeployWinform/Util/WindowsMessageHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AntDeployWinform.Util 9 | { 10 | public class WindowsMessageHelper 11 | { 12 | [DllImport("user32.dll", CharSet = CharSet.Auto)] 13 | private static extern int SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam); 14 | 15 | [DllImport("user32.dll")] 16 | public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); 17 | 18 | [DllImport("user32.dll")] 19 | public static extern int RegisterWindowMessage(string msgName); 20 | 21 | public static int JumplistHelpArgs; 22 | 23 | static WindowsMessageHelper() 24 | { 25 | JumplistHelpArgs = WindowsMessageHelper.RegisterWindowMessage("Jumplist.HelpArgs"); 26 | } 27 | 28 | public static int RegisterMessage(string msgName) 29 | { 30 | return RegisterWindowMessage(msgName); 31 | } 32 | 33 | public static void SendMessage(string windowTitle, int msgId) 34 | { 35 | SendMessage(windowTitle, msgId, IntPtr.Zero, IntPtr.Zero); 36 | } 37 | 38 | public static bool SendMessage(string windowTitle, int msgId, IntPtr wParam, IntPtr lParam) 39 | { 40 | IntPtr WindowToFind = FindWindow(null, windowTitle); 41 | if (WindowToFind == IntPtr.Zero) return false; 42 | 43 | long result = SendMessage(WindowToFind, msgId, wParam, lParam); 44 | 45 | if (result == 0) return true; 46 | else return false; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /AntDeployAgentService/AntDeployAgentService.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | AntDeployAgentWindowsService 7 | 7.1 8 | 9 | 10 | 11 | false 12 | true 13 | TRACE;NETSTANDARD 14 | 15 | 16 | 17 | TRACE;NETSTANDARD 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Never 42 | 43 | 44 | Always 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationValidatorBase.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationValidatorBase.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public abstract class ConfigurationValidatorBase 34 | { 35 | public virtual bool CanValidate(Type type) 36 | { 37 | return false; 38 | } 39 | 40 | public abstract void Validate(object value); 41 | } 42 | } 43 | 44 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/DefaultValidator.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.DefaultValidator.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public sealed class DefaultValidator : ConfigurationValidatorBase 34 | { 35 | public override bool CanValidate(Type type) 36 | { 37 | return true; 38 | } 39 | 40 | public override void Validate(object value) 41 | { 42 | } 43 | } 44 | } 45 | 46 | #endif -------------------------------------------------------------------------------- /AntDeploy/EditProjectPackage.en.vsct: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 23 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /AntDeployWinform/Models/ExTreeView.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Windows.Forms; 5 | 6 | namespace AntDeployWinform.Models 7 | { 8 | public class ExTreeView : TreeView 9 | { 10 | private const int WM_LBUTTONDBLCLK = 0x0203; 11 | protected override void WndProc(ref Message m) 12 | { 13 | if (m.Msg == WM_LBUTTONDBLCLK) 14 | { 15 | var info = this.HitTest(PointToClient(Cursor.Position)); 16 | if (info.Location == TreeViewHitTestLocations.StateImage) 17 | { 18 | m.Result = IntPtr.Zero; 19 | return; 20 | } 21 | } 22 | base.WndProc(ref m); 23 | } 24 | } 25 | public static class TreeExtensions 26 | { 27 | public static List Descendants(this TreeView tree) 28 | { 29 | var nodes = tree.Nodes.Cast(); 30 | return nodes.SelectMany(x => x.Descendants()).Concat(nodes).ToList(); 31 | } 32 | public static List Descendants(this TreeNode node) 33 | { 34 | var nodes = node.Nodes.Cast().ToList(); 35 | return nodes.SelectMany(x => Descendants(x)).Concat(nodes).ToList(); 36 | } 37 | public static List Ancestors(this TreeNode node) 38 | { 39 | return AncestorsInternal(node).ToList(); 40 | } 41 | private static IEnumerable AncestorsInternal(TreeNode node) 42 | { 43 | while (node.Parent != null) 44 | { 45 | node = node.Parent; 46 | yield return node; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration.Internal/IInternalConfigConfigurationFactory.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.Internal.IInternalConfigConfigurationFactory.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | 32 | namespace System.Configuration.Internal 33 | { 34 | public interface IInternalConfigConfigurationFactory 35 | { 36 | Configuration Create(Type typeConfigHost, params object[] hostInitConfigurationParams); 37 | string NormalizeLocationSubPath(string subPath); 38 | } 39 | } 40 | 41 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationElementProperty.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationElementProperty.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public sealed class ConfigurationElementProperty 34 | { 35 | public ConfigurationElementProperty(ConfigurationValidatorBase validator) 36 | { 37 | Validator = validator; 38 | } 39 | 40 | public ConfigurationValidatorBase Validator { get; } 41 | } 42 | } 43 | 44 | #endif -------------------------------------------------------------------------------- /AntDeploy2022/AntDeployV2/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AntDeployV2 6 | Tools to deploy applications to remote server(iis,windowsService,docker) support netframwork and dotnetcore,support rollback and increment deploy 7 | https://github.com/yuzd 8 | https://github.com/yuzd/AntDeployAgent/issues 9 | Resources\__TemplateIcon.png 10 | Resources\antpreview.png 11 | deploy;docker;iis;windowsservice;rollback;increment; 12 | 13 | 14 | 15 | amd64 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigHelper.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigHelper 5 | // 6 | // Authors: 7 | // Gonzalo Paniagua Javier (gonzalo@ximian.com) 8 | // 9 | // (C) 2002 Ximian, Inc (http://www.ximian.com) 10 | // 11 | 12 | // 13 | // Permission is hereby granted, free of charge, to any person obtaining 14 | // a copy of this software and associated documentation files (the 15 | // "Software"), to deal in the Software without restriction, including 16 | // without limitation the rights to use, copy, modify, merge, publish, 17 | // distribute, sublicense, and/or sell copies of the Software, and to 18 | // permit persons to whom the Software is furnished to do so, subject to 19 | // the following conditions: 20 | // 21 | // The above copyright notice and this permission notice shall be 22 | // included in all copies or substantial portions of the Software. 23 | // 24 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 28 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 29 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 30 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 31 | // 32 | 33 | using System.Collections.Specialized; 34 | 35 | namespace System.Configuration 36 | { 37 | internal class ConfigNameValueCollection : NameValueCollection 38 | { 39 | public ConfigNameValueCollection() 40 | { 41 | } 42 | 43 | public ConfigNameValueCollection(ConfigNameValueCollection col) 44 | : base(col.Count, col) 45 | { 46 | } 47 | } 48 | } 49 | 50 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationPropertyOptions.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationPropertyOptions.cs 5 | // 6 | // Authors: 7 | // Duncan Mak (duncan@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | [Flags] 34 | public enum ConfigurationPropertyOptions 35 | { 36 | None = 0, 37 | IsDefaultCollection = 1, 38 | IsRequired = 2, 39 | IsKey = 4, 40 | IsTypeStringTransformationRequired = 8, 41 | IsAssemblyStringTransformationRequired = 16, 42 | IsVersionCheckRequired = 32 43 | } 44 | } 45 | 46 | #endif -------------------------------------------------------------------------------- /AntDeploy/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AntDeploy 6 | Tools to deploy applications to remote server(iis,windowsService,docker) support netframwork and dotnetcore,support rollback and increment deploy 7 | https://github.com/yuzd 8 | https://github.com/yuzd/AntDeployAgent/issues 9 | Resources\__TemplateIcon.png 10 | Resources\antpreview.png 11 | deploy;docker;iis;windowsservice;rollback;increment; 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/KeyValueInternalCollection.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.KeyValueInternalCollection.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | using System.Collections.Specialized; 32 | 33 | namespace System.Configuration 34 | { 35 | internal class KeyValueInternalCollection : NameValueCollection 36 | { 37 | public void SetReadOnly() 38 | { 39 | IsReadOnly = true; 40 | } 41 | 42 | public override void Add(string name, string val) 43 | { 44 | Remove(name); 45 | base.Add(name, val); 46 | } 47 | } 48 | } 49 | 50 | #endif -------------------------------------------------------------------------------- /AntDeploy2019/AntDeployVsix/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AntDeployVsix 6 | Tools to deploy applications to remote server(iis,windowsService,docker) support netframwork and dotnetcore,support rollback and increment deploy 7 | https://github.com/yuzd 8 | https://github.com/yuzd/AntDeployAgent/issues 9 | Resources\__TemplateIcon.png 10 | Resources\antpreview.png 11 | deploy;docker;iis;windowsservice;rollback;increment; 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/InternalConfigurationRoot.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.InternalConfigurationRoot.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | using System.Configuration.Internal; 32 | 33 | namespace System.Configuration 34 | { 35 | internal class InternalConfigurationRoot : IInternalConfigRoot 36 | { 37 | 38 | public object GetSection(string section, string configPath) 39 | { 40 | throw new NotImplementedException(); 41 | } 42 | 43 | public string GetUniqueConfigPath(string configPath) 44 | { 45 | return configPath; 46 | } 47 | } 48 | } 49 | 50 | #endif -------------------------------------------------------------------------------- /AntDeployWinform/Winform/FirstService.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Reflection; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using System.Windows.Forms; 13 | using AntDeployWinform.Models; 14 | 15 | namespace AntDeployWinform.Winform 16 | { 17 | public partial class FirstService : Form 18 | { 19 | public FirstService() 20 | { 21 | InitializeComponent(); 22 | 23 | Assembly assembly = typeof(Deploy).Assembly; 24 | using (Stream stream = assembly.GetManifestResourceStream("AntDeployWinform.Resources.Logo1.ico")) 25 | { 26 | if (stream != null) this.Icon = new Icon(stream); 27 | } 28 | 29 | comboBox_service_start_type.SelectedIndex = 0; 30 | } 31 | 32 | public FirstCreateParam WindowsServiceCreateParam { get; set; } 33 | 34 | private void btn_continue_Click(object sender, EventArgs e) 35 | { 36 | WindowsServiceCreateParam = new FirstCreateParam 37 | { 38 | Desc = this.txt_service_description.Text.Trim(), 39 | StartUp = this.comboBox_service_start_type.SelectedItem as string, 40 | PhysicalPath = this.txt_windows_service_PhysicalPath.Text.Trim(), 41 | Param = this.txt_service_param.Text.Trim(), 42 | useNssm = this.box_windows_service_nssm.Checked?"yes":"no" 43 | }; 44 | this.DialogResult = DialogResult.OK; 45 | } 46 | 47 | private void label5_Click(object sender, EventArgs e) 48 | { 49 | ProcessStartInfo sInfo = new ProcessStartInfo("https://github.com/yuzd/AntDeployAgent/issues/43"); 50 | Process.Start(sInfo); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/PositiveTimeSpanValidator.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.PositiveTimeSpanValidator.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public class PositiveTimeSpanValidator : ConfigurationValidatorBase 34 | { 35 | public override bool CanValidate(Type type) 36 | { 37 | return type == typeof(TimeSpan); 38 | } 39 | 40 | public override void Validate(object value) 41 | { 42 | var s = (TimeSpan) value; 43 | if (s <= new TimeSpan(0)) 44 | throw new ArgumentException("The time span value must be positive"); 45 | } 46 | } 47 | } 48 | 49 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ContextInformation.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ContextInformation.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public sealed class ContextInformation 34 | { 35 | private readonly Configuration _config; 36 | 37 | internal ContextInformation(Configuration config, object ctx) 38 | { 39 | HostingContext = ctx; 40 | _config = config; 41 | } 42 | 43 | public object HostingContext { get; } 44 | 45 | public object GetSection(string sectionName) 46 | { 47 | return _config.GetSection(sectionName); 48 | } 49 | } 50 | } 51 | 52 | #endif -------------------------------------------------------------------------------- /AntDeploy/VSPackage.tt: -------------------------------------------------------------------------------- 1 | <#@ template debug="false" hostspecific="true" language="C#" #> 2 | <#@ assembly name="System.Core" #> 3 | <#@ assembly name="System.Windows.Forms" #> 4 | <#@ import namespace="System.IO" #> 5 | <#@ import namespace="System.Resources" #> 6 | <#@ import namespace="System.Text.RegularExpressions" #> 7 | <#@ output extension=".Designer.cs" #> 8 | 9 | <# 10 | const string BenchmarkLanguage = "en"; 11 | 12 | var resourceNameWithoutCulture = Path.GetFileNameWithoutExtension(Host.TemplateFile); 13 | var resourceNamespace = Host.ResolveParameterValue("directiveId", "namespaceDirectiveProcessor", "namespaceHint") ?? string.Empty; 14 | var resourceFullNameWithoutCulture = resourceNamespace + "." + resourceNameWithoutCulture; 15 | #> 16 | 17 | // ------------------------------------------------------------------------------ 18 | // 19 | // This file was generated by T4 Template. 20 | // 21 | // ------------------------------------------------------------------------------ 22 | 23 | using System.Resources; 24 | 25 | namespace <#= resourceNamespace#> 26 | { 27 | /// 28 | /// A strongly-typed resource class, for looking up localized strings. 29 | /// 30 | static class <#= resourceNameWithoutCulture#> 31 | { 32 | static readonly ResourceManager Resx = new ResourceManager("<#= resourceFullNameWithoutCulture#>", typeof(<#= resourceNameWithoutCulture#>).Assembly); 33 | 34 | <# 35 | var resx = Path.ChangeExtension(Host.TemplateFile , BenchmarkLanguage + ".resx"); 36 | using(var reader = new ResXResourceReader(resx) { UseResXDataNodes = true }) 37 | { 38 | foreach (System.Collections.DictionaryEntry kv in reader) 39 | { 40 | var node = (ResXDataNode)kv.Value; 41 | if (node.FileRef == null) 42 | { 43 | var keyName = kv.Key.ToString(); 44 | var propName = Regex.IsMatch(keyName , @"^\d+") ? "_" + keyName : keyName; 45 | #> 46 | public static string <#= propName#> { get; } = Resx.GetString("<#= keyName#>"); 47 | <# 48 | } 49 | } 50 | } 51 | #> 52 | } 53 | } -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/PositiveTimeSpanValidatorAttribute.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.PositiveTimeSpanValidatorAttribute.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | [AttributeUsage(AttributeTargets.Property)] 34 | public sealed class PositiveTimeSpanValidatorAttribute : ConfigurationValidatorAttribute 35 | { 36 | private ConfigurationValidatorBase _instance; 37 | 38 | public override ConfigurationValidatorBase ValidatorInstance 39 | { 40 | get 41 | { 42 | if (_instance == null) 43 | _instance = new PositiveTimeSpanValidator(); 44 | 45 | return _instance; 46 | } 47 | } 48 | } 49 | } 50 | 51 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/WebApiCore/WebApiMiddleware.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.Owin; 7 | using Owin; 8 | 9 | namespace AntDeployAgentWindows.WebApiCore 10 | { 11 | /// 12 | /// 我的OWIN "中间件" 13 | /// 14 | class WebApiMiddleware : OwinMiddleware 15 | { 16 | 17 | /// 18 | /// 下一个“中间件”对象 19 | /// 20 | OwinMiddleware _next; 21 | 22 | /// 23 | /// 路由类 24 | /// 25 | IWebApiRouter _router; 26 | 27 | 28 | /// 29 | /// 构造函数,第一个参数必须为 OwinMiddleware对象 30 | /// 31 | /// 下一个中间件 32 | public WebApiMiddleware(OwinMiddleware next, IWebApiRouter router) : base(next) 33 | { 34 | _router = router; 35 | _next = next; 36 | } 37 | 38 | 39 | /// 40 | /// 处理用户请求的具体方法(该方法是中间件必须的实现的方法) 41 | /// 42 | /// OwinContext对象 43 | /// 44 | public override Task Invoke(IOwinContext c) 45 | { 46 | var app = _router.RouteTo(c); 47 | if (app == null) return _next.Invoke(c); 48 | return app.ProcessRequest(c); 49 | } 50 | 51 | 52 | 53 | } //end call mymiddleware 54 | 55 | 56 | 57 | 58 | /// 59 | /// 这个类是为AppBuilder添加一个名叫UseMyApp的扩展方法,目的是方便用户调用 60 | /// 61 | static class FastWebApiExtension 62 | { 63 | /// 64 | /// 启用 FastWebApi 中间件 65 | /// 66 | /// 67 | /// 68 | /// 69 | public static IAppBuilder UseFastWebApi(this IAppBuilder builder, IWebApiRouter router) 70 | { 71 | return builder.Use(router); 72 | } 73 | 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /AntDeployAgentWindows/WebApiCore/WebApiMiddleware.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.Owin; 7 | using Owin; 8 | 9 | namespace AntDeployAgentWindows.WebApiCore 10 | { 11 | /// 12 | /// 我的OWIN "中间件" 13 | /// 14 | class WebApiMiddleware : OwinMiddleware 15 | { 16 | 17 | /// 18 | /// 下一个“中间件”对象 19 | /// 20 | OwinMiddleware _next; 21 | 22 | /// 23 | /// 路由类 24 | /// 25 | IWebApiRouter _router; 26 | 27 | 28 | /// 29 | /// 构造函数,第一个参数必须为 OwinMiddleware对象 30 | /// 31 | /// 下一个中间件 32 | public WebApiMiddleware(OwinMiddleware next, IWebApiRouter router) : base(next) 33 | { 34 | _router = router; 35 | _next = next; 36 | } 37 | 38 | 39 | /// 40 | /// 处理用户请求的具体方法(该方法是中间件必须的实现的方法) 41 | /// 42 | /// OwinContext对象 43 | /// 44 | public override Task Invoke(IOwinContext c) 45 | { 46 | var app = _router.RouteTo(c); 47 | if (app == null) return _next.Invoke(c); 48 | return app.ProcessRequest(c); 49 | } 50 | 51 | 52 | 53 | } //end call mymiddleware 54 | 55 | 56 | 57 | 58 | /// 59 | /// 这个类是为AppBuilder添加一个名叫UseMyApp的扩展方法,目的是方便用户调用 60 | /// 61 | static class FastWebApiExtension 62 | { 63 | /// 64 | /// 启用 FastWebApi 中间件 65 | /// 66 | /// 67 | /// 68 | /// 69 | public static IAppBuilder UseFastWebApi(this IAppBuilder builder, IWebApiRouter router) 70 | { 71 | return builder.Use(router); 72 | } 73 | 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /CMD/AntDeployCommand/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Threading.Tasks; 4 | using AntDeployCommand.Interface; 5 | using AntDeployCommand.Model; 6 | using AntDeployCommand.Utils; 7 | 8 | namespace AntDeployCommand 9 | { 10 | class Program 11 | { 12 | static async Task Main(string[] args) 13 | { 14 | if (args.Length !=1) 15 | { 16 | LogHelper.Error("arguments required"); 17 | return -1; 18 | } 19 | 20 | var file = args[0]; 21 | if (string.IsNullOrEmpty(file)) 22 | { 23 | LogHelper.Error("arguments required"); 24 | return -1; 25 | } 26 | 27 | if (!File.Exists(file)) 28 | { 29 | LogHelper.Error($" {file} not found"); 30 | return -1; 31 | } 32 | 33 | var fileContext = File.ReadAllText(file,encoding:System.Text.Encoding.UTF8); 34 | if (string.IsNullOrEmpty(fileContext)) 35 | { 36 | LogHelper.Error($" {file} is empty"); 37 | return -1; 38 | } 39 | 40 | Arguments arguments = fileContext.JsonToObject(); 41 | if (arguments == null) 42 | { 43 | 44 | LogHelper.Error("arguments required"); 45 | return -1; 46 | } 47 | if (string.IsNullOrEmpty(arguments.DeployType)) 48 | { 49 | LogHelper.Error("arguments DeployType required"); 50 | return -1; 51 | } 52 | 53 | IOperations ops = OperationsFactory.Create(arguments); 54 | 55 | try 56 | { 57 | ops.ValidateArguments(); 58 | } 59 | catch (Exception ex) 60 | { 61 | LogHelper.Error(ex.Message); 62 | return -1; 63 | } 64 | 65 | await ops.Execute().ConfigureAwait(false); 66 | return 0; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/CallbackValidator.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.CallbackValidator.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | public sealed class CallbackValidator : ConfigurationValidatorBase 34 | { 35 | private readonly ValidatorCallback _callback; 36 | private readonly Type _type; 37 | 38 | public CallbackValidator(Type type, ValidatorCallback callback) 39 | { 40 | _type = type; 41 | _callback = callback; 42 | } 43 | 44 | public override bool CanValidate(Type type) 45 | { 46 | return type == _type; 47 | } 48 | 49 | public override void Validate(object value) 50 | { 51 | _callback(value); 52 | } 53 | } 54 | } 55 | 56 | 57 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/IgnoreSection.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.IgnoreSection.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez (lluis@novell.com) 8 | // Chris Toshok (toshok@ximian.com) 9 | // 10 | // Permission is hereby granted, free of charge, to any person obtaining 11 | // a copy of this software and associated documentation files (the 12 | // "Software"), to deal in the Software without restriction, including 13 | // without limitation the rights to use, copy, modify, merge, publish, 14 | // distribute, sublicense, and/or sell copies of the Software, and to 15 | // permit persons to whom the Software is furnished to do so, subject to 16 | // the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be 19 | // included in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 23 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 25 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 26 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 27 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | // 29 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 30 | // 31 | 32 | using System.Xml; 33 | 34 | namespace System.Configuration 35 | { 36 | public sealed class IgnoreSection : ConfigurationSection 37 | { 38 | private static readonly ConfigurationPropertyCollection properties; 39 | 40 | static IgnoreSection() 41 | { 42 | properties = new ConfigurationPropertyCollection(); 43 | } 44 | 45 | protected internal override ConfigurationPropertyCollection Properties 46 | { 47 | get { return properties; } 48 | } 49 | 50 | protected internal override void DeserializeSection(XmlReader reader) 51 | { 52 | } 53 | } 54 | } 55 | 56 | #endif -------------------------------------------------------------------------------- /AntDeployWinform/Models/TempFileHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | 4 | namespace AntDeployWinform.Models 5 | { 6 | internal static class TempFileHelper 7 | { 8 | public static string CreateTempFile(string projectFile) 9 | { 10 | var path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); 11 | Directory.CreateDirectory(path); // Ensure temp path exists. 12 | var file = Path.Combine(path, Path.GetFileName(projectFile)); 13 | File.Copy(projectFile, file, true); 14 | return file; 15 | } 16 | 17 | 18 | public static void RemoveTempFile(string file) 19 | { 20 | try 21 | { 22 | Directory.Delete(Path.GetDirectoryName(file), true); 23 | } 24 | catch 25 | { 26 | } 27 | } 28 | 29 | public static string CopyFileToTempFolder(string file, string folder, bool appendRondomName = true) 30 | { 31 | if (appendRondomName) 32 | { 33 | var file12 = Path.Combine(folder, Path.GetFileNameWithoutExtension(file) + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + Path.GetExtension(file)); 34 | File.Copy(file, file12, true); 35 | return file12; 36 | } 37 | var file1 = Path.Combine(folder, Path.GetFileName(file)); 38 | File.Copy(file, file1, true); 39 | return file1; 40 | } 41 | 42 | public static void RemoveFileInTempFolder(string folder) 43 | { 44 | try 45 | { 46 | var d = new DirectoryInfo(folder); 47 | var files = d.GetFiles(); 48 | foreach (var f in files) 49 | { 50 | try 51 | { 52 | f.Delete(); 53 | } 54 | catch 55 | { 56 | 57 | } 58 | } 59 | } 60 | catch 61 | { 62 | } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationConverterBase.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationConverterBase.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | using System.ComponentModel; 32 | 33 | namespace System.Configuration 34 | { 35 | public abstract class ConfigurationConverterBase : TypeConverter 36 | { 37 | public override bool CanConvertFrom(ITypeDescriptorContext ctx, Type type) 38 | { 39 | if (type == typeof(string)) 40 | return true; 41 | 42 | return base.CanConvertFrom(ctx, type); 43 | } 44 | 45 | public override bool CanConvertTo(ITypeDescriptorContext ctx, Type type) 46 | { 47 | if (type == typeof(string)) 48 | return true; 49 | 50 | return base.CanConvertTo(ctx, type); 51 | } 52 | } 53 | } 54 | 55 | #endif -------------------------------------------------------------------------------- /AntDeployWinform/Winform/About.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.Drawing; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Reflection; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using System.Windows.Forms; 13 | 14 | namespace AntDeployWinform.Winform 15 | { 16 | public partial class About : Form 17 | { 18 | public About() 19 | { 20 | InitializeComponent(); 21 | Assembly assembly = typeof(Deploy).Assembly; 22 | using (Stream stream = assembly.GetManifestResourceStream("AntDeployWinform.Resources.Logo1.ico")) 23 | { 24 | if (stream != null) this.Icon = new Icon(stream); 25 | } 26 | } 27 | 28 | private void About_Load(object sender, EventArgs e) 29 | { 30 | Assembly assembly = typeof(Deploy).Assembly; 31 | using (Stream stream = assembly.GetManifestResourceStream("AntDeployWinform.Resources.qq.jpg")) 32 | { 33 | if (stream != null) 34 | { 35 | pictureBox1.Image = Image.FromStream(stream); 36 | } 37 | } 38 | using (Stream stream = assembly.GetManifestResourceStream("AntDeployWinform.Resources.zan.png")) 39 | { 40 | if (stream != null) 41 | { 42 | pictureBox2.Image = Image.FromStream(stream); 43 | } 44 | } 45 | using (Stream stream = assembly.GetManifestResourceStream("AntDeployWinform.Resources.video.png")) 46 | { 47 | if (stream != null) 48 | { 49 | pictureBox3.Image = Image.FromStream(stream); 50 | } 51 | } 52 | } 53 | 54 | private void label5_Click(object sender, EventArgs e) 55 | { 56 | ProcessStartInfo sInfo = new ProcessStartInfo("https://www.bilibili.com/video/BV1sP411j7eK"); 57 | Process.Start(sInfo); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/RegexStringValidator.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.RegexStringValidator.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | using System.Text.RegularExpressions; 32 | 33 | namespace System.Configuration 34 | { 35 | public class RegexStringValidator : ConfigurationValidatorBase 36 | { 37 | private readonly string _regex; 38 | 39 | public RegexStringValidator(string regex) 40 | { 41 | _regex = regex; 42 | } 43 | 44 | public override bool CanValidate(Type type) 45 | { 46 | return type == typeof(string); 47 | } 48 | 49 | public override void Validate(object value) 50 | { 51 | if (!Regex.IsMatch((string) value, _regex)) 52 | throw new ArgumentException("The string must match the regexp `{0}'", _regex); 53 | } 54 | } 55 | } 56 | 57 | #endif -------------------------------------------------------------------------------- /AntDeployAgentWindowsService/ProjectInstaller.designer.cs: -------------------------------------------------------------------------------- 1 | namespace Hangfire.WindowsService 2 | { 3 | partial class ProjectInstaller 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 false。 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region 组件设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要修改 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller(); 32 | this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller(); 33 | // 34 | // serviceProcessInstaller1 35 | // 36 | this.serviceProcessInstaller1.Account = System.ServiceProcess.ServiceAccount.LocalSystem; 37 | this.serviceProcessInstaller1.Password = null; 38 | this.serviceProcessInstaller1.Username = null; 39 | // 40 | // serviceInstaller1 41 | // 42 | this.serviceInstaller1.Description = "AntDeployAgentWindowsService"; 43 | this.serviceInstaller1.ServiceName = "AntDeployAgentWindowsService"; 44 | // 45 | // ProjectInstaller 46 | // 47 | this.Installers.AddRange(new System.Configuration.Install.Installer[] { 48 | this.serviceProcessInstaller1, 49 | this.serviceInstaller1}); 50 | 51 | } 52 | 53 | #endregion 54 | 55 | private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1; 56 | private System.ServiceProcess.ServiceInstaller serviceInstaller1; 57 | } 58 | } -------------------------------------------------------------------------------- /AntDeployAgentLinuxService/AntDeployAgentLinuxService/AntDeployAgentService.cs: -------------------------------------------------------------------------------- 1 | using AntDeployAgentWindows; 2 | using Microsoft.Extensions.Hosting; 3 | using System; 4 | using System.IO; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | using Microsoft.Extensions.Logging; 8 | using TinyFox; 9 | 10 | namespace AntDeployAgentLinuxService 11 | { 12 | public class AntDeployAgentService : BackgroundService 13 | { 14 | private Startup _startup; 15 | private readonly ILogger _logger; 16 | 17 | public AntDeployAgentService(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public override Task StartAsync(CancellationToken cancellationToken) 23 | { 24 | return base.StartAsync(cancellationToken); 25 | } 26 | 27 | public override Task StopAsync(CancellationToken cancellationToken) 28 | { 29 | _startup?.Stop(); 30 | TinyFoxService.Stop(); 31 | return Task.CompletedTask; 32 | } 33 | 34 | protected override Task ExecuteAsync(CancellationToken stoppingToken) 35 | { 36 | try 37 | { 38 | var port = System.Configuration.ConfigurationManager.AppSettings["Port"]; 39 | TinyFoxService.OwinOnly = true; 40 | TinyFoxService.IpAddress = TyeIpAddress.Any; 41 | TinyFoxService.Port = string.IsNullOrEmpty(port) ? 8088 : int.Parse(port); 42 | _startup = new AntDeployAgentWindows.Startup(); 43 | TinyFoxService.Start(_startup.OwinMain); 44 | } 45 | catch (Exception ex) 46 | { 47 | _logger.LogError(ex, "StartError"); 48 | try 49 | { 50 | File.WriteAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "startupError.txt"), ex.ToString()); 51 | } 52 | catch (Exception) 53 | { 54 | 55 | } 56 | } 57 | 58 | return Task.CompletedTask; 59 | 60 | } 61 | 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/TypeNameConverter.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.TypeNameConverter.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | using System.ComponentModel; 32 | using System.Globalization; 33 | 34 | namespace System.Configuration 35 | { 36 | public sealed class TypeNameConverter : ConfigurationConverterBase 37 | { 38 | public override object ConvertFrom(ITypeDescriptorContext ctx, CultureInfo ci, object data) 39 | { 40 | return Type.GetType((string) data); 41 | } 42 | 43 | public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type) 44 | { 45 | if (value == null) 46 | return null; 47 | 48 | if (!(value is Type)) 49 | throw new ArgumentException("value"); 50 | 51 | return ((Type) value).AssemblyQualifiedName; 52 | } 53 | } 54 | } 55 | 56 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/RegexStringValidatorAttribute.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.RegexStringValidatorAttribute.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | [AttributeUsage(AttributeTargets.Property)] 34 | public sealed class RegexStringValidatorAttribute : ConfigurationValidatorAttribute 35 | { 36 | private ConfigurationValidatorBase _instance; 37 | 38 | public RegexStringValidatorAttribute(string regex) 39 | { 40 | Regex = regex; 41 | } 42 | 43 | public string Regex { get; } 44 | 45 | public override ConfigurationValidatorBase ValidatorInstance 46 | { 47 | get 48 | { 49 | if (_instance == null) 50 | _instance = new RegexStringValidator(Regex); 51 | return _instance; 52 | } 53 | } 54 | } 55 | } 56 | 57 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/SubclassTypeValidator.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.SubclassTypeValidator.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2004 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | using System.Reflection; 32 | 33 | namespace System.Configuration 34 | { 35 | public sealed class SubclassTypeValidator : ConfigurationValidatorBase 36 | { 37 | private readonly Type _baseClass; 38 | 39 | public SubclassTypeValidator(Type baseClass) 40 | { 41 | _baseClass = baseClass; 42 | } 43 | 44 | public override bool CanValidate(Type type) 45 | { 46 | return type == typeof(Type); 47 | } 48 | 49 | public override void Validate(object value) 50 | { 51 | var type = (Type) value; 52 | 53 | if (!_baseClass.GetTypeInfo().IsAssignableFrom(type)) 54 | throw new ArgumentException("The value must be a subclass"); 55 | } 56 | } 57 | } 58 | 59 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/ConfigurationCollectionAttribute.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.ConfigurationCollectionAttribute.cs 5 | // 6 | // Authors: 7 | // Lluis Sanchez Gual (lluis@novell.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | namespace System.Configuration 32 | { 33 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] 34 | public sealed class ConfigurationCollectionAttribute : Attribute 35 | { 36 | public ConfigurationCollectionAttribute(Type itemType) 37 | { 38 | ItemType = itemType; 39 | } 40 | 41 | public string AddItemName { get; set; } = "add"; 42 | 43 | public string ClearItemsName { get; set; } = "clear"; 44 | 45 | public string RemoveItemName { get; set; } = "remove"; 46 | 47 | public ConfigurationElementCollectionType CollectionType { get; set; } = 48 | ConfigurationElementCollectionType.BasicMap; 49 | 50 | public Type ItemType { get; } 51 | } 52 | } 53 | 54 | #endif -------------------------------------------------------------------------------- /AntDeployAgent/System.Configuration/WhiteSpaceTrimStringConverter.cs: -------------------------------------------------------------------------------- 1 | #if NETSTANDARD 2 | 3 | // 4 | // System.Configuration.WhiteSpaceTrimStringConverter.cs 5 | // 6 | // Authors: 7 | // Chris Toshok (toshok@ximian.com) 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining 10 | // a copy of this software and associated documentation files (the 11 | // "Software"), to deal in the Software without restriction, including 12 | // without limitation the rights to use, copy, modify, merge, publish, 13 | // distribute, sublicense, and/or sell copies of the Software, and to 14 | // permit persons to whom the Software is furnished to do so, subject to 15 | // the following conditions: 16 | // 17 | // The above copyright notice and this permission notice shall be 18 | // included in all copies or substantial portions of the Software. 19 | // 20 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 21 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 22 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 23 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 24 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 25 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 26 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 27 | // 28 | // Copyright (C) 2005 Novell, Inc (http://www.novell.com) 29 | // 30 | 31 | using System.ComponentModel; 32 | using System.Globalization; 33 | 34 | namespace System.Configuration 35 | { 36 | public sealed class WhiteSpaceTrimStringConverter : ConfigurationConverterBase 37 | { 38 | public override object ConvertFrom(ITypeDescriptorContext ctx, CultureInfo ci, object data) 39 | { 40 | return ((string) data).Trim(); 41 | } 42 | 43 | public override object ConvertTo(ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type) 44 | { 45 | if (value == null) 46 | return ""; 47 | 48 | if (!(value is string)) 49 | throw new ArgumentException("value"); 50 | 51 | return ((string) value).Trim(); 52 | } 53 | } 54 | } 55 | 56 | #endif --------------------------------------------------------------------------------