Skip to content

Commit da38302

Browse files
committed
Finalizes integration of localization support
1 parent 194a041 commit da38302

File tree

7 files changed

+40
-26
lines changed

7 files changed

+40
-26
lines changed

src/Lithnet.ResourceManagement.Automation.Installer/Product.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Product Id="*"
55
Name="Lithnet FIM/MIM Service PowerShell Module"
66
Language="1033"
7-
Version="1.0.6034"
7+
Version="1.0.6048"
88
Manufacturer="Lithnet"
99
UpgradeCode="CC6C89F6-8663-46ED-A792-15B1327D8AA8">
1010
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

src/Lithnet.ResourceManagement.Automation/Lithnet.ResourceManagement.Automation.csproj

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>Lithnet.ResourceManagement.Automation</RootNamespace>
1111
<AssemblyName>Lithnet.ResourceManagement.Automation</AssemblyName>
12-
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<NuGetPackageImportStamp>
1515
</NuGetPackageImportStamp>
16+
<TargetFrameworkProfile />
1617
</PropertyGroup>
1718
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1819
<DebugSymbols>true</DebugSymbols>
@@ -22,6 +23,7 @@
2223
<DefineConstants>DEBUG;TRACE</DefineConstants>
2324
<ErrorReport>prompt</ErrorReport>
2425
<WarningLevel>4</WarningLevel>
26+
<Prefer32Bit>false</Prefer32Bit>
2527
</PropertyGroup>
2628
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2729
<DebugType>pdbonly</DebugType>
@@ -30,15 +32,16 @@
3032
<DefineConstants>TRACE</DefineConstants>
3133
<ErrorReport>prompt</ErrorReport>
3234
<WarningLevel>4</WarningLevel>
35+
<Prefer32Bit>false</Prefer32Bit>
3336
</PropertyGroup>
3437
<ItemGroup>
35-
<Reference Include="Lithnet.ResourceManagement.Client, Version=1.0.6034.20090, Culture=neutral, processorArchitecture=MSIL">
36-
<HintPath>..\packages\Lithnet.ResourceManagement.Client.1.0.6034.20090\lib\net40\Lithnet.ResourceManagement.Client.dll</HintPath>
38+
<Reference Include="Lithnet.ResourceManagement.Client, Version=1.0.6048.17046, Culture=neutral, processorArchitecture=MSIL">
39+
<HintPath>..\packages\Lithnet.ResourceManagement.Client.1.0.6048.17046\lib\net40\Lithnet.ResourceManagement.Client.dll</HintPath>
3740
<Private>True</Private>
3841
</Reference>
39-
<Reference Include="Microsoft.ResourceManagement">
40-
<HintPath>..\..\lithnetrmc\lib\Microsoft.ResourceManagement.dll</HintPath>
41-
<Private>True</Private>
42+
<Reference Include="Microsoft.ResourceManagement, Version=4.1.3451.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
43+
<SpecificVersion>False</SpecificVersion>
44+
<HintPath>..\..\..\lib\Microsoft.ResourceManagement.dll</HintPath>
4245
</Reference>
4346
<Reference Include="System" />
4447
<Reference Include="System.Core" />
@@ -123,12 +126,12 @@
123126
<PreBuildEvent>
124127
</PreBuildEvent>
125128
</PropertyGroup>
126-
<Import Project="..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets" Condition="Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" />
129+
<Import Project="..\packages\Fody.1.29.2\build\dotnet\Fody.targets" Condition="Exists('..\packages\Fody.1.29.2\build\dotnet\Fody.targets')" />
127130
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
128131
<PropertyGroup>
129132
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
130133
</PropertyGroup>
131-
<Error Condition="!Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets'))" />
134+
<Error Condition="!Exists('..\packages\Fody.1.29.2\build\dotnet\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.2\build\dotnet\Fody.targets'))" />
132135
</Target>
133136
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
134137
Other similar extension points exist, see Microsoft.Common.targets.

src/Lithnet.ResourceManagement.Automation/LithnetRMA.Help.pshproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<ModuleObject xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fVersion="1.1" type="Manifest" mclass="Module" useSupports="false">
33
<Name>LithnetRMA</Name>
4-
<Version>1.0.6034</Version>
4+
<Version>1.0.6048</Version>
55
<Description>Lithnet Resource Management Client for PowerShell</Description>
66
<HasManifest>true</HasManifest>
77
<OverridePostCount>false</OverridePostCount>

src/Lithnet.ResourceManagement.Automation/LithnetRMA.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@{
1010

1111
# Version number of this module.
12-
ModuleVersion = '1.0.6034'
12+
ModuleVersion = '1.0.6048'
1313

1414
# ID used to uniquely identify this module
1515
GUID = 'd7c36446-aca6-418a-a2a3-cbfc32016a52'

src/Lithnet.ResourceManagement.Automation/SaveResource.cs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,38 @@ public class SaveResource : Cmdlet
2222

2323
[Parameter(Mandatory = false)]
2424
public string Locale { get; set; }
25-
25+
2626
protected override void ProcessRecord()
2727
{
2828
IEnumerable<RmaObject> creatingObjects = this.Resources.Where(t => t.InternalObject.ModificationType == OperationType.Create).ToList();
2929

30-
CultureInfo locale = null;
31-
3230
if (this.Locale != null)
3331
{
34-
locale = new CultureInfo(this.Locale);
35-
}
32+
CultureInfo locale = new CultureInfo(this.Locale);
3633

37-
if (this.Parallel.IsPresent)
38-
{
39-
RmcWrapper.Client.SaveResourcesParallel(this.Resources.Select(t => t.GetResourceWithAppliedChanges()), -1, locale);
34+
if (this.Resources.Length > 1)
35+
{
36+
this.WriteWarning("Composite save disabled as locale parameter has been specified");
37+
}
38+
39+
foreach (ResourceObject r in this.Resources.Select(t => t.GetResourceWithAppliedChanges()))
40+
{
41+
RmcWrapper.Client.SaveResource(r, locale);
42+
}
4043
}
4144
else
4245
{
43-
RmcWrapper.Client.SaveResources(this.Resources.Select(t => t.GetResourceWithAppliedChanges()), locale);
46+
if (this.Parallel.IsPresent)
47+
{
48+
RmcWrapper.Client.SaveResourcesParallel(this.Resources.Select(t => t.GetResourceWithAppliedChanges()), -1);
49+
}
50+
else
51+
{
52+
RmcWrapper.Client.SaveResources(this.Resources.Select(t => t.GetResourceWithAppliedChanges()));
53+
}
4454
}
4555

46-
foreach(RmaObject resource in creatingObjects)
56+
foreach (RmaObject resource in creatingObjects)
4757
{
4858
resource.ReloadProperties();
4959
}

src/Lithnet.ResourceManagement.Automation/app.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
<configSections>
44
<section name="lithnetResourceManagementClient" type="Lithnet.ResourceManagement.Client.ClientConfigurationSection, Lithnet.ResourceManagement.Client"/>
55
</configSections>
6-
<lithnetResourceManagementClient resourceManagementServiceBaseAddress="http://localhost:5725"/>
7-
</configuration>
6+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup>
7+
<lithnetResourceManagementClient resourceManagementServiceBaseAddress="http://localhost:5725"/>
8+
</configuration>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Costura.Fody" version="1.3.3.0" targetFramework="net40" developmentDependency="true" />
4-
<package id="Fody" version="1.29.2" targetFramework="net40" developmentDependency="true" />
5-
<package id="Lithnet.ResourceManagement.Client" version="1.0.6034.20090" targetFramework="net40" />
3+
<package id="Costura.Fody" version="1.3.3.0" targetFramework="net45" developmentDependency="true" />
4+
<package id="Fody" version="1.29.2" targetFramework="net45" developmentDependency="true" />
5+
<package id="Lithnet.ResourceManagement.Client" version="1.0.6048.17046" targetFramework="net45" />
66
</packages>

0 commit comments

Comments
 (0)