-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update supported platform list (#852) Patch directory and games discovery-docs (#851) Fixes #757 and #682. Tidy up nuspec files (#857) Conform nuspec descriptions to agree exactly with the README file Update version 1.17.0 -> 1.18.0 (#858)
- Loading branch information
1 parent
501c14f
commit 41c874b
Showing
16 changed files
with
341 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ Backup* | |
project.lock.json | ||
*~ | ||
.DS_Store | ||
.cr | ||
|
||
msbuild.log | ||
TestResult.xml | ||
|
4 changes: 2 additions & 2 deletions
4
ClientGenerator/src/googleapis/codegen/languages/csharp/default/features.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"language": "csharp", | ||
"description": "C# libraries for Google APIs.", | ||
"releaseVersion": "1.17.0", | ||
"nugetVersion": "1.17.0", | ||
"releaseVersion": "1.18.0", | ||
"nugetVersion": "1.18.0", | ||
"oldCompatibleVersion": "1.10.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /> | ||
</startup> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<ProjectGuid>{555463EC-9010-41E3-BCBD-76903F663102}</ProjectGuid> | ||
<OutputType>Exe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>DiscoveryDocPatcher</RootNamespace> | ||
<AssemblyName>DiscoveryDocPatcher</AssemblyName> | ||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||
<HintPath>packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="Microsoft.CSharp" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Net.Http" /> | ||
<Reference Include="System.Xml" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Patcher.cs" /> | ||
<Compile Include="Program.cs" /> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="App.config" /> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
Other similar extension points exist, see Microsoft.Common.targets. | ||
<Target Name="BeforeBuild"> | ||
</Target> | ||
<Target Name="AfterBuild"> | ||
</Target> | ||
--> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 14 | ||
VisualStudioVersion = 14.0.25420.1 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscoveryDocPatcher", "DiscoveryDocPatcher.csproj", "{555463EC-9010-41E3-BCBD-76903F663102}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{555463EC-9010-41E3-BCBD-76903F663102}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{555463EC-9010-41E3-BCBD-76903F663102}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{555463EC-9010-41E3-BCBD-76903F663102}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{555463EC-9010-41E3-BCBD-76903F663102}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
/* | ||
Copyright 2016 Google Inc | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
using Newtonsoft.Json.Linq; | ||
using System; | ||
using System.IO; | ||
|
||
namespace DiscoveryDocPatcher | ||
{ | ||
class Patcher | ||
{ | ||
public static Patcher Load(string path) => | ||
new Patcher(path, JObject.Parse(File.ReadAllText(path))); | ||
|
||
private readonly string _path; | ||
private readonly JObject _json; | ||
private bool changed = false; | ||
|
||
private Patcher(string path, JObject json) | ||
{ | ||
_path = path; | ||
_json = json; | ||
} | ||
|
||
public void SaveWithBackup() | ||
{ | ||
if (changed) | ||
{ | ||
File.Move(_path, _path + ".original"); | ||
string json = _json.ToString(); | ||
File.WriteAllText(_path, json); | ||
} | ||
} | ||
|
||
public void Remove(string jPath, JToken oldToken, JToken replacedToken) | ||
{ | ||
// replacedToken is used if this remove operation has already been carried | ||
// out on this jPath. It contains the token that is expected to be at the | ||
// jPath *after* the remove operation. | ||
var token = _json.SelectToken(jPath); | ||
if (!JToken.DeepEquals(token, oldToken)) | ||
{ | ||
if (JToken.DeepEquals(token, replacedToken)) | ||
{ | ||
// Already replaced, so do nothing. | ||
return; | ||
} | ||
throw new InvalidOperationException("Content wrong"); | ||
} | ||
changed = true; | ||
token.Remove(); | ||
} | ||
|
||
public void Remove(string jPath, string oldContent, string replacedContent) | ||
{ | ||
// Single quotes replaced with double quotes, to ease caller string literals. | ||
JToken oldToken = JToken.Parse(oldContent.Replace('\'', '"')); | ||
JToken replacedToken = JToken.Parse(replacedContent.Replace('\'', '"')); | ||
Remove(jPath, oldToken, replacedToken); | ||
} | ||
|
||
public void Replace(string jPath, JToken oldToken, JToken newToken) | ||
{ | ||
var token = _json.SelectToken(jPath); | ||
if (!JToken.DeepEquals(token, oldToken)) | ||
{ | ||
if (JToken.DeepEquals(token, newToken)) | ||
{ | ||
// Already replaced, so do nothing. | ||
return; | ||
} | ||
throw new InvalidOperationException("Content wrong"); | ||
} | ||
changed = true; | ||
token.Replace(newToken); | ||
} | ||
|
||
public void Replace(string jPath, string oldContent, string newContent) | ||
{ | ||
// Single quotes replaced with double quotes, to ease caller string literals. | ||
JToken oldToken = JToken.Parse(oldContent.Replace('\'', '"')); | ||
JToken newToken = JToken.Parse(newContent.Replace('\'', '"')); | ||
Replace(jPath, oldToken, newToken); | ||
} | ||
} | ||
} |
Oops, something went wrong.