Skip to content

Commit 7a54ee9

Browse files
authored
Merge pull request #24 from heaths/develop
Merge 'develop' to create new release
2 parents 0004190 + cc8d04e commit 7a54ee9

File tree

143 files changed

+7680
-718
lines changed

Some content is hidden

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

143 files changed

+7680
-718
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@ The Windows Installer PowerShell module is licensed under the [MIT License](LICE
4343

4444
## Status
4545

46-
[![Build status](https://ci.appveyor.com/api/projects/status/251twb4wvywq0vei/branch/master?svg=true)](https://ci.appveyor.com/project/heaths/psmsi/branch/master)
46+
[Project build status](https://ci.appveyor.com/project/heaths/psmsi) for release and development branches.
47+
48+
Branch | Status
49+
--- | ---
50+
**master** | [![Build status](https://ci.appveyor.com/api/projects/status/251twb4wvywq0vei/branch/master?svg=true)](https://ci.appveyor.com/project/heaths/psmsi/branch/master)
51+
**develop** | [![Build status](https://ci.appveyor.com/api/projects/status/251twb4wvywq0vei/branch/develop?svg=true)](https://ci.appveyor.com/project/heaths/psmsi/branch/develop)

appveyor.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ pull_requests:
33
do_not_increment_build_number: true
44
skip_tags: true
55

6+
notifications:
7+
- provider: GitHubPullRequest
8+
on_build_success: true
9+
on_build_failure: true
10+
611
branches:
712
only:
813
- master
14+
- develop
915

1016
cache:
1117
- packages -> **\packages.config
@@ -34,7 +40,6 @@ deploy:
3440
auth_token:
3541
secure: 5K94QY8dHKlbjvlBpQaXwAkmDf+LQE3g5WlU9snnNMjDjf0UT4xDoOBCLWcmwZOm
3642
artifact: installer, package
37-
prerelease: true
3843
on:
3944
branch: master
4045

@@ -44,6 +49,13 @@ deploy:
4449
secure: 4STrzCp6wDsDBj/wCtmImMVL7wUI8DCGjdMBXGqQf9JZJ8LjmW5YSY8wtcHAv0XW
4550
artifact: package
4651
skip_symbols: true
47-
prerelease: true
52+
on:
53+
branch: master
54+
55+
- provider: NuGet
56+
server: https://nuget.smbsrc.net/
57+
api_key:
58+
secure: WPxjuSouwbCdM6I771BfIbOk8gA883+l9RKUCfFknaUT1vYPmTpT2ABF9r+J0JgR
59+
artifact: /.*\.symbols\.nupkg/
4860
on:
4961
branch: master

inc/Common.csproj.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
<DelaySign>false</DelaySign>
2323
<AssemblyOriginatorKeyFile>$(IncludeDir)KeyFile.snk</AssemblyOriginatorKeyFile>
2424
</PropertyGroup>
25+
<PropertyGroup>
26+
<CodeAnalysisRuleSet>..\..\inc\Common.ruleset</CodeAnalysisRuleSet>
27+
</PropertyGroup>
2528
<ItemGroup>
2629
<Compile Include="$(IncludeDir)BrandingInfo.cs">
2730
<Link>Properties\BrandingInfo.cs</Link>

inc/Common.ruleset

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RuleSet Name="Solution Rules" Description=" " ToolsVersion="14.0">
3+
<Include Path="minimumrecommendedrules.ruleset" Action="Default" />
4+
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp.Features" RuleNamespace="Microsoft.CodeAnalysis.CSharp.Features">
5+
<Rule Id="IDE0002" Action="None" />
6+
<Rule Id="IDE0003" Action="None" />
7+
</Rules>
8+
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
9+
<Rule Id="SA1009" Action="None" />
10+
<Rule Id="SA1100" Action="None" />
11+
<Rule Id="SA1111" Action="None" />
12+
<Rule Id="SA1124" Action="None" />
13+
<Rule Id="SA1131" Action="None" />
14+
<Rule Id="SA1201" Action="None" />
15+
<Rule Id="SA1202" Action="None" />
16+
<Rule Id="SA1310" Action="None" />
17+
<Rule Id="SA1401" Action="None" />
18+
<Rule Id="SA1515" Action="None" />
19+
<Rule Id="SA1516" Action="None" />
20+
<Rule Id="SA1652" Action="None" />
21+
</Rules>
22+
</RuleSet>

src/PowerShell/ActionText.cs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
using System;
1+
// The MIT License (MIT)
2+
//
3+
// Copyright (c) Microsoft Corporation
4+
//
5+
// Permission is hereby granted, free of charge, to any person obtaining a copy
6+
// of this software and associated documentation files (the "Software"), to deal
7+
// in the Software without restriction, including without limitation the rights
8+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
// copies of the Software, and to permit persons to whom the Software is
10+
// furnished to do so, subject to the following conditions:
11+
//
12+
// The above copyright notice and this permission notice shall be included in all
13+
// copies or substantial portions of the Software.
14+
//
15+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
// SOFTWARE.
22+
23+
using System;
224
using System.Globalization;
325
using System.Resources;
426

src/PowerShell/AttributeColumn.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ private enum UndefinedType
3939
}
4040

4141
/// <summary>
42-
/// Creates a new instance of the <see cref="AttributeColumn"/> class.
42+
/// Initializes a new instance of the <see cref="AttributeColumn"/> class.
4343
/// </summary>
4444
/// <param name="type">The type of the enumeration.</param>
4545
/// <param name="value">The value of the enumeration.</param>
@@ -173,10 +173,10 @@ internal bool HasValue(string name)
173173
// A 32-bit integer is the largest integer supported by Windows Installer.
174174

175175
/// <summary>
176-
/// Converts an <see cref="AttributeColumn"/> to an <see cref="Int32"/>.
176+
/// Converts an <see cref="AttributeColumn"/> to an <see cref="int"/>.
177177
/// </summary>
178178
/// <param name="column">The <see cref="AttributeColumn"/> to convert.</param>
179-
/// <returns>The <see cref="Int32"/> value of the <see cref="AttributeColumn"/>.</returns>
179+
/// <returns>The <see cref="int"/> value of the <see cref="AttributeColumn"/>.</returns>
180180
public static implicit operator int(AttributeColumn column)
181181
{
182182
if (null != column)
@@ -188,20 +188,20 @@ public static implicit operator int(AttributeColumn column)
188188
}
189189

190190
/// <summary>
191-
/// Converts an <see cref="Int32"/> to an <see cref="AttributeColumn"/>.
191+
/// Converts an <see cref="int"/> to an <see cref="AttributeColumn"/>.
192192
/// </summary>
193-
/// <param name="value">The <see cref="Int32"/> value to convert.</param>
194-
/// <returns>The <see cref="AttributeColumn"/> with the value of the <see cref="Int32"/>.</returns>
193+
/// <param name="value">The <see cref="int"/> value to convert.</param>
194+
/// <returns>The <see cref="AttributeColumn"/> with the value of the <see cref="int"/>.</returns>
195195
public static implicit operator AttributeColumn(int value)
196196
{
197197
return new AttributeColumn(null, value);
198198
}
199199

200200
/// <summary>
201-
/// Converts an <see cref="AttributeColumn"/> to a nullable <see cref="Int32"/>.
201+
/// Converts an <see cref="AttributeColumn"/> to a nullable <see cref="int"/>.
202202
/// </summary>
203203
/// <param name="column">The <see cref="AttributeColumn"/> to convert.</param>
204-
/// <returns>The nullable <see cref="Int32"/> value of the <see cref="AttributeColumn"/>.</returns>
204+
/// <returns>The nullable <see cref="int"/> value of the <see cref="AttributeColumn"/>.</returns>
205205
public static implicit operator int?(AttributeColumn column)
206206
{
207207
if (null != column)
@@ -213,10 +213,10 @@ public static implicit operator AttributeColumn(int value)
213213
}
214214

215215
/// <summary>
216-
/// Converts a nullable <see cref="Int32"/> to an <see cref="AttributeColumn"/>.
216+
/// Converts a nullable <see cref="int"/> to an <see cref="AttributeColumn"/>.
217217
/// </summary>
218-
/// <param name="value">The nullable <see cref="Int32"/> value to convert.</param>
219-
/// <returns>The <see cref="AttributeColumn"/> with the value of the nullable <see cref="Int32"/>.</returns>
218+
/// <param name="value">The nullable <see cref="int"/> value to convert.</param>
219+
/// <returns>The <see cref="AttributeColumn"/> with the value of the nullable <see cref="int"/>.</returns>
220220
public static implicit operator AttributeColumn(int? value)
221221
{
222222
return new AttributeColumn(null, value);

src/PowerShell/Cache.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ internal sealed class Cache<TKey, TValue>
3838
private CacheItemSorter sorter;
3939

4040
/// <summary>
41-
/// Creates a new instance of the <see cref="Cache&lt;TKey, TValue&gt;"/> class.
41+
/// Initializes a new instance of the <see cref="Cache{TKey, TValue}"/> class.
4242
/// </summary>
43-
internal Cache() : this(DefaultCapacity)
43+
internal Cache()
44+
: this(DefaultCapacity)
4445
{
4546
}
4647

4748
/// <summary>
48-
/// Creates a new instance of the <see cref="Cache&lt;TKey, TValue&gt;"/> class using the given <paramref name="capacity"/>.
49+
/// Initializes a new instance of the <see cref="Cache{TKey, TValue}"/> class.
4950
/// </summary>
5051
/// <param name="capacity">The initial capacity that should not be exceeded.</param>
5152
internal Cache(int capacity)

src/PowerShell/CharComparer.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,12 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
// SOFTWARE.
2222

23-
using System;
2423
using System.Collections.Generic;
2524

2625
namespace Microsoft.Tools.WindowsInstaller
2726
{
2827
/// <summary>
29-
/// Equality comparer for a <see cref="Char"/>.
28+
/// Equality comparer for a <see cref="char"/>.
3029
/// </summary>
3130
internal sealed class CharComparer : IEqualityComparer<char>
3231
{
@@ -45,30 +44,30 @@ private CharComparer(bool ignoreCase)
4544
/// <summary>
4645
/// Gets whether <paramref name="x"/> and <paramref name="y"/> are equal.
4746
/// </summary>
48-
/// <param name="x">The first <see cref="Char"/> to compare.</param>
49-
/// <param name="y">The second <see cref="Char"/> to compare.</param>
47+
/// <param name="x">The first <see cref="char"/> to compare.</param>
48+
/// <param name="y">The second <see cref="char"/> to compare.</param>
5049
/// <returns>True if <paramref name="x"/> equals <paramref name="y"/>.</returns>
5150
public bool Equals(char x, char y)
5251
{
5352
if (this.ignoreCase)
5453
{
55-
x = Char.ToLowerInvariant(x);
56-
y = Char.ToLowerInvariant(y);
54+
x = char.ToLowerInvariant(x);
55+
y = char.ToLowerInvariant(y);
5756
}
5857

5958
return x.Equals(y);
6059
}
6160

6261
/// <summary>
63-
/// Gets the hash code of the given <see cref="Char"/>.
62+
/// Gets the hash code of the given <see cref="char"/>.
6463
/// </summary>
65-
/// <param name="obj">The <see cref="Char"/> from which to get the hash code.</param>
66-
/// <returns>The hash code of the given <see cref="Char"/>.</returns>
64+
/// <param name="obj">The <see cref="char"/> from which to get the hash code.</param>
65+
/// <returns>The hash code of the given <see cref="char"/>.</returns>
6766
public int GetHashCode(char obj)
6867
{
6968
if (this.ignoreCase)
7069
{
71-
obj = Char.ToLowerInvariant(obj);
70+
obj = char.ToLowerInvariant(obj);
7271
}
7372

7473
return obj.GetHashCode();

src/PowerShell/Column.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
// SOFTWARE.
2222

23-
using Microsoft.Deployment.WindowsInstaller;
2423
using System;
2524
using System.Collections.Generic;
2625
using System.IO;
26+
using Microsoft.Deployment.WindowsInstaller;
2727

2828
namespace Microsoft.Tools.WindowsInstaller
2929
{
@@ -53,7 +53,7 @@ internal sealed class Column
5353
};
5454

5555
/// <summary>
56-
/// Creates a new instance of the <see cref="Column"/> class from a <see cref="View"/> and column index.
56+
/// Initializes a new instance of the <see cref="Column"/> class.
5757
/// </summary>
5858
/// <param name="view">The <see cref="View"/> from which column information is retrieved.</param>
5959
/// <param name="index">The index of the column within the <see cref="View"/>.</param>
@@ -63,7 +63,6 @@ internal sealed class Column
6363
internal Column(View view, int index, string table, string name, string key)
6464
{
6565
// Internal constructor will assume valid parameters.
66-
6766
this.Index = index;
6867
var column = view.Columns[index];
6968

@@ -101,11 +100,11 @@ internal Column(View view, int index, string table, string name, string key)
101100
}
102101
else if (typeof(short) == type)
103102
{
104-
this.ColumnType = typeof(Nullable<short>);
103+
this.ColumnType = typeof(short?);
105104
}
106105
else
107106
{
108-
this.ColumnType = typeof(Nullable<int>);
107+
this.ColumnType = typeof(int?);
109108
}
110109
}
111110

@@ -120,7 +119,7 @@ internal Column(View view, int index, string table, string name, string key)
120119
internal int Index { get; private set; }
121120

122121
/// <summary>
123-
/// Gets whether the column is a primary key in its containing table.
122+
/// Gets a value indicating whether the column is a primary key in its containing table.
124123
/// </summary>
125124
internal bool IsPrimaryKey { get; private set; }
126125

src/PowerShell/ColumnCollection.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
// SOFTWARE.
2222

23-
using Microsoft.Deployment.WindowsInstaller;
24-
using Microsoft.Tools.WindowsInstaller.Properties;
2523
using System;
2624
using System.Collections.Generic;
2725
using System.Collections.ObjectModel;
26+
using Microsoft.Deployment.WindowsInstaller;
27+
using Microsoft.Tools.WindowsInstaller.Properties;
2828

2929
namespace Microsoft.Tools.WindowsInstaller
3030
{
@@ -37,7 +37,7 @@ internal sealed class ColumnCollection : KeyedCollection<string, Column>
3737
private static readonly char[] NameSeparators = new char[] { '.' };
3838

3939
/// <summary>
40-
/// Creates a new instance of the <see cref="Column"/> class from the specified <see cref="View"/>.
40+
/// Initializes a new instance of the <see cref="ColumnCollection"/> class.
4141
/// </summary>
4242
/// <param name="view">The <see cref="View"/> from which column information is retrieved.</param>
4343
/// <exception cref="InvalidOperationException">A column name was defined by multiple tables.</exception>
@@ -131,7 +131,7 @@ private static string[] GetColumns(View view)
131131
{
132132
// Return only specified columns.
133133
return columns
134-
.Replace("`", "")
134+
.Replace("`", string.Empty)
135135
.Split(ColumnCollection.ColumnSeparators, StringSplitOptions.RemoveEmptyEntries);
136136
}
137137
}

0 commit comments

Comments
 (0)