├── .gitattributes
├── .github
└── FUNDING.yml
├── .gitignore
├── .gitmodules
├── .version
├── .vssbe
├── 3rd-party
├── Bridge
├── .version
├── AssemblyInfo.cs
├── Bridge.csproj
├── BuildType.cs
├── Codes.cs
├── Exceptions
│ ├── GeneralException.cs
│ ├── InitializeException.cs
│ ├── InvalidArgumentException.cs
│ └── NotFoundException.cs
└── IEvent.cs
├── LICENSE
├── README.md
├── VsixLib.targets
├── appveyor-build.bat
├── appveyor-tests.bat
├── build.bat
├── changelog.txt
├── com.github.3F.test.snk
├── com.github.3F.vsce.snk
├── common.props
├── inc
├── modules
│ ├── E-MSBuild
│ │ └── E-MSBuild.csproj
│ ├── LSender
│ │ └── LSender.csproj
│ ├── SobaScript.Mapper
│ │ └── SobaScript.Mapper.csproj
│ ├── SobaScript.Z.Core
│ │ └── SobaScript.Z.Core.csproj
│ ├── SobaScript.Z.Ext
│ │ └── SobaScript.Z.Ext.csproj
│ ├── SobaScript.Z.VS
│ │ └── SobaScript.Z.VS.csproj
│ ├── SobaScript
│ │ └── SobaScript.csproj
│ ├── Varhead
│ │ └── Varhead.csproj
│ └── common.props
└── tests
│ ├── E-MSBuildTest
│ └── E-MSBuildTest.csproj
│ ├── LSender
│ ├── DepA
│ │ └── DepA.csproj
│ ├── DepB
│ │ └── DepB.csproj
│ ├── DepC
│ │ └── DepC.csproj
│ ├── LSenderTest
│ │ └── LSenderTest.csproj
│ └── common.props
│ ├── SobaScript.MapperTest
│ └── SobaScript.MapperTest.csproj
│ ├── SobaScript.Z.CoreTest
│ └── SobaScript.Z.CoreTest.csproj
│ ├── SobaScript.Z.ExtTest
│ └── SobaScript.Z.ExtTest.csproj
│ ├── SobaScript.Z.VSTest
│ └── SobaScript.Z.VSTest.csproj
│ ├── SobaScriptTest
│ └── SobaScriptTest.csproj
│ ├── VarheadTest
│ └── VarheadTest.csproj
│ └── common.props
├── media
├── devenv.png
└── gif
│ └── AboutVS.gif
├── tools
├── gnt.bat
├── hMSBuild.bat
├── netfx4sdk.cmd
└── packages.config
├── versions.props
├── vsCommandEvent.sln
├── vsCommandEvent
├── Actions
│ ├── ActionAbstract.cs
│ ├── ActionCSharp.cs
│ ├── ActionEnvCommand.cs
│ ├── ActionFile.cs
│ ├── ActionInterpreter.cs
│ ├── ActionOperation.cs
│ ├── ActionScript.cs
│ ├── ActionTargets.cs
│ ├── Binder.cs
│ ├── Command.cs
│ ├── DTEOperation.cs
│ ├── IAction.cs
│ ├── ICommand.cs
│ ├── IStatus.cs
│ └── Status.cs
├── Bootloader.cs
├── BuildEnv.cs
├── CancelBuildState.cs
├── Config.cs
├── Configuration
│ ├── Component.cs
│ ├── ContextType.cs
│ ├── Header.cs
│ ├── IConfig.cs
│ ├── IManager.cs
│ ├── Manager.cs
│ ├── PackerAbstract.cs
│ └── User
│ │ ├── Cache.cs
│ │ ├── Common.cs
│ │ ├── Data.cs
│ │ ├── Global.cs
│ │ ├── HashType.cs
│ │ ├── ICacheHeader.cs
│ │ ├── ICommon.cs
│ │ ├── IData.cs
│ │ ├── IDataSvc.cs
│ │ ├── IGlobal.cs
│ │ ├── IManager.cs
│ │ ├── IRoute.cs
│ │ ├── IUserValue.cs
│ │ ├── LinkType.cs
│ │ ├── Manager.cs
│ │ ├── Route.cs
│ │ └── UserValue.cs
├── DataArgs.cs
├── DteEnv.cs
├── DteSlnCfg.cs
├── EncDetector.cs
├── EnvAbstract.cs
├── Environment.cs
├── EvLevel.cs
├── Events
│ ├── AggregatedEventsEnvDte.cs
│ ├── CommandEvents
│ │ ├── Filter.cs
│ │ └── IFilter.cs
│ ├── Commands
│ │ ├── ICommand.cs
│ │ └── ICommandArray.cs
│ ├── Event.cs
│ ├── EventProcess.cs
│ ├── ICommandEvent.cs
│ ├── IEventProcess.cs
│ ├── IMode.cs
│ ├── IModeCSharp.cs
│ ├── IModeEnvCommand.cs
│ ├── IModeFile.cs
│ ├── IModeInterpreter.cs
│ ├── IModeOperation.cs
│ ├── IModeScript.cs
│ ├── IModeTargets.cs
│ ├── ISolutionEvent.cs
│ ├── ISolutionEventOWP.cs
│ ├── Mapping
│ │ └── Json
│ │ │ └── ModeCommand.cs
│ ├── ModeCSharp.cs
│ ├── ModeEnvCommand.cs
│ ├── ModeFile.cs
│ ├── ModeInterpreter.cs
│ ├── ModeOperation.cs
│ ├── ModeScript.cs
│ ├── ModeTargets.cs
│ ├── ModeType.cs
│ ├── OWP
│ │ ├── ComparisonType.cs
│ │ ├── Condition.cs
│ │ └── IMatching.cs
│ ├── SolutionEventType.cs
│ └── Types
│ │ ├── Command.cs
│ │ └── CommandDte.cs
├── Exceptions
│ ├── CompilerException.cs
│ └── UnspecSBEException.cs
├── Extensions
│ ├── ArrayExtension.cs
│ ├── IVsHierarchyExtension.cs
│ ├── ObjectExtension.cs
│ ├── ProjectExtension.cs
│ └── StringExtension.cs
├── GAC.cs
├── GuidList.cs
├── IAppSettings.cs
├── IEnvironment.cs
├── IEnvironmentExt.cs
├── IEvLevel.cs
├── IOW.cs
├── IPkg.cs
├── ISolutionEvents.cs
├── IsolatedEnv.cs
├── JsonSerializationBinder.cs
├── LICENSE.vsixinfo
├── Log.cs
├── Logger
│ ├── ILog.cs
│ ├── Initializer.cs
│ └── MessageArgs.cs
├── MSBuild.cs
├── MainToolCommand.cs
├── OW.cs
├── OwpEnv.cs
├── ParamPacker.cs
├── Pkg.cs
├── Pkg.vsct
├── PkgCmdID.cs
├── Properties
│ └── AssemblyInfo.cs
├── Receiver
│ └── Output
│ │ ├── EWType.cs
│ │ ├── IItem.cs
│ │ ├── IItemEW.cs
│ │ ├── IItems.cs
│ │ ├── Ident.cs
│ │ ├── ItemEW.cs
│ │ ├── ItemType.cs
│ │ ├── Items.cs
│ │ ├── Matcher.cs
│ │ ├── OWP.cs
│ │ └── PaneArgs.cs
├── Resources
│ ├── License.md
│ ├── Package.ico
│ ├── Package.png
│ ├── Package_16.png
│ ├── Package_32.ico
│ ├── Settings_16.png
│ ├── bug.png
│ ├── cfg_exclamation.png
│ ├── components
│ │ ├── alias.png
│ │ ├── definition.png
│ │ ├── function.png
│ │ ├── package.png
│ │ └── property.png
│ ├── help-16.png
│ ├── lightning.png
│ ├── preview.png
│ ├── separator-horizontal.png
│ ├── toggle-16.png
│ └── vsmenu_unwarn.png
├── Settings.cs
├── SobaScript
│ └── Components
│ │ ├── DteComponent.cs
│ │ ├── IDteCeEnv.cs
│ │ └── InternalComponent.cs
├── SolutionEvents.cs
├── SzArchiver.cs
├── UI
│ ├── EnumDecor.cs
│ ├── ITransfer.cs
│ ├── Resource.Designer.cs
│ ├── Resource.resx
│ ├── Util.cs
│ └── WForms
│ │ ├── AboutFrm.Designer.cs
│ │ ├── AboutFrm.cs
│ │ ├── AboutFrm.resx
│ │ ├── Components
│ │ └── DataGridViewExt.cs
│ │ ├── ComponentsFrm.Designer.cs
│ │ ├── ComponentsFrm.cs
│ │ ├── ComponentsFrm.resx
│ │ ├── Controls
│ │ ├── CompletionData.cs
│ │ ├── DomIcon.Designer.cs
│ │ ├── DomIcon.resx
│ │ ├── FileTextBox.Designer.cs
│ │ ├── FileTextBox.cs
│ │ ├── FileTextBox.resx
│ │ ├── Lights.Designer.cs
│ │ ├── Lights.cs
│ │ ├── Lights.resx
│ │ ├── TextEditor.Designer.cs
│ │ ├── TextEditor.cs
│ │ ├── TextEditor.resx
│ │ └── TextEditorElements
│ │ │ ├── BraceFoldingStrategy.cs
│ │ │ ├── HighlightBracesRenderer.cs
│ │ │ └── SimilarWordsRenderer.cs
│ │ ├── DTECheckFrm.Designer.cs
│ │ ├── DTECheckFrm.cs
│ │ ├── DTECheckFrm.resx
│ │ ├── DTECommandsFrm.Designer.cs
│ │ ├── DTECommandsFrm.cs
│ │ ├── DTECommandsFrm.resx
│ │ ├── EnvDteSniffer.Designer.cs
│ │ ├── EnvDteSniffer.cs
│ │ ├── EnvDteSniffer.resx
│ │ ├── EventsFrm.Designer.cs
│ │ ├── EventsFrm.cs
│ │ ├── EventsFrm.resx
│ │ ├── Logic
│ │ ├── Events.cs
│ │ ├── RestoreData.cs
│ │ └── SBEWrap.cs
│ │ ├── PropertiesFrm.Designer.cs
│ │ ├── PropertiesFrm.cs
│ │ ├── PropertiesFrm.resx
│ │ ├── PropertyCheckFrm.Designer.cs
│ │ ├── PropertyCheckFrm.cs
│ │ ├── PropertyCheckFrm.resx
│ │ ├── ScriptCheckFrm.Designer.cs
│ │ ├── ScriptCheckFrm.cs
│ │ ├── ScriptCheckFrm.resx
│ │ └── Wizards
│ │ ├── Version
│ │ ├── Fields.cs
│ │ ├── GenType.cs
│ │ ├── IStep.cs
│ │ ├── Manager.cs
│ │ ├── Resource.Designer.cs
│ │ ├── Resource.resx
│ │ ├── RevNumber
│ │ │ ├── DeltaTime.cs
│ │ │ ├── IRevNumber.cs
│ │ │ ├── Raw.cs
│ │ │ └── Type.cs
│ │ ├── StepCfgData.cs
│ │ ├── StepFields.cs
│ │ ├── StepFinal.cs
│ │ ├── StepGen.cs
│ │ ├── StepRepl.cs
│ │ ├── StepStruct.cs
│ │ └── StepsType.cs
│ │ ├── VersionFrm.Designer.cs
│ │ ├── VersionFrm.cs
│ │ └── VersionFrm.resx
├── UnifiedTypes
│ ├── Build
│ │ └── VSCommand.cs
│ └── DTEC.cs
├── UserConfig.cs
├── VSPackage.Designer.cs
├── VSPackage.resx
├── VSTools
│ ├── ErrorList
│ │ ├── IPane.cs
│ │ └── Pane.cs
│ └── OW
│ │ ├── IPane.cs
│ │ ├── PaneCOM.cs
│ │ └── PaneDTE.cs
├── app.config
├── sdk10.vsixmanifest
├── sdk15.vsixmanifest
├── sdk17.vsixmanifest
├── vsCommandEvent.csproj
└── xshd
│ ├── CSharpLang.xshd
│ ├── CppLang.xshd
│ ├── FilesMode.xshd
│ ├── InterpreterMode.xshd
│ ├── MSBuildTargets.xshd
│ ├── OperationMode.xshd
│ ├── SBEScripts.xshd
│ ├── XshdResource.Designer.cs
│ └── XshdResource.resx
└── vsCommandEventTest
├── Actions
└── DTEOperationTest.cs
├── AssemblyInfo.cs
├── MSBuild
└── ParserTest.cs
├── Receiver
└── Output
│ ├── BuildItemTest.cs
│ └── MatcherTest.cs
├── SobaAcs.cs
├── SobaScript
└── Components
│ └── InternalComponentTest.cs
├── StubEnv.cs
├── TempFile.cs
├── app.config
└── vsCommandEventTest.csproj
/.gitattributes:
--------------------------------------------------------------------------------
1 |
2 | # Our batch files requires CRLF for correct work.
3 | # https://github.com/3F/hMSBuild/issues/2
4 |
5 | *.bat text eol=crlf
6 | *.cmd text eol=crlf
7 | *.tpl text eol=crlf
8 |
9 | # https://github.com/3F/vsSolutionBuildEvent/releases/tag/1.14.1
10 |
11 | *.resx text eol=crlf
12 | *.vsixinfo text eol=crlf
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # ____
2 | # /___/|\
3 | # `~|___| ! With open love to open source.
4 | # /___/ \; Yours, github.com/3F
5 | #
6 |
7 | custom: ['3F.github.io/Donation']
8 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "MvsSln"]
2 | path = MvsSln
3 | url = https://github.com/3F/MvsSln.git
4 | [submodule "E-MSBuild"]
5 | path = E-MSBuild
6 | url = https://github.com/3F/E-MSBuild.git
7 | [submodule "SobaScript"]
8 | path = SobaScript
9 | url = https://github.com/3F/SobaScript.git
10 | [submodule "SobaScript.Z.Core"]
11 | path = SobaScript.Z.Core
12 | url = https://github.com/3F/SobaScript.Z.Core.git
13 | [submodule "SobaScript.Z.Ext"]
14 | path = SobaScript.Z.Ext
15 | url = https://github.com/3F/SobaScript.Z.Ext.git
16 | [submodule "SobaScript.Z.VS"]
17 | path = SobaScript.Z.VS
18 | url = https://github.com/3F/SobaScript.Z.VS.git
19 | [submodule "Varhead"]
20 | path = Varhead
21 | url = https://github.com/3F/Varhead.git
22 | [submodule "LSender"]
23 | path = LSender
24 | url = https://github.com/3F/LSender.git
25 | [submodule "SobaScript.Mapper"]
26 | path = SobaScript.Mapper
27 | url = https://github.com/3F/SobaScript.Mapper.git
28 |
--------------------------------------------------------------------------------
/.version:
--------------------------------------------------------------------------------
1 | 1.4.0
--------------------------------------------------------------------------------
/3rd-party:
--------------------------------------------------------------------------------
1 | vsCommandEvent - https://github.com/3F/vsCommandEvent
2 | - - - - - - - - - - - - - - - - - - - - - - - - - - -
3 |
4 | # Third-party software components
5 |
6 | ## vsCommandEvent and its various packages may* include or reference:
7 | (*- specific target platforms or some complex archives)
8 |
9 | * SobaScript (github.com/3F/SobaScript)
10 | * Core Components (github.com/3F/SobaScript.Z.Core)
11 | * Ext Components (github.com/3F/SobaScript.Z.Ext)
12 | * VS Components (github.com/3F/SobaScript.Z.VS)
13 |
14 | * E-MSBuild (github.com/3F/E-MSBuild)
15 | * Varhead (github.com/3F/Varhead)
16 |
17 | * AvalonEdit (avalonedit.net)
18 | * Json.NET (json.codeplex.com)
19 | * NLog (nlog-project.org)
20 | * Ude (code.google.com/p/ude/)
21 | * SevenZipSharp (sevenzipsharp.codeplex.com)
22 | * 7-Zip (www.7-zip.org)
23 | * GetNuTool (github.com/3F/GetNuTool)
24 |
25 | ## Dev Dependencies includes the following tools for src
26 |
27 | * Moq (www.moqthis.com)
28 | * GetNuTool (github.com/3F/GetNuTool)
29 | * vsSolutionBuildEvent (github.com/3F/vsSolutionBuildEvent)
30 | * hMSBuild (github.com/3F/hMSBuild)
31 | * netfx4sdk (github.com/3F/netfx4sdk)
32 |
33 |
34 | ## Additional packages
35 |
36 | Additional packages like NuGet packages (.nupkg) also may include files that are distributed under the following licenses and permits:
37 |
38 | * MICROSOFT VISUAL STUDIO SOFTWARE DEVELOPMENT KIT:
39 | see accompanying file EULA.html or here:
40 |
41 | * https://www.visualstudio.com/en-us/support/legal/mt171586
42 | * http://go.microsoft.com/fwlink/?LinkID=614949
43 |
44 |
45 | * MICROSOFT .NET LIBRARIES:
46 | see accompanying file dotnet_library_license.htm or here https://www.microsoft.com/net/dotnet_library_license.htm
47 |
48 |
49 | ## Resources
50 |
51 | About graphical resources see /Resources/License
--------------------------------------------------------------------------------
/Bridge/.version:
--------------------------------------------------------------------------------
1 | 0.1
--------------------------------------------------------------------------------
/Bridge/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | [assembly: ComVisible(false)]
4 |
5 | [assembly: Guid("5DDF8018-6651-421E-9B70-26D0DB76498F")]
--------------------------------------------------------------------------------
/Bridge/Bridge.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)\.version"))
6 | vsCommandEvent.Bridge
7 | net.r_eg.vsCE.Bridge
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | ..\packages\vsSBE.SDK.$(vsSBE_SDK)\lib\$(Sdk10libTarget)\Microsoft.VisualStudio.Shell.Interop.dll
21 | True
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Bridge/Codes.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Bridge
9 | {
10 | ///
11 | /// Represents a different codes for our library
12 | ///
13 | internal sealed class Codes
14 | {
15 | ///
16 | /// Unspecified Success operation
17 | ///
18 | public const int Success = 0;
19 |
20 | ///
21 | /// Unspecified Failed operation
22 | ///
23 | public const int Failed = 1;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Bridge/Exceptions/GeneralException.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 |
10 | namespace net.r_eg.vsCE.Bridge.Exceptions
11 | {
12 | [Serializable]
13 | public class GeneralException: NotSupportedException
14 | {
15 | public GeneralException()
16 | {
17 |
18 | }
19 |
20 | public GeneralException(string message)
21 | : base(message)
22 | {
23 |
24 | }
25 |
26 | public GeneralException(string message, Exception innerException)
27 | : base(message, innerException)
28 | {
29 |
30 | }
31 |
32 | public GeneralException(string message, params object[] args)
33 | : base(format(ref message, args))
34 | {
35 |
36 | }
37 |
38 | public GeneralException(string message, Exception innerException, params object[] args)
39 | : base(format(ref message, args), innerException)
40 | {
41 |
42 | }
43 |
44 | protected static string format(ref string message, params object[] args)
45 | {
46 | return String.Format(message, args);
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Bridge/Exceptions/InitializeException.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 |
10 | namespace net.r_eg.vsCE.Bridge.Exceptions
11 | {
12 | [Serializable]
13 | public class InitializeException: GeneralException
14 | {
15 | public InitializeException(string message)
16 | : base(message)
17 | {
18 |
19 | }
20 |
21 | public InitializeException(string message, params object[] args)
22 | : base(message, args)
23 | {
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Bridge/Exceptions/InvalidArgumentException.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 |
10 | namespace net.r_eg.vsCE.Bridge.Exceptions
11 | {
12 | [Serializable]
13 | public class InvalidArgumentException: GeneralException
14 | {
15 | public InvalidArgumentException(string message)
16 | : base(message)
17 | {
18 |
19 | }
20 |
21 | public InvalidArgumentException(string message, params object[] args)
22 | : base(message, args)
23 | {
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Bridge/Exceptions/NotFoundException.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 |
10 | namespace net.r_eg.vsCE.Bridge.Exceptions
11 | {
12 | [Serializable]
13 | public class NotFoundException: GeneralException
14 | {
15 | public NotFoundException(string message)
16 | : base(message)
17 | {
18 |
19 | }
20 |
21 | public NotFoundException(string message, params object[] args)
22 | : base(message, args)
23 | {
24 |
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Bridge/IEvent.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Bridge
12 | {
13 | [Guid("F9BF1346-3701-43A0-92D7-828B1112B63C")]
14 | public interface IEvent
15 | {
16 | ///
17 | /// Solution has been opened.
18 | ///
19 | /// Reserved for future use.
20 | /// true if the solution is being created. false if the solution was created previously or is being loaded.
21 | /// If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.
22 | int solutionOpened(object pUnkReserved, int fNewSolution);
23 |
24 | ///
25 | /// Solution has been closed.
26 | ///
27 | /// Reserved for future use.
28 | /// If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.
29 | int solutionClosed(object pUnkReserved);
30 |
31 | ///
32 | /// Before executing Command ID for EnvDTE.
33 | ///
34 | /// The GUID.
35 | /// The command ID.
36 | /// Custom input parameters.
37 | /// Custom output parameters.
38 | /// Whether the command has been cancelled.
39 | /// If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.
40 | int onCommandDtePre(string guid, int id, object customIn, object customOut, ref bool cancelDefault);
41 |
42 | ///
43 | /// After executed Command ID for EnvDTE.
44 | ///
45 | /// The GUID.
46 | /// The command ID.
47 | /// Custom input parameters.
48 | /// Custom output parameters.
49 | /// If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.
50 | int onCommandDtePost(string guid, int id, object customIn, object customOut);
51 |
52 | ///
53 | /// During assembly.
54 | ///
55 | /// Raw data of building process
56 | /// Guid string of pane
57 | /// Name of item pane
58 | void onBuildRaw(string data, string guid, string item);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/VsixLib.targets:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
17 | <_SDK_Lib>$(SolutionDir)packages\vsSBE.SDK.$(vsSBE_SDK)\lib\$(SdklibTarget)
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/appveyor-build.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 |
3 | setlocal
4 | cd tools
5 | call netfx4sdk -mode sys
6 | endlocal
7 |
8 | build %*
--------------------------------------------------------------------------------
/appveyor-tests.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo Usage: %~nx0 [configuration name or nothing to test all]
3 |
4 | set "cfg=%~1"
5 | set ciLogger=Appveyor.TestLogger -Version 2.0.0
6 | set tcmd=dotnet test --no-build --no-restore --test-adapter-path:. --logger:Appveyor
7 |
8 | ::::::::::::::::::::
9 |
10 | setlocal
11 | cd vsCommandEventTest
12 | nuget install %ciLogger%
13 | endlocal
14 |
15 | if not defined cfg (
16 |
17 | call %tcmd% -c REL_SDK10 vsCommandEventTest
18 | call %tcmd% -c REL_SDK15 vsCommandEventTest
19 | call %tcmd% -c REL_SDK17 vsCommandEventTest
20 |
21 | ) else (
22 | call %tcmd% -c %cfg% vsCommandEventTest
23 | )
24 |
25 | exit /B 0
26 |
27 | :err
28 | echo. Build failed. 1>&2
29 | exit /B 1
--------------------------------------------------------------------------------
/build.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | echo Usage: %~nx0 [RCI flag] [configuration name or nothing to build all]
3 | echo DBG == Debug; REL == Release; + _SDK10/15/17
4 | if "%~1"=="RCI" ( set "IsRCI=1" & set "cfg=%~2" ) else ( set "IsRCI=" & set "cfg=%~1" )
5 |
6 | ::::::::::::::::::::
7 | set __p_call=1
8 | call tools\gnt /p:ngconfig="tools/packages.config" || goto err
9 |
10 | set bnode=packages\vsSolutionBuildEvent\cim.cmd -vsw-priority Microsoft.NetCore.Component.SDK /m:7 /v:m /p:Platform="Any CPU"
11 | if not defined cfg (
12 |
13 | call %bnode% /p:Configuration=REL_SDK10 || goto err
14 | call %bnode% /p:Configuration=REL_SDK15 || goto err
15 | call %bnode% /p:Configuration=REL_SDK17 || goto err
16 |
17 | ) else call %bnode% /p:Configuration=%cfg% || goto err
18 |
19 | exit /B 0
20 |
21 | :err
22 | echo. Failed. 1>&2
23 | exit /B 1
--------------------------------------------------------------------------------
/com.github.3F.test.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/3F/vsCommandEvent/99bba678a94396df59a540f8286995613de64240/com.github.3F.test.snk
--------------------------------------------------------------------------------
/com.github.3F.vsce.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/3F/vsCommandEvent/99bba678a94396df59a540f8286995613de64240/com.github.3F.vsce.snk
--------------------------------------------------------------------------------
/inc/modules/E-MSBuild/E-MSBuild.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.EvMSBuild
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/inc/modules/LSender/LSender.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.LSender
8 | LSR_FEATURE_S_VECTOR;$(DefineConstants)
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/inc/modules/SobaScript.Mapper/SobaScript.Mapper.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.SobaScript.Mapper
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/inc/modules/SobaScript.Z.Core/SobaScript.Z.Core.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.SobaScript.Z.Core
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/inc/modules/SobaScript.Z.Ext/SobaScript.Z.Ext.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.SobaScript.Z.Ext
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/inc/modules/SobaScript.Z.VS/SobaScript.Z.VS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.SobaScript.Z.VS
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/inc/modules/SobaScript/SobaScript.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.SobaScript
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/inc/modules/Varhead/Varhead.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | net.r_eg.Varhead
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/inc/modules/common.props:
--------------------------------------------------------------------------------
1 |
2 |
3 | ..\..\..\
4 |
5 |
6 |
7 | ..\bin\$(MSBuildProjectName)\
8 | ..\obj\$(MSBuildProjectName)\
9 | false
10 |
11 |
12 |
13 | netstandard2.0;net40
14 | true
15 | $(RepoDirRoot)com.github.3F.vsce.snk
16 | false
17 | Copyright (c) 2015-2021 Denis Kuzmin <x-3F@outlook.com> github/3F
18 |
19 | DBG_SDK10;REL_SDK10;DBG_SDK15;REL_SDK15;DBG_SDK17;REL_SDK17
20 | $(Configurations)
21 | 1701;1702;CS1591
22 | latest
23 | false
24 |
25 |
26 |
27 | DEBUG;TRACE;$(DefineConstants)
28 | true
29 | full
30 | false
31 |
32 |
33 |
34 | pdbonly
35 | true
36 |
37 |
38 |
39 | true
40 |
41 |
42 |
--------------------------------------------------------------------------------
/inc/tests/E-MSBuildTest/E-MSBuildTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | EvMSBuildTest
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/inc/tests/LSender/DepA/DepA.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/inc/tests/LSender/DepB/DepB.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/inc/tests/LSender/DepC/DepC.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/inc/tests/LSender/LSenderTest/LSenderTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LSR_FEATURE_S_VECTOR;$(DefineConstants)
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/inc/tests/LSender/common.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ..\$(RepoDirRoot)
6 | ..\$(IncModulesDir)
7 | ..\$(AssemblyOriginatorKeyFile)
8 |
9 |
10 |
--------------------------------------------------------------------------------
/inc/tests/SobaScript.MapperTest/SobaScript.MapperTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/inc/tests/SobaScript.Z.CoreTest/SobaScript.Z.CoreTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/inc/tests/SobaScript.Z.ExtTest/SobaScript.Z.ExtTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/inc/tests/SobaScript.Z.VSTest/SobaScript.Z.VSTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | $(RepoDirRoot)SobaScript.Z.VS\SobaScript.Z.VSTest\key.snk
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/inc/tests/SobaScriptTest/SobaScriptTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/inc/tests/VarheadTest/VarheadTest.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/inc/tests/common.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ..\..\..\
6 | ..\..\modules\
7 |
8 |
9 |
10 | ..\bin\$(MSBuildProjectName)\
11 | ..\obj\$(MSBuildProjectName)\
12 | false
13 |
14 |
15 |
16 | netcoreapp3.1
17 | false
18 | true
19 | $(RepoDirRoot)com.github.3F.test.snk
20 | false
21 | DBG_SDK10;REL_SDK10;DBG_SDK15;REL_SDK15;DBG_SDK17;REL_SDK17
22 | $(Configurations)
23 | 1701;1702;CS1591
24 | latest
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/media/devenv.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/3F/vsCommandEvent/99bba678a94396df59a540f8286995613de64240/media/devenv.png
--------------------------------------------------------------------------------
/media/gif/AboutVS.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/3F/vsCommandEvent/99bba678a94396df59a540f8286995613de64240/media/gif/AboutVS.gif
--------------------------------------------------------------------------------
/tools/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/vsCommandEvent/Actions/ActionFile.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events;
9 |
10 | namespace net.r_eg.vsCE.Actions
11 | {
12 | ///
13 | /// Action for Files Mode
14 | ///
15 | public class ActionFile: ActionAbstract, IAction
16 | {
17 | ///
18 | /// Process for specified event.
19 | ///
20 | /// Configured event.
21 | /// Result of handling.
22 | public override bool process(ISolutionEvent evt)
23 | {
24 | string cFiles = ((IModeFile)evt.Mode).Command;
25 |
26 | cFiles = parse(evt, cFiles);
27 | shell(evt, treatNewlineAs(" & ", cFiles));
28 |
29 | return true;
30 | }
31 |
32 | ///
33 | public ActionFile(ICommand cmd)
34 | : base(cmd)
35 | {
36 |
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vsCommandEvent/Actions/ActionInterpreter.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events;
9 | using net.r_eg.vsCE.Exceptions;
10 |
11 | namespace net.r_eg.vsCE.Actions
12 | {
13 | ///
14 | /// Action for Interpreter Mode
15 | ///
16 | public class ActionInterpreter: ActionAbstract, IAction
17 | {
18 | ///
19 | /// Process for specified event.
20 | ///
21 | /// Configured event.
22 | /// Result of handling.
23 | public override bool process(ISolutionEvent evt)
24 | {
25 | if(((IModeInterpreter)evt.Mode).Handler.Trim().Length < 1) {
26 | throw new CompilerException("Interpreter: Handler is empty or not selected.");
27 | }
28 |
29 | string script = ((IModeInterpreter)evt.Mode).Command;
30 | string wrapper = ((IModeInterpreter)evt.Mode).Wrapper;
31 |
32 | script = parse(evt, script);
33 | script = treatNewlineAs(((IModeInterpreter)evt.Mode).Newline, script);
34 |
35 | switch(wrapper.Length) {
36 | case 1: {
37 | script = string.Format("{0}{1}{0}", wrapper, script.Replace(wrapper, "\\" + wrapper));
38 | break;
39 | }
40 | case 2: {
41 | //pair as: (), {}, [] ...
42 | //e.g.: (echo str&echo.&echo str) >> out
43 | string wL = wrapper[0].ToString();
44 | string wR = wrapper[1].ToString();
45 | script = string.Format("{0}{1}{2}", wL, script.Replace(wL, "\\" + wL).Replace(wR, "\\" + wR), wR);
46 | break;
47 | }
48 | }
49 |
50 | string handler = ((IModeInterpreter)evt.Mode).Handler;
51 | if(evt.SupportMSBuild) {
52 | handler = cmd.MSBuild.Eval(handler);
53 | }
54 |
55 | shell(evt, string.Format("{0} {1}", handler, script));
56 | return true;
57 | }
58 |
59 | ///
60 | public ActionInterpreter(ICommand cmd)
61 | : base(cmd)
62 | {
63 |
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vsCommandEvent/Actions/ActionOperation.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events;
9 | using ECommand = net.r_eg.vsCE.Events.Types.Command;
10 |
11 | namespace net.r_eg.vsCE.Actions
12 | {
13 | ///
14 | /// Action for Operation Mode
15 | ///
16 | public class ActionOperation: ActionAbstract, IAction
17 | {
18 | ///
19 | /// Process for specified event.
20 | ///
21 | /// Configured event.
22 | /// Result of handling.
23 | public override bool process(ISolutionEvent evt)
24 | {
25 | IModeOperation operation = (IModeOperation)evt.Mode;
26 | if(operation.Command == null || operation.Command.Length < 1) {
27 | return true;
28 | }
29 | DTEOperation dteo = new DTEOperation(cmd.Env, cmd.EventType);
30 |
31 | if(!evt.SupportMSBuild && !evt.SupportSBEScripts) {
32 | dteo.exec(operation.Command, operation.AbortOnFirstError);
33 | return true;
34 | }
35 |
36 | // need evaluation for data
37 |
38 | ECommand[] parsed = new ECommand[operation.Command.Length];
39 | for(int i = 0; i < operation.Command.Length; ++i)
40 | {
41 | parsed[i].name = parse(evt, operation.Command[i].name);
42 | parsed[i].args = parse(evt, operation.Command[i].args);
43 | }
44 |
45 | dteo.exec(parsed, operation.AbortOnFirstError);
46 | return true;
47 | }
48 |
49 | ///
50 | public ActionOperation(ICommand cmd)
51 | : base(cmd)
52 | {
53 |
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/vsCommandEvent/Actions/ActionScript.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events;
9 |
10 | namespace net.r_eg.vsCE.Actions
11 | {
12 | ///
13 | /// Action for Script Mode
14 | ///
15 | public class ActionScript: ActionAbstract, IAction
16 | {
17 | ///
18 | /// Process for specified event.
19 | ///
20 | /// Configured event.
21 | /// Result of handling.
22 | public override bool process(ISolutionEvent evt)
23 | {
24 | parse(evt, ((IModeScript)evt.Mode).Command);
25 | return true;
26 | }
27 |
28 | ///
29 | public ActionScript(ICommand cmd)
30 | : base(cmd)
31 | {
32 |
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vsCommandEvent/Actions/IAction.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System.Runtime.InteropServices;
9 | using net.r_eg.vsCE.Events;
10 |
11 | namespace net.r_eg.vsCE.Actions
12 | {
13 | [Guid("3DA65163-3C80-4F75-BDFA-BFA5C1865128")]
14 | public interface IAction
15 | {
16 | ///
17 | /// Process for specified event.
18 | ///
19 | /// Configured event.
20 | /// Result of handling.
21 | bool process(ISolutionEvent evt);
22 |
23 | ///
24 | /// Access to shell for event data.
25 | ///
26 | /// Configured event.
27 | /// Formatted command to shell.
28 | void shell(ISolutionEvent evt, string cmd);
29 |
30 | ///
31 | /// Access to parsers for event data.
32 | ///
33 | /// Configured event.
34 | /// Data to analysing.
35 | /// Parsed data.
36 | string parse(ISolutionEvent evt, string data);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vsCommandEvent/Actions/ICommand.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System.Runtime.InteropServices;
9 | using net.r_eg.EvMSBuild;
10 | using net.r_eg.SobaScript;
11 | using net.r_eg.vsCE.Events;
12 |
13 | namespace net.r_eg.vsCE.Actions
14 | {
15 | [Guid("8E774159-2221-4435-A6C9-A40B78A369FD")]
16 | public interface ICommand
17 | {
18 | ///
19 | /// SBE-Scripts core
20 | ///
21 | ISobaScript SBEScript { get; }
22 |
23 | ///
24 | /// MSBuild core
25 | ///
26 | IEvMSBuild MSBuild { get; }
27 |
28 | ///
29 | /// Used environment
30 | ///
31 | IEnvironment Env { get; }
32 |
33 | ///
34 | /// Specified Event type.
35 | ///
36 | SolutionEventType EventType { get; }
37 |
38 | ///
39 | /// Find and execute action by specified event.
40 | ///
41 | /// Configured event.
42 | /// The type of event.
43 | /// true value if it was handled.
44 | bool exec(ISolutionEvent evt, SolutionEventType type);
45 |
46 | ///
47 | /// Find and execute action with default event type.
48 | ///
49 | /// Configured event.
50 | /// true value if it was handled.
51 | bool exec(ISolutionEvent evt);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/vsCommandEvent/CancelBuildState.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE
9 | {
10 | internal sealed class CancelBuildState
11 | {
12 | ///
13 | /// Actual state for VS API.
14 | ///
15 | public int CanceledInt => Canceled ? 1 : 0;
16 |
17 | ///
18 | /// Actual state.
19 | ///
20 | public bool Canceled { get; private set; }
21 |
22 | public void Cancel() => Canceled = true;
23 |
24 | public void Reset() => Canceled = false;
25 |
26 | public bool UpdateFlagIfCanceled(ref int flag)
27 | {
28 | if(Canceled)
29 | {
30 | Log.Debug($"Canceled operation due to {nameof(CancelBuildState)} -> {flag}");
31 | flag = CanceledInt;
32 | }
33 | return Canceled;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/Component.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Configuration
9 | {
10 | ///
11 | /// Configure existing components
12 | ///
13 | public class Component
14 | {
15 | ///
16 | /// Identification by class name
17 | ///
18 | public string ClassName
19 | {
20 | get;
21 | set;
22 | }
23 |
24 | ///
25 | /// Activation status
26 | ///
27 | public bool Enabled
28 | {
29 | get;
30 | set;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/ContextType.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration
12 | {
13 | [Guid("A55E2432-81B0-407E-B3B2-29958D76B09A")]
14 | public enum ContextType
15 | {
16 | ///
17 | /// Common configuration.
18 | ///
19 | Common,
20 |
21 | ///
22 | /// Configuration of specific solution.
23 | ///
24 | Solution,
25 |
26 | ///
27 | /// Unspecified static configuration.
28 | ///
29 | Static,
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/Header.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Configuration
9 | {
10 | public class Header
11 | {
12 | public string[] _ => new string[]
13 | {
14 | " This file for vsCommandEvent ",
15 | " https://github.com/3F/vsCommandEvent "
16 | };
17 |
18 | public string Compatibility { get; set; } = "1.0";
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/IConfig.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration
12 | {
13 | [Guid("5ED372D0-2585-4B87-95DB-C356B5B266D6")]
14 | public interface IConfig
15 | {
16 | ///
17 | /// When data is updated.
18 | ///
19 | event EventHandler> Updated;
20 |
21 | ///
22 | /// User data at runtime.
23 | ///
24 | T Data { get; }
25 |
26 | ///
27 | /// Link to configuration file.
28 | ///
29 | string Link { get; }
30 |
31 | ///
32 | /// Get status of configuration data.
33 | /// true value if data exists only in RAM, otherwise used existing file.
34 | ///
35 | bool InRAM { get; }
36 |
37 | ///
38 | /// Load settings from file.
39 | ///
40 | /// Path to configuration file.
41 | /// Special version of configuration file.
42 | /// true value if loaded from existing file, otherwise loaded as new.
43 | bool load(string path, string prefix);
44 |
45 | ///
46 | /// Load settings from other object.
47 | ///
48 | /// Object with configuration.
49 | void load(T data);
50 |
51 | ///
52 | /// Use link from other configuration for loading new settings.
53 | ///
54 | /// Link from other configuration.
55 | /// true value if loaded from existing file, otherwise loaded as new.
56 | bool load(string link);
57 |
58 | ///
59 | /// Load settings from file with path by default.
60 | ///
61 | /// true value if loaded from existing file, otherwise loaded as new.
62 | bool load();
63 |
64 | ///
65 | /// Save settings.
66 | ///
67 | void save();
68 |
69 | ///
70 | /// Unload User data.
71 | ///
72 | void unload();
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/Cache.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Configuration.User
9 | {
10 | public class Cache: ICacheHeader
11 | {
12 | ///
13 | /// When has been updated.
14 | /// UTC as a rule.
15 | ///
16 | public long Updated
17 | {
18 | get;
19 | set;
20 | }
21 |
22 | ///
23 | /// Type of hashing.
24 | ///
25 | public HashType Algorithm
26 | {
27 | get;
28 | set;
29 | }
30 |
31 | ///
32 | /// Hash value of data.
33 | ///
34 | public string Hash
35 | {
36 | get;
37 | set;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/Common.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Configuration.User
9 | {
10 | public class Common: ICommon
11 | {
12 | ///
13 | /// Word wrapping for main editor.
14 | ///
15 | public bool WordWrap
16 | {
17 | get { return wordWrap; }
18 | set { wordWrap = value; }
19 | }
20 | private bool wordWrap = true;
21 |
22 | ///
23 | /// Value of zooming for main editor.
24 | ///
25 | public int Zoomed
26 | {
27 | get { return zoomed; }
28 | set { zoomed = value; }
29 | }
30 | private int zoomed = 100;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/Global.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System.Collections.Generic;
9 |
10 | namespace net.r_eg.vsCE.Configuration.User
11 | {
12 | public class Global: IGlobal
13 | {
14 | ///
15 | public bool DebugMode { get; set; }
16 |
17 | ///
18 | /// Flag of ignoring configuration.
19 | ///
20 | public bool IgnoreConfiguration
21 | {
22 | get;
23 | set;
24 | }
25 |
26 | //[JsonProperty(TypeNameHandling = TypeNameHandling.None, ItemTypeNameHandling = TypeNameHandling.All)]
27 | public Dictionary LogIgnoreLevels { get; set; } = new Dictionary();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/HashType.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration.User
12 | {
13 | [Guid("CD46BF40-05AF-40F1-9569-F0A1981D4D93")]
14 | public enum HashType
15 | {
16 | ///
17 | /// ~335 MiB/Second with CPU frequency ~2.194e+09 Hz
18 | ///
19 | MD5,
20 |
21 | ///
22 | /// Tiger tree.
23 | /// ~328 MiB/Second with CPU frequency ~2.194e+09 Hz
24 | ///
25 | TTH,
26 |
27 | ///
28 | /// SHA-1
29 | /// ~192 MiB/Second with CPU frequency ~2.194e+09 Hz
30 | ///
31 | SHA1,
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/ICacheHeader.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration.User
12 | {
13 | [Guid("B305C9E9-F900-4F86-A4B8-BF57A97A9AEA")]
14 | public interface ICacheHeader
15 | {
16 | ///
17 | /// When has been updated.
18 | /// UTC as a rule.
19 | ///
20 | long Updated { get; set; }
21 |
22 | ///
23 | /// Type of hashing.
24 | ///
25 | HashType Algorithm { get; set; }
26 |
27 | ///
28 | /// Hash value of data.
29 | ///
30 | string Hash { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/ICommon.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration.User
12 | {
13 | [Guid("BF646E0B-0E9C-460A-9236-2177E971C1DA")]
14 | public interface ICommon
15 | {
16 | ///
17 | /// Word wrapping for main editor.
18 | ///
19 | bool WordWrap { get; set; }
20 |
21 | ///
22 | /// Value of zooming for main editor.
23 | ///
24 | int Zoomed { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/IData.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Collections.Generic;
10 | using System.Runtime.InteropServices;
11 |
12 | namespace net.r_eg.vsCE.Configuration.User
13 | {
14 | [Guid("86A57222-31EF-4C98-B960-F1478DB1A565")]
15 | public interface IData
16 | {
17 | ///
18 | /// Global settings.
19 | ///
20 | IGlobal Global { get; set; }
21 |
22 | ///
23 | /// Common settings for specific route.
24 | ///
25 | Dictionary Common { get; set; }
26 |
27 | ///
28 | /// Different headers of cache data.
29 | ///
30 | Dictionary Cache { get; set; }
31 |
32 | ///
33 | /// Prepares data to removing from cache.
34 | ///
35 | /// Data that should be soon removed.
36 | void toRemoveFromCache(IUserValue item);
37 |
38 | ///
39 | /// To avoid of planned removing data from cache.
40 | ///
41 | void avoidRemovingFromCache();
42 |
43 | ///
44 | /// Updating of the cache container from unused data etc.
45 | ///
46 | void updateCache();
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/IDataSvc.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration.User
12 | {
13 | [Guid("09660649-B7BC-43D3-8E8F-951308B953D5")]
14 | internal interface IDataSvc
15 | {
16 | ///
17 | /// Update Common property.
18 | ///
19 | /// Update for loading or saving.
20 | void updateCommon(bool isLoad);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/IGlobal.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Collections.Generic;
10 | using System.Runtime.InteropServices;
11 |
12 | namespace net.r_eg.vsCE.Configuration.User
13 | {
14 | [Guid("D9460698-4331-4843-BDAC-F8C7C5F845A2")]
15 | public interface IGlobal
16 | {
17 | ///
18 | /// Debug mode for application.
19 | ///
20 | bool DebugMode { get; set; }
21 |
22 | ///
23 | /// Flag of ignoring configuration.
24 | ///
25 | bool IgnoreConfiguration { get; set; }
26 |
27 | ///
28 | /// List of levels for disabling from logger.
29 | ///
30 | Dictionary LogIgnoreLevels { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/IManager.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration.User
12 | {
13 | ///
14 | /// Specifies basic manager of accessing to remote value.
15 | ///
16 | [Guid("7E740672-7D27-4180-A5F7-0A21A0329D3A")]
17 | public interface IManager
18 | {
19 | ///
20 | /// Unspecified raw value.
21 | ///
22 | object Value { get; }
23 |
24 | ///
25 | /// Trying to get value as ICacheHeader.
26 | ///
27 | ICacheHeader CacheHeader { get; }
28 |
29 | ///
30 | /// To erase current value from common data.
31 | ///
32 | void unset();
33 |
34 | ///
35 | /// Reset data from value.
36 | ///
37 | void reset();
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/IRoute.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events;
11 |
12 | namespace net.r_eg.vsCE.Configuration.User
13 | {
14 | [Guid("D9C520D8-E053-4EE3-AA82-1A2400B4F64E")]
15 | public interface IRoute
16 | {
17 | ///
18 | /// Identifier of Event.
19 | ///
20 | SolutionEventType Event { get; set; }
21 |
22 | ///
23 | /// Identifier of Mode.
24 | ///
25 | ModeType Mode { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/IUserValue.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration.User
12 | {
13 | [Guid("85814141-144E-4C4A-8C1D-B5884D01BBCE")]
14 | public interface IUserValue
15 | {
16 | ///
17 | /// Type of link to external value.
18 | ///
19 | LinkType Type { get; set; }
20 |
21 | ///
22 | /// Guid of external node.
23 | ///
24 | string Guid { get; set; }
25 |
26 | ///
27 | /// Manager of accessing to remote value.
28 | ///
29 | IManager Manager { get; }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/LinkType.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Configuration.User
12 | {
13 | [Guid("469B1F8F-331B-47AF-A6CF-2166594AE9C4")]
14 | public enum LinkType
15 | {
16 | CacheHeader = 0x100,
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/Route.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events;
9 |
10 | namespace net.r_eg.vsCE.Configuration.User
11 | {
12 | public struct Route: IRoute
13 | {
14 | ///
15 | /// Identifier of Event.
16 | ///
17 | public SolutionEventType Event
18 | {
19 | get;
20 | set;
21 | }
22 |
23 | ///
24 | /// Identifier of Mode.
25 | ///
26 | public ModeType Mode
27 | {
28 | get;
29 | set;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vsCommandEvent/Configuration/User/UserValue.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using Newtonsoft.Json;
9 |
10 | namespace net.r_eg.vsCE.Configuration.User
11 | {
12 | public class UserValue: IUserValue
13 | {
14 | ///
15 | /// Type of link to external value.
16 | ///
17 | public LinkType Type
18 | {
19 | get;
20 | set;
21 | }
22 |
23 | ///
24 | /// Guid of external node.
25 | ///
26 | public string Guid
27 | {
28 | get;
29 | set;
30 | }
31 |
32 | ///
33 | /// Manager of accessing to remote value.
34 | ///
35 | [JsonIgnore]
36 | public IManager Manager
37 | {
38 | get
39 | {
40 | if(manager == null) {
41 | manager = new Manager(this);
42 | }
43 | return manager;
44 | }
45 | }
46 | private IManager manager;
47 |
48 |
49 | ///
50 | /// Initialize with new Guid and specific LinkType.
51 | ///
52 | /// Type of link to external value.
53 | public UserValue(LinkType Type)
54 | {
55 | Guid = System.Guid.NewGuid().ToString();
56 | this.Type = Type;
57 | }
58 |
59 | public UserValue()
60 | {
61 |
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/vsCommandEvent/DataArgs.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 |
10 | namespace net.r_eg.vsCE
11 | {
12 | [Serializable]
13 | public class DataArgs: EventArgs
14 | {
15 | ///
16 | /// Provides a T value to use with events.
17 | ///
18 | public T Data
19 | {
20 | get;
21 | set;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vsCommandEvent/DteSlnCfg.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using EnvDTE;
10 | using EnvDTE80;
11 | using net.r_eg.MvsSln.Core;
12 |
13 | namespace net.r_eg.vsCE
14 | {
15 | internal sealed class DteSlnCfg: SolutionConfiguration2
16 | {
17 | public string Name { get; }
18 |
19 | public string PlatformName { get; }
20 |
21 | internal DteSlnCfg(string name, string platform)
22 | {
23 | Name = name;
24 | PlatformName = platform;
25 | }
26 |
27 | internal DteSlnCfg(IConfPlatform def)
28 | : this(def.Configuration, def.Platform)
29 | {
30 |
31 | }
32 |
33 | #region NotSupported
34 |
35 | public DTE DTE => throw new NotSupportedException();
36 | public SolutionConfigurations Collection => throw new NotSupportedException();
37 | public SolutionContexts SolutionContexts => throw new NotSupportedException();
38 | public void Delete() => throw new NotSupportedException();
39 | public void Activate() => throw new NotSupportedException();
40 |
41 | #endregion
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/CommandEvents/Filter.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Events.CommandEvents
9 | {
10 | public class Filter: IFilter
11 | {
12 | public int Id { get; set; }
13 |
14 | public string Guid { get; set; }
15 |
16 | public object CustomIn { get; set; }
17 |
18 | public object CustomOut { get; set; }
19 |
20 | public bool Cancel { get; set; }
21 |
22 | public bool Pre { get; set; } = true;
23 |
24 | public bool Post { get; set; }
25 |
26 | public string Description { get; set; }
27 |
28 | public bool IgnoreCustomIn { get; set; }
29 |
30 | public bool IgnoreCustomOut { get; set; }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/CommandEvents/IFilter.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Events.CommandEvents
9 | {
10 | ///
11 | /// Specifies filters for ICommandEvent
12 | ///
13 | public interface IFilter
14 | {
15 | ///
16 | /// For work with command ID
17 | ///
18 | int Id { get; set; }
19 |
20 | ///
21 | /// Scope by GUID
22 | ///
23 | string Guid { get; set; }
24 |
25 | ///
26 | /// Filter by Custom input parameters
27 | ///
28 | object CustomIn { get; set; }
29 |
30 | ///
31 | /// Filter by Custom output parameters
32 | ///
33 | object CustomOut { get; set; }
34 |
35 | ///
36 | /// Cancel command if it's possible
37 | ///
38 | bool Cancel { get; set; }
39 |
40 | ///
41 | /// Use Before executing command
42 | ///
43 | bool Pre { get; set; }
44 |
45 | ///
46 | /// Use After executed command
47 | ///
48 | bool Post { get; set; }
49 |
50 | ///
51 | /// User note.
52 | ///
53 | string Description { get; set; }
54 |
55 | ///
56 | /// Ignore if true.
57 | ///
58 | bool IgnoreCustomIn { get; set; }
59 |
60 | ///
61 | /// Ignore if true.
62 | ///
63 | bool IgnoreCustomOut { get; set; }
64 | }
65 | }
--------------------------------------------------------------------------------
/vsCommandEvent/Events/Commands/ICommand.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Events.Commands
12 | {
13 | ///
14 | /// Specifies basic fields for command.
15 | ///
16 | [Guid("F80C5586-6157-408A-9029-80FE2FC851B3")]
17 | public interface ICommand
18 | {
19 | ///
20 | /// Main command for handling.
21 | ///
22 | T Command { get; set; }
23 | }
24 |
25 | [Guid("E87D1386-1A8A-40E5-9379-D7790863FC90")]
26 | public interface ICommand: ICommand
27 | {
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/Commands/ICommandArray.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Events.Commands
12 | {
13 | ///
14 | /// Specifies basic fields for command list.
15 | ///
16 | [Guid("2229F68B-0FC7-46E3-953A-AFC53650DA63")]
17 | public interface ICommandArray
18 | {
19 | ///
20 | /// Atomic commands for handling.
21 | ///
22 | T[] Command { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/EventProcess.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.MvsSln.Extensions;
9 |
10 | namespace net.r_eg.vsCE.Events
11 | {
12 | public class EventProcess: IEventProcess
13 | {
14 | ///
15 | public bool Waiting { get; set; } = true;
16 |
17 | ///
18 | public bool Hidden { get; set; } = true;
19 |
20 | ///
21 | public int TimeLimit { get; set; } = 30;
22 |
23 | public static bool operator ==(EventProcess a, EventProcess b) => a.Equals(b);
24 |
25 | public static bool operator !=(EventProcess a, EventProcess b) => !(a == b);
26 |
27 | public override bool Equals(object obj)
28 | {
29 | if(obj is null || !(obj is EventProcess)) {
30 | return false;
31 | }
32 |
33 | var b = (EventProcess)obj;
34 |
35 | return Waiting == b.Waiting
36 | && Hidden == b.Hidden
37 | && TimeLimit == b.TimeLimit;
38 | }
39 |
40 | public override int GetHashCode()
41 | {
42 | return 0.CalculateHashCode
43 | (
44 | Waiting,
45 | Hidden,
46 | TimeLimit
47 | );
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ICommandEvent.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.CommandEvents;
11 |
12 | namespace net.r_eg.vsCE.Events
13 | {
14 | ///
15 | /// Specifies work with CommandEvents from EnvDTE
16 | ///
17 | [Guid("F013837B-B624-44B0-B54F-7F7F988C9795")]
18 | public interface ICommandEvent: ISolutionEvent
19 | {
20 | ///
21 | /// Conditions from EnvDTE commands.
22 | ///
23 | IFilter[] Filters { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IEventProcess.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Events
9 | {
10 | ///
11 | /// Declaring of handling process
12 | ///
13 | public interface IEventProcess
14 | {
15 | ///
16 | /// Waiting completion
17 | ///
18 | bool Waiting { get; set; }
19 |
20 | ///
21 | /// Hiding of processing or not
22 | ///
23 | bool Hidden { get; set; }
24 |
25 | ///
26 | /// How long to wait the execution, in seconds. 0 value - infinitely
27 | ///
28 | int TimeLimit { get; set; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IMode.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Events
12 | {
13 | [Guid("905CFFE9-1C44-449A-939E-B0ABC4E871C5")]
14 | public interface IMode
15 | {
16 | ///
17 | /// Used type from available modes
18 | ///
19 | ModeType Type { get; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IModeCSharp.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Configuration.User;
11 | using net.r_eg.vsCE.Events.Commands;
12 |
13 | namespace net.r_eg.vsCE.Events
14 | {
15 | ///
16 | /// Mode of compilation C# code
17 | ///
18 | [Guid("25EA6943-800A-4D6E-BE14-9E26DB084172")]
19 | public interface IModeCSharp: ICommand
20 | {
21 | ///
22 | /// Additional assembly names that are referenced by the source to compile.
23 | ///
24 | string[] References { get; set; }
25 |
26 | ///
27 | /// Advanced searching of assemblies in 'References' set.
28 | ///
29 | bool SmartReferences { get; set; }
30 |
31 | ///
32 | /// Whether to generate the output in memory.
33 | ///
34 | bool GenerateInMemory { get; set; }
35 |
36 | ///
37 | /// The output path for binary result.
38 | ///
39 | string OutputPath { get; set; }
40 |
41 | ///
42 | /// Command-line arguments to use when invoking the compiler.
43 | ///
44 | string CompilerOptions { get; set; }
45 |
46 | ///
47 | /// Whether to treat warnings as errors.
48 | ///
49 | bool TreatWarningsAsErrors { get; set; }
50 |
51 | ///
52 | /// The warning level at which the compiler aborts compilation.
53 | ///
54 | int WarningLevel { get; set; }
55 |
56 | ///
57 | /// Switching between source code and list of files with source code for ICommand.
58 | ///
59 | bool FilesMode { get; set; }
60 |
61 | ///
62 | /// To cache bytecode if it's possible.
63 | ///
64 | bool CachingBytecode { get; set; }
65 |
66 | ///
67 | /// When the binary data has been updated.
68 | /// UTC
69 | ///
70 | [Obsolete("Deprecated and will be removed soon. Use CacheData instead.")]
71 | long LastTime { get; set; }
72 |
73 | ///
74 | /// Cache data from user settings.
75 | ///
76 | IUserValue CacheData { get; set; }
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IModeEnvCommand.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.Commands;
11 | using net.r_eg.vsCE.Events.Types;
12 |
13 | namespace net.r_eg.vsCE.Events
14 | {
15 | ///
16 | /// Processing with EnvDTE Commands of Visual Studio.
17 | ///
18 | [Guid("B29B9762-4316-4562-B0EB-266EAC8338AE")]
19 | public interface IModeEnvCommand: ICommandArray
20 | {
21 | ///
22 | /// Abort commands on first error
23 | ///
24 | bool AbortOnFirstError { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IModeFile.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.Commands;
11 |
12 | namespace net.r_eg.vsCE.Events
13 | {
14 | ///
15 | /// Processing with files
16 | ///
17 | [Guid("AFDDD7BE-C979-467E-8BA9-F7264B0C20E4")]
18 | public interface IModeFile: ICommand
19 | {
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IModeInterpreter.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.Commands;
11 |
12 | namespace net.r_eg.vsCE.Events
13 | {
14 | ///
15 | /// Processing with streaming tools
16 | ///
17 | [Guid("DEF30B20-9A0B-41FC-97DD-E95BA770FDB0")]
18 | public interface IModeInterpreter: ICommand
19 | {
20 | ///
21 | /// Stream handler
22 | ///
23 | string Handler { get; set; }
24 |
25 | ///
26 | /// Treat newline as
27 | ///
28 | string Newline { get; set; }
29 |
30 | ///
31 | /// Symbol/s for wrapping of commands
32 | ///
33 | string Wrapper { get; set; }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IModeOperation.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.Commands;
11 | using net.r_eg.vsCE.Events.Types;
12 |
13 | namespace net.r_eg.vsCE.Events
14 | {
15 | ///
16 | /// Processing with environment of Visual Studio
17 | ///
18 | [Guid("1349D4E7-907A-4670-A752-7422FF0A0892")]
19 | public interface IModeOperation: ICommandArray
20 | {
21 | ///
22 | /// Abort operations on first error
23 | ///
24 | bool AbortOnFirstError { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IModeScript.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.Commands;
11 |
12 | namespace net.r_eg.vsCE.Events
13 | {
14 | ///
15 | /// Scripts from available engines like MSBuild, etc.
16 | ///
17 | [Guid("4F1765E1-CED5-4AA9-B229-617EE7B0B09D")]
18 | public interface IModeScript: ICommand
19 | {
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/IModeTargets.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.Commands;
11 |
12 | namespace net.r_eg.vsCE.Events
13 | {
14 | ///
15 | /// Processing with MSBuild targets
16 | ///
17 | [Guid("98564100-241E-4AB5-8B87-DB3C2523B71C")]
18 | public interface IModeTargets: ICommand
19 | {
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ISolutionEvent.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Bridge;
11 |
12 | namespace net.r_eg.vsCE.Events
13 | {
14 | ///
15 | /// Main container of the 'Solution Events'
16 | ///
17 | [Guid("552AA0E0-9EFC-4394-B18B-41CF2F549FB3")]
18 | public interface ISolutionEvent
19 | {
20 | ///
21 | /// Status of activation.
22 | ///
23 | bool Enabled { get; set; }
24 |
25 | ///
26 | /// Unique name for identification.
27 | ///
28 | string Name { get; set; }
29 |
30 | ///
31 | /// About event.
32 | ///
33 | string Caption { get; set; }
34 |
35 | ///
36 | /// Support of the MSBuild engine.
37 | ///
38 | bool SupportMSBuild { get; set; }
39 |
40 | ///
41 | /// Support of the SBE-Scripts engine.
42 | ///
43 | bool SupportSBEScripts { get; set; }
44 |
45 | ///
46 | /// The context of action.
47 | ///
48 | BuildType BuildType { get; set; }
49 |
50 | ///
51 | /// User interaction.
52 | /// Waiting until user presses yes/no etc,
53 | ///
54 | bool Confirmation { get; set; }
55 |
56 | ///
57 | /// Used mode.
58 | ///
59 | IMode Mode { get; set; }
60 |
61 | ///
62 | /// Handling process.
63 | ///
64 | IEventProcess Process { get; set; }
65 |
66 | ///
67 | /// Unique identifier at runtime.
68 | ///
69 | Guid Id { get; }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ISolutionEventOWP.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Events.OWP;
11 |
12 | namespace net.r_eg.vsCE.Events
13 | {
14 | ///
15 | /// Support of the OutputWindowPane
16 | ///
17 | [Guid("C27A1E8C-7808-4529-BAC4-E8322D4F11CD")]
18 | public interface ISolutionEventOWP: ISolutionEvent
19 | {
20 | ///
21 | /// List of statements.
22 | ///
23 | IMatching[] Match { get; set; }
24 | }
25 | }
--------------------------------------------------------------------------------
/vsCommandEvent/Events/Mapping/Json/ModeCommand.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.ComponentModel;
10 | using net.r_eg.vsCE.Events.Commands;
11 | using Newtonsoft.Json;
12 |
13 | namespace net.r_eg.vsCE.Events.Mapping.Json
14 | {
15 | ///
16 | /// Adds convenient and compatible way to working with ICommand objects for Json serializers.
17 | ///
18 | public abstract class ModeCommand: ICommand
19 | {
20 | ///
21 | /// Command for handling.
22 | ///
23 | [Browsable(false)]
24 | [JsonIgnore] // "Command" was never released for vsCE. Only for vsSBE but removed after 1.14.0
25 | public string Command
26 | {
27 | get => command;
28 | set
29 | {
30 | if(value != null) {
31 | _command = value.Replace("\r\n", "\n").Split('\n');
32 | }
33 | command = value;
34 | }
35 | }
36 | protected string command = String.Empty;
37 |
38 | ///
39 | /// Readable or friendly 'Command' property as wrapper of original.
40 | ///
41 | [JsonProperty(PropertyName = "Command")]
42 | protected string[] _Command
43 | {
44 | get => _command;
45 | set
46 | {
47 | if(value != null) {
48 | command = String.Join("\n", value);
49 | }
50 | _command = value;
51 | }
52 | }
53 | protected string[] _command;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ModeEnvCommand.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events.Types;
9 | using Newtonsoft.Json;
10 |
11 | namespace net.r_eg.vsCE.Events
12 | {
13 | ///
14 | /// Processing with EnvDTE Commands of Visual Studio.
15 | ///
16 | public class ModeEnvCommand: IMode, IModeEnvCommand
17 | {
18 | ///
19 | /// Type of implementation.
20 | ///
21 | public ModeType Type
22 | {
23 | get { return ModeType.EnvCommand; }
24 | }
25 |
26 | ///
27 | /// Atomic DTE-commands for handling.
28 | ///
29 | [JsonProperty(TypeNameHandling = TypeNameHandling.All)]
30 | public CommandDte[] Command
31 | {
32 | get;
33 | set;
34 | }
35 |
36 | ///
37 | /// Abort operations on the first error
38 | ///
39 | public bool AbortOnFirstError
40 | {
41 | get { return abortOnFirstError; }
42 | set { abortOnFirstError = value; }
43 | }
44 | private bool abortOnFirstError = true;
45 |
46 | ///
47 | public ModeEnvCommand(CommandDte[] command)
48 | {
49 | Command = command;
50 | }
51 |
52 | public ModeEnvCommand()
53 | {
54 |
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ModeFile.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events.Mapping.Json;
9 |
10 | namespace net.r_eg.vsCE.Events
11 | {
12 | ///
13 | /// Processing with files
14 | ///
15 | public class ModeFile: ModeCommand, IMode, IModeFile
16 | {
17 | ///
18 | /// Type of implementation
19 | ///
20 | public ModeType Type
21 | {
22 | get { return ModeType.File; }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ModeInterpreter.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events.Mapping.Json;
9 |
10 | namespace net.r_eg.vsCE.Events
11 | {
12 | ///
13 | /// Processing with streaming tools
14 | ///
15 | public class ModeInterpreter: ModeCommand, IMode, IModeInterpreter
16 | {
17 | ///
18 | /// Type of implementation
19 | ///
20 | public ModeType Type
21 | {
22 | get { return ModeType.Interpreter; }
23 | }
24 |
25 | ///
26 | /// Stream handler
27 | ///
28 | public string Handler
29 | {
30 | get { return handler; }
31 | set { handler = value; }
32 | }
33 | private string handler = string.Empty;
34 |
35 | ///
36 | /// Treat newline as
37 | ///
38 | public string Newline
39 | {
40 | get { return newline; }
41 | set { newline = value; }
42 | }
43 | private string newline = string.Empty;
44 |
45 | ///
46 | /// Symbol/s for wrapping of commands
47 | ///
48 | public string Wrapper
49 | {
50 | get { return wrapper; }
51 | set { wrapper = value; }
52 | }
53 | private string wrapper = string.Empty;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ModeOperation.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using Newtonsoft.Json;
9 |
10 | namespace net.r_eg.vsCE.Events
11 | {
12 | ///
13 | /// Processing with Environment of Visual Studio.
14 | ///
15 | public class ModeOperation: IMode, IModeOperation
16 | {
17 | ///
18 | /// Type of implementation.
19 | ///
20 | public ModeType Type
21 | {
22 | get { return ModeType.Operation; }
23 | }
24 |
25 | ///
26 | /// Atomic commands for handling.
27 | ///
28 | [JsonProperty(TypeNameHandling = TypeNameHandling.All)]
29 | public Types.Command[] Command
30 | {
31 | get;
32 | set;
33 | }
34 |
35 | ///
36 | /// Abort operations on first error.
37 | ///
38 | public bool AbortOnFirstError
39 | {
40 | get { return abortOnFirstError; }
41 | set { abortOnFirstError = value; }
42 | }
43 | private bool abortOnFirstError = false;
44 |
45 | ///
46 | public ModeOperation(Types.Command[] command)
47 | {
48 | Command = command;
49 | }
50 |
51 | public ModeOperation()
52 | {
53 |
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ModeScript.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events.Mapping.Json;
9 |
10 | namespace net.r_eg.vsCE.Events
11 | {
12 | ///
13 | /// Scripts from available engines like MSBuild, etc.
14 | ///
15 | public class ModeScript: ModeCommand, IMode, IModeScript
16 | {
17 | ///
18 | /// Type of implementation
19 | ///
20 | public ModeType Type
21 | {
22 | get { return ModeType.Script; }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ModeTargets.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using net.r_eg.vsCE.Events.Mapping.Json;
9 |
10 | namespace net.r_eg.vsCE.Events
11 | {
12 | ///
13 | /// Processing with MSBuild targets
14 | ///
15 | public class ModeTargets: ModeCommand, IMode, IModeTargets
16 | {
17 | ///
18 | /// Type of implementation
19 | ///
20 | public ModeType Type
21 | {
22 | get { return ModeType.Targets; }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/ModeType.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Events
12 | {
13 | ///
14 | /// Type of available processing modes
15 | ///
16 | [Guid("F7E15CE6-F7B1-44A6-AB55-62F1C8BEDE26")]
17 | public enum ModeType
18 | {
19 | ///
20 | /// Unspecified mode.
21 | ///
22 | Common = 0x10,
23 |
24 | ///
25 | /// Alias to Common.
26 | ///
27 | General = Common,
28 |
29 | ///
30 | /// External handling with files.
31 | ///
32 | File = 0x100,
33 |
34 | ///
35 | /// Processing with external interpreter.
36 | /// generally, it's a stream processor etc.
37 | ///
38 | Interpreter = 0x101,
39 |
40 | ///
41 | /// DTE-commands - operations with EnvDTE.
42 | ///
43 | Operation = 0x102,
44 |
45 | ///
46 | /// Script processing.
47 | /// generally, it's internal handling with MSBuild / SBE-Scripts cores, and similar
48 | ///
49 | Script = 0x103,
50 |
51 | ///
52 | /// MSBuild targets
53 | ///
54 | Targets = 0x104,
55 |
56 | ///
57 | /// C# code
58 | ///
59 | CSharp = 0x105,
60 |
61 | ///
62 | /// Environment Commands
63 | ///
64 | EnvCommand = 0x106,
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/OWP/ComparisonType.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System.Runtime.InteropServices;
9 |
10 | namespace net.r_eg.vsCE.Events.OWP
11 | {
12 | ///
13 | /// Available methods of comparison.
14 | ///
15 | [Guid("2E81983C-2370-46F4-B951-8B1E30B887EB")]
16 | public enum ComparisonType
17 | {
18 | ///
19 | /// Equality with case sensitive.
20 | ///
21 | Default,
22 |
23 | ///
24 | /// Using .NET Framework Regular Expressions.
25 | ///
26 | Regexp,
27 |
28 | ///
29 | /// Using common wildcards.
30 | ///
31 | Wildcards
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/OWP/Condition.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Events.OWP
9 | {
10 | public class Condition: IMatching
11 | {
12 | ///
13 | /// Phrase for comparison.
14 | ///
15 | public string Phrase
16 | {
17 | get;
18 | set;
19 | }
20 |
21 | ///
22 | /// How to compare.
23 | ///
24 | public ComparisonType Type
25 | {
26 | get;
27 | set;
28 | }
29 |
30 | ///
31 | /// The Name of pane for Condition.
32 | ///
33 | public string PaneName
34 | {
35 | get;
36 | set;
37 | }
38 |
39 | ///
40 | /// The Guid of pane for Condition.
41 | ///
42 | public string PaneGuid
43 | {
44 | get;
45 | set;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/OWP/IMatching.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE.Events.OWP
12 | {
13 | [Guid("AF518505-C235-47CA-BA65-72EF8110E3B1")]
14 | public interface IMatching
15 | {
16 | ///
17 | /// Phrase for comparison.
18 | ///
19 | string Phrase { get; set; }
20 |
21 | ///
22 | /// How to compare.
23 | ///
24 | ComparisonType Type { get; set; }
25 |
26 | ///
27 | /// The Name of pane for Condition.
28 | ///
29 | string PaneName { get; set; }
30 |
31 | ///
32 | /// The Guid of pane for Condition.
33 | ///
34 | string PaneGuid { get; set; }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/Types/Command.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Events.Types
9 | {
10 | ///
11 | /// Simple commands with format like this:
12 | /// https://msdn.microsoft.com/en-us/library/envdte._dte.executecommand.aspx
13 | ///
14 | public struct Command
15 | {
16 | ///
17 | /// Name of command.
18 | ///
19 | public string name;
20 |
21 | ///
22 | /// Arguments of command.
23 | ///
24 | public string args;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/vsCommandEvent/Events/Types/CommandDte.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | namespace net.r_eg.vsCE.Events.Types
9 | {
10 | ///
11 | /// Struct of EnvDTE Command.
12 | ///
13 | public struct CommandDte
14 | {
15 | ///
16 | /// Scope by GUID.
17 | ///
18 | public string Guid
19 | {
20 | get;
21 | set;
22 | }
23 |
24 | ///
25 | /// For work with command ID.
26 | ///
27 | public int Id
28 | {
29 | get;
30 | set;
31 | }
32 |
33 | ///
34 | /// Input parameters.
35 | ///
36 | public object CustomIn
37 | {
38 | get;
39 | set;
40 | }
41 |
42 | ///
43 | /// Output parameters.
44 | ///
45 | public object CustomOut
46 | {
47 | get;
48 | set;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/vsCommandEvent/Exceptions/CompilerException.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.CodeDom.Compiler;
10 |
11 | namespace net.r_eg.vsCE.Exceptions
12 | {
13 | [Serializable]
14 | public class CompilerException: UnspecSBEException
15 | {
16 | public CompilerException(CompilerError error)
17 | : base(error.ToString(), error)
18 | {
19 |
20 | }
21 |
22 | public CompilerException(string message)
23 | : base(message)
24 | {
25 |
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vsCommandEvent/Exceptions/UnspecSBEException.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.Serialization;
10 | using System.Security.Permissions;
11 |
12 | namespace net.r_eg.vsCE.Exceptions
13 | {
14 | [Serializable]
15 | public class UnspecSBEException: Exception
16 | {
17 | public readonly object value;
18 |
19 | [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
20 | public override void GetObjectData(SerializationInfo info, StreamingContext context)
21 | {
22 | base.GetObjectData(info, context);
23 | info.AddValue(nameof(value), value);
24 | }
25 |
26 | public UnspecSBEException()
27 | {
28 |
29 | }
30 |
31 | public UnspecSBEException(string message)
32 | : base(message)
33 | {
34 |
35 | }
36 |
37 | public UnspecSBEException(string message, object value)
38 | : base(message)
39 | {
40 | this.value = value;
41 | }
42 |
43 | public UnspecSBEException(string message, Exception innerException)
44 | : base(message, innerException)
45 | {
46 |
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/vsCommandEvent/Extensions/IVsHierarchyExtension.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using Microsoft.VisualStudio;
10 | using Microsoft.VisualStudio.Shell;
11 | using Microsoft.VisualStudio.Shell.Interop;
12 | using DProject = EnvDTE.Project;
13 |
14 | namespace net.r_eg.vsCE.Extensions
15 | {
16 | public static class IVsHierarchyExtension
17 | {
18 | public static Guid GetProjectGuid(this IVsHierarchy pHierProj)
19 | {
20 | if(pHierProj == null) {
21 | return Guid.Empty;
22 | }
23 |
24 | #if SDK15_OR_HIGH
25 | ThreadHelper.ThrowIfNotOnUIThread();
26 | #endif
27 |
28 | pHierProj.GetGuidProperty(
29 | (uint)VSConstants.VSITEMID.Root,
30 | (int)__VSHPROPID.VSHPROPID_ProjectIDGuid,
31 | out Guid id
32 | );
33 |
34 | return id;
35 | }
36 |
37 | public static DProject GetEnvDteProject(this IVsHierarchy pHierProj)
38 | {
39 | if(pHierProj == null) {
40 | return null;
41 | }
42 |
43 | #if SDK15_OR_HIGH
44 | ThreadHelper.ThrowIfNotOnUIThread();
45 | #endif
46 |
47 | pHierProj.GetProperty(
48 | (uint)VSConstants.VSITEMID.Root,
49 | (int)__VSHPROPID.VSHPROPID_ExtObject,
50 | out object dteProject
51 | );
52 |
53 | return (DProject)dteProject;
54 | }
55 |
56 | public static IVsHierarchy GetIVsHierarchy(this DProject dProject)
57 | {
58 | if(dProject == null) {
59 | return null;
60 | }
61 |
62 | #if SDK15_OR_HIGH
63 | ThreadHelper.ThrowIfNotOnUIThread();
64 | #endif
65 |
66 | IVsSolution sln = (IVsSolution)Package.GetGlobalService(typeof(SVsSolution));
67 | sln.GetProjectOfUniqueName(dProject.FullName, out IVsHierarchy hr);
68 |
69 | return hr;
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/vsCommandEvent/GuidList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.VisualStudio;
3 |
4 | namespace net.r_eg.vsCE
5 | {
6 | public static class GuidList
7 | {
8 | ///
9 | /// General package identifier
10 | ///
11 | public const string PACKAGE_STRING = "DA5CEB32-1E09-44A5-A6AA-71D3149A53B7";
12 |
13 | ///
14 | /// Identifier for used logger
15 | ///
16 | public const string PACKAGE_LOGGER = "0440C4E8-5557-4E9C-9DB2-778851CA08F5";
17 |
18 | ///
19 | /// The Command of main UI.
20 | ///
21 | public const string CMD_MAIN_STRING = "C587CC93-95F6-4E7D-B6D2-A5B5A854A9FC";
22 |
23 | ///
24 | /// Identifier for StatusPanel
25 | ///
26 | public const string PANEL_STRING = "56FED82A-2850-445B-AA29-49F19C6B9CC5";
27 |
28 | ///
29 | /// Main item for OutputWindow
30 | ///
31 | public const string OWP_SBE_STRING = "2CCEC80E-9253-4573-8031-D17DBCEABC62";
32 |
33 | ///
34 | /// BuildOutput pane
35 | ///
36 | public const string OWP_BUILD_STRING = "1BD8A850-02D1-11d1-BEE7-00A0C913D1F8";
37 |
38 | ///
39 | /// Guid of main UI command
40 | ///
41 | public static readonly Guid CMD_MAIN = new Guid(CMD_MAIN_STRING);
42 |
43 | ///
44 | /// Guid of main item for OutputWindow
45 | ///
46 | public static readonly Guid OWP_SBE = new Guid(OWP_SBE_STRING);
47 |
48 |
49 |
50 | ///
51 | /// Guid alias to StandardCommandSet97
52 | ///
53 | public static readonly Guid VSStd97CmdID = VSConstants.CMDSETID.StandardCommandSet97_guid;
54 |
55 | ///
56 | /// Guid alias to StandardCommandSet2K
57 | ///
58 | public static readonly Guid VSStd2KCmdID = VSConstants.CMDSETID.StandardCommandSet2K_guid;
59 |
60 | }
61 | }
--------------------------------------------------------------------------------
/vsCommandEvent/IAppSettings.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 | using net.r_eg.vsCE.Configuration;
11 | using IUserData = net.r_eg.vsCE.Configuration.User.IData;
12 |
13 | namespace net.r_eg.vsCE
14 | {
15 | [Guid("06CBD536-36E8-4EB7-B51B-9767A315BE58")]
16 | internal interface IAppSettings
17 | {
18 | ///
19 | /// When DebugMode is updated.
20 | /// Useful for clients, for example with IEntryPointClient.
21 | ///
22 | event EventHandler> DebugModeUpdated;
23 |
24 | ///
25 | /// When IAppSettings.WorkPath was updated.
26 | ///
27 | event EventHandler> WorkPathUpdated;
28 |
29 | ///
30 | /// Debug mode for application.
31 | ///
32 | bool DebugMode { get; set; }
33 |
34 | ///
35 | /// Ignores all actions if value set as true.
36 | /// To support of cycle control, e.g.: PRE -> POST [recursive DTE: PRE -> POST] -> etc.
37 | ///
38 | bool IgnoreActions { get; set; }
39 |
40 | ///
41 | /// Checks availability data for used configurations.
42 | ///
43 | bool IsCfgExists { get; }
44 |
45 | ///
46 | /// Common path of library.
47 | ///
48 | string CommonPath { get; }
49 |
50 | ///
51 | /// Full path to library.
52 | ///
53 | string LibPath { get; }
54 |
55 | ///
56 | /// Working path for library.
57 | ///
58 | string WorkPath { get; }
59 |
60 | ///
61 | /// Manager of configurations.
62 | ///
63 | IManager ConfigManager { get; }
64 |
65 | ///
66 | /// Main configuration data.
67 | ///
68 | ISolutionEvents Config { get; }
69 |
70 | ///
71 | /// User configuration data.
72 | ///
73 | IUserData UserConfig { get; }
74 |
75 | ///
76 | /// OWP item name by default.
77 | ///
78 | string DefaultOWPItem { get; }
79 |
80 | ///
81 | /// Updates working path for library.
82 | ///
83 | /// New path.
84 | void setWorkPath(string path);
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/vsCommandEvent/IEnvironmentExt.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using Microsoft.VisualStudio.Shell.Interop;
9 |
10 | namespace net.r_eg.vsCE
11 | {
12 | public interface IEnvironmentExt
13 | {
14 | ///
15 | /// Gets project name from IVsHierarchy.
16 | ///
17 | ///
18 | /// Load in global collection with __VSHPROPID.VSHPROPID_ExtObject if true.
19 | ///
20 | string getProjectNameFrom(IVsHierarchy pHierProj, bool force);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vsCommandEvent/IEvLevel.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using net.r_eg.vsCE.Configuration;
10 |
11 | namespace net.r_eg.vsCE
12 | {
13 | public interface IEvLevel
14 | {
15 | ///
16 | /// When the solution has been opened or created
17 | ///
18 | event EventHandler OpenedSolution;
19 |
20 | ///
21 | /// When the solution has been closed
22 | ///
23 | event EventHandler ClosedSolution;
24 |
25 | ///
26 | /// Used Environment
27 | ///
28 | IEnvironment Environment { get; }
29 |
30 | ///
31 | /// Binder of action
32 | ///
33 | Actions.Binder Action { get; }
34 |
35 | ///
36 | /// Manager of configurations.
37 | ///
38 | IManager ConfigManager { get; }
39 |
40 | ///
41 | /// Solution has been opened.
42 | ///
43 | /// Reserved for future use.
44 | /// true if the solution is being created. false if the solution was created previously or is being loaded.
45 | /// If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.
46 | int solutionOpened(object pUnkReserved, int fNewSolution);
47 |
48 | ///
49 | /// Solution has been closed.
50 | ///
51 | /// Reserved for future use.
52 | /// If the method succeeds, it returns VSConstants.S_OK. If it fails, it returns an error code.
53 | int solutionClosed(object pUnkReserved);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/vsCommandEvent/IOW.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Runtime.InteropServices;
10 |
11 | namespace net.r_eg.vsCE
12 | {
13 | [Guid("7C0E9E6B-7BDC-4D0F-97D2-6F3F30FBA368")]
14 | public interface IOW
15 | {
16 | ///
17 | /// Access to OutputWindow.
18 | ///
19 | EnvDTE.OutputWindow OutputWindow { get; }
20 |
21 | ///
22 | /// Getting item of the output window by name.
23 | ///
24 | /// Name of item
25 | /// Flag of creating. It means ~create new pane if this item does not exist etc.
26 | ///
27 | EnvDTE.OutputWindowPane getByName(string name, bool createIfNotExist);
28 |
29 | ///
30 | /// Removes pane by name of item.
31 | ///
32 | ///
33 | void deleteByName(string name);
34 |
35 | ///
36 | /// Removes pane with selected GUID.
37 | ///
38 | ///
39 | void deleteByGuid(Guid guid);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vsCommandEvent/IPkg.cs:
--------------------------------------------------------------------------------
1 | /*!
2 | * Copyright (c) 2015 Denis Kuzmin github/3F
3 | * Copyright (c) vsCommandEvent contributors https://github.com/3F/vsCommandEvent/graphs/contributors
4 | * Licensed under the GNU LGPLv3.
5 | * See accompanying LICENSE file or visit https://github.com/3F/vsCommandEvent
6 | */
7 |
8 | using System;
9 | using System.Threading;
10 | using Microsoft.VisualStudio.Shell;
11 |
12 | #if SDK15_OR_HIGH
13 | using System.Threading.Tasks;
14 | #endif
15 |
16 | namespace net.r_eg.vsCE
17 | {
18 | internal interface IPkg
19 | {
20 | CancellationToken CancellationToken { get; }
21 |
22 | #if SDK15_OR_HIGH
23 |
24 | ///
25 | /// Finds or creates tool window.
26 | ///
27 | /// tool window type
28 | /// try to create tool when true
29 | /// tool window id
30 | ///
31 | Task getToolWindowAsync(Type type, bool create = true, int id = 0);
32 |
33 | /// service type.
34 | ///
35 | Task