Skip to content

Commit 4aa223e

Browse files
committed
Merge branch 'next' into ExtractMethod2023
2 parents 2861a0c + db232a4 commit 4aa223e

File tree

65 files changed

+1361
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1361
-34
lines changed
File renamed without changes.

Rubberduck.Deployment.Build/OleWoo/olewoo.dll.config renamed to Rubberduck.Deployment.Build/OleWoo/x32/olewoo.dll.config

File renamed without changes.

Rubberduck.Deployment.Build/OleWoo/olewoo_interop.dll renamed to Rubberduck.Deployment.Build/OleWoo/x32/olewoo_interop.dll

File renamed without changes.
47 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
543 KB
Binary file not shown.

Rubberduck.Deployment.Build/Rubberduck.Deployment.Build.csproj

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88
<AssemblyName>Rubberduck.Deployment.Build</AssemblyName>
99
</PropertyGroup>
1010
<Import Project="..\RubberduckBaseMetaProject.csproj" />
11+
<UsingTask TaskName="GetMSBuildBitness" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
12+
<ParameterGroup>
13+
<Bitness ParameterType="System.String" Output="true" />
14+
</ParameterGroup>
15+
<Task>
16+
<Using Namespace="System" />
17+
<Using Namespace="System.Runtime.InteropServices" />
18+
<Code Type="Fragment" Language="cs">
19+
<![CDATA[
20+
IntPtr ptr = IntPtr.Zero;
21+
22+
if(Marshal.SizeOf(ptr) == 8)
23+
Bitness = "x64";
24+
else if(Marshal.SizeOf(ptr) == 4)
25+
Bitness = "x32";
26+
else
27+
Bitness = "Unknown";
28+
]]>
29+
</Code>
30+
</Task>
31+
</UsingTask>
1132
<ItemGroup>
1233
<Reference Include="Microsoft.Build.Framework" />
1334
<Reference Include="Microsoft.Build.Tasks.v4.0" />
@@ -17,11 +38,27 @@
1738
<Reference Include="Microsoft.VisualStudio.Setup.Configuration.Interop">
1839
<HintPath>VisualStudioSetup\Microsoft.VisualStudio.Setup.Configuration.Interop.dll</HintPath>
1940
</Reference>
20-
<Reference Include="olewoo">
21-
<HintPath>OleWoo\olewoo.dll</HintPath>
22-
</Reference>
23-
<Reference Include="olewoo_interop">
24-
<HintPath>OleWoo\olewoo_interop.dll</HintPath>
25-
</Reference>
41+
</ItemGroup>
42+
<Target Name="BeforeBuild">
43+
<GetMSBuildBitness>
44+
<Output PropertyName="MSBuildBitness" TaskParameter="Bitness" />
45+
</GetMSBuildBitness>
46+
<Message Text="Resolved MSBuild Bitness: $(MSBuildBitness)" Importance="high" />
47+
<ItemGroup>
48+
<Reference Remove="olewoo" />
49+
<Reference Remove="olewoo_interop" />
50+
</ItemGroup>
51+
<ItemGroup Condition="'x64'=='$(MSBuildBitness)'">
52+
<Reference Include="OleWoo\x64\olewoo.dll" />
53+
<Reference Include="OleWoo\x64\olewoo_interop.dll" />
54+
</ItemGroup>
55+
<ItemGroup Condition="'x32'=='$(MSBuildBitness)'">
56+
<Reference Include="OleWoo\x32\olewoo.dll" />
57+
<Reference Include="OleWoo\x32\olewoo_interop.dll" />
58+
</ItemGroup>
59+
</Target>
60+
<ItemGroup>
61+
<Folder Include="OleWoo\x64\" />
62+
<Folder Include="OleWoo\x32\" />
2663
</ItemGroup>
2764
</Project>

Rubberduck.Deployment/Rubberduck.Deployment.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<CreateProperty Value="$(ProjectDir)$(OutputPath)$(TargetFileName)">
5858
<Output TaskParameter="Value" PropertyName="TargetAssembly" />
5959
</CreateProperty>
60-
<RubberduckPostBuildTask Config="$(ConfigurationName)" NetToolsDir="$(SdkPath)bin\NETFX 4.6.1 Tools\" WixToolsDir="$(ProjectDir)WixToolset\" SourceDir="$(TargetDir)" TargetDir="$(TargetDir)" ProjectDir="$(ProjectDir)" IncludeDir="$(ProjectDir)InnoSetup\Includes\" FilesToExtract="Rubberduck.dll" />
60+
<RubberduckPostBuildTask Config="$(ConfigurationName)" NetToolsDir="$(SdkPath)bin\NETFX 4.6.2 Tools\" WixToolsDir="$(ProjectDir)WixToolset\" SourceDir="$(TargetDir)" TargetDir="$(TargetDir)" ProjectDir="$(ProjectDir)" IncludeDir="$(ProjectDir)InnoSetup\Includes\" FilesToExtract="Rubberduck.dll" />
6161
<Message Text="Ran Rubberduck postbuild task" Importance="normal" />
6262
</Target>
6363
</Project>

Rubberduck.Main/ComClientLibrary/Abstract/UnitTesting/IFakesProvider.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,10 @@ public interface IFakesProvider
135135
[DispId(31)]
136136
[Description("Configures VBA.FileSystem.FileCopy calls.")]
137137
IStub FileCopy { get; }
138+
139+
140+
[DispId(255)]
141+
[Description("Gets an interface exposing the parameter names for all parameterized fakes.")]
142+
IParams Params { get; }
138143
}
139144
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
using System.ComponentModel;
2+
using System.Runtime.InteropServices;
3+
using Rubberduck.Resources.Registration;
4+
5+
// ReSharper disable InconsistentNaming
6+
// The parameters on RD's public interfaces are following VBA conventions not C# conventions to stop the
7+
// obnoxious "Can I haz all identifiers with the same casing" behavior of the VBE.
8+
9+
namespace Rubberduck.UnitTesting
10+
{
11+
[
12+
ComVisible(true),
13+
Guid(RubberduckGuid.IParamsGuid),
14+
InterfaceType(ComInterfaceType.InterfaceIsDual),
15+
EditorBrowsable(EditorBrowsableState.Always)
16+
]
17+
public interface IParams
18+
{
19+
[DispId(1)]
20+
[Description("Gets an interface exposing the parameter names for the 'VBA.Interaction.MsgBox' function.")]
21+
IMsgBoxParams MsgBox { get; }
22+
23+
[DispId(2)]
24+
[Description("Gets an interface exposing the parameter names for the 'VBA.Interaction.InputBox' function.")]
25+
IInputBoxParams InputBox { get; }
26+
27+
[DispId(3)]
28+
[Description("Gets an interface exposing the parameter names for the 'VBA.Interaction.Environ' function.")]
29+
IEnvironParams Environ { get; }
30+
31+
[DispId(4)]
32+
[Description("Gets an interface exposing the parameter names for the 'VBA.Interaction.Shell' function.")]
33+
IShellParams Shell { get; }
34+
35+
[DispId(5)]
36+
[Description("Gets an interface exposing the parameter names for the 'VBA.Interaction.SendKeys' function.")]
37+
ISendKeysParams SendKeys { get; }
38+
39+
[DispId(6)]
40+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.Kill' function.")]
41+
IKillParams Kill { get; }
42+
43+
[DispId(7)]
44+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.FileCopy' statement.")]
45+
IFileCopyParams FileCopy { get; }
46+
47+
[DispId(8)]
48+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.FreeFile' function.")]
49+
IFreeFileParams FreeFile { get; }
50+
51+
[DispId(9)]
52+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.GetAttr' function.")]
53+
IGetAttrParams GetAttr { get; }
54+
55+
[DispId(10)]
56+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.SetAttr' statement.")]
57+
ISetAttrParams SetAttr { get; }
58+
59+
[DispId(11)]
60+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.FileLen' function.")]
61+
IFileLenParams FileLen { get; }
62+
63+
[DispId(12)]
64+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.FileDateTime' function.")]
65+
IFileDateTimeParams FileDateTime { get; }
66+
67+
[DispId(13)]
68+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.Dir' function.")]
69+
IDirParams Dir { get; }
70+
71+
[DispId(14)]
72+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.CurDir' function.")]
73+
ICurDirParams CurDir { get; }
74+
75+
[DispId(15)]
76+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.ChDir' statement.")]
77+
IChDirParams ChDir { get; }
78+
79+
[DispId(16)]
80+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.ChDrive' statement.")]
81+
IChDriveParams ChDrive { get; }
82+
83+
[DispId(17)]
84+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.MkDir' statement.")]
85+
IMkDirParams MkDir { get; }
86+
87+
[DispId(18)]
88+
[Description("Gets an interface exposing the parameter names for the 'VBA.FileSystem.RmDir' statement.")]
89+
IRmDirParams RmDir { get; }
90+
91+
[DispId(19)]
92+
[Description("Gets an interface exposing the parameter names for the 'VBA.Interaction.SaveSetting' statement.")]
93+
ISaveSettingParams SaveSetting { get; }
94+
95+
[DispId(20)]
96+
[Description("Gets an interface exposing the parameter names for the 'VBA.Interaction.DeleteSetting' statement.")]
97+
IDeleteSettingParams DeleteSetting { get; }
98+
99+
[DispId(21)]
100+
[Description("Gets an interface exposing the parameter names for the 'VBA.Math.Randomize' statement.")]
101+
IRandomizeParams Randomize { get; }
102+
103+
[DispId(22)]
104+
[Description("Gets an interface exposing the parameter names for the 'VBA.Math.Rnd' function.")]
105+
IRndParams Rnd { get; }
106+
}
107+
}

0 commit comments

Comments
 (0)