Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Changes to System.Runtime.Serialization.Primitives and Xml
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot authored and venkat-raman251 committed Jan 19, 2016
1 parent 984cb7d commit 5fed590
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class DataContractSerializerExtensions
public static ISerializationSurrogateProvider GetSerializationSurrogateProvider(this DataContractSerializer serializer)
{
SurrogateProviderAdapter adapter = serializer.DataContractSurrogate as SurrogateProviderAdapter;
return adapter?.Provider;
return (adapter == null) ? null : adapter.Provider;
}

public static void SetSerializationSurrogateProvider(this DataContractSerializer serializer, ISerializationSurrogateProvider provider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<Project Include="System.Runtime.Serialization.Primitives.csproj" />
<Project Include="System.Runtime.Serialization.Primitives.csproj">
<TargetGroup>net46</TargetGroup>
</Project>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,22 @@
<DebugSymbols>true</DebugSymbols>
<PlatformTarget>AnyCPU</PlatformTarget>
<ProjectGuid>{CDF0ACB5-1361-4E48-8ECB-22E8022F5F01}</ProjectGuid>
<PackageTargetFramework>dotnet5.4</PackageTargetFramework>
<PackageTargetFramework Condition="'$(PackageTargetFramework)'==''">dotnet5.4</PackageTargetFramework>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)'=='net46'">true</IsPartialFacadeAssembly>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'" />
<ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Release|AnyCPU'" />
<ItemGroup Condition="'$(TargetGroup)'!='net46'">
<Compile Include=".\**\*.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)'=='net46'">
<TargetingPackReference Include="mscorlib" />
<TargetingPackReference Include="System.Runtime.Serialization" />
<Compile Include="System\Runtime\Serialization\ISerializationSurrogateProvider.cs" />
</ItemGroup>
<ItemGroup>
<None Include="project.json" />
</ItemGroup>
Expand Down
18 changes: 12 additions & 6 deletions src/System.Runtime.Serialization.Primitives/src/project.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"dependencies": {
"System.Runtime": "4.0.20",
"System.Resources.ResourceManager": "4.0.0",
"System.Threading.Tasks": "4.0.10"
},
"frameworks": {
"dnxcore50": {}
"dotnet5.4": {
"dependencies": {
"System.Runtime": "4.0.20",
"System.Resources.ResourceManager": "4.0.0",
"System.Threading.Tasks": "4.0.10"
}
},
"net46":{
"dependencies": {
"Microsoft.TargetingPack.NetFramework.v4.6": "1.0.0",
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<OSGroup>Windows_NT</OSGroup>
<TargetGroup>netcore50aot</TargetGroup>
</Project>
<Project Include="System.Runtime.Serialization.Xml.csproj">
<TargetGroup>net46</TargetGroup>
</Project>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
</Project>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,34 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50aot_Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50_Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Release|AnyCPU'" />

<PropertyGroup Condition="'$(TargetGroup)' == 'netcore50aot'">
<ProjectJson>netcore50aot\project.json</ProjectJson>
<ProjectLockJson>netcore50aot\project.lock.json</ProjectLockJson>
</PropertyGroup>


<ItemGroup Condition="'$(TargetGroup)' == 'netcore50aot'" >
<TargetingPackReference Include="System.Private.CoreLib" />
<TargetingPackReference Include="System.Private.DataContractSerialization" />
</ItemGroup>
<ItemGroup>
<TargetingPackReference Include="mscorlib" Condition="'$(TargetGroup)' != 'netcore50aot'" />
<TargetingPackReference Include="System.Private.CoreLib" Condition="'$(TargetGroup)' == 'netcore50aot'" />
<TargetingPackReference Include="System.Private.DataContractSerialization" Condition="'$(TargetGroup)' == 'netcore50aot'" />
<ProjectReference Include="$(SourceDir)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
<ProjectReference Include="$(SourceDir)System.Runtime.Serialization.Primitives\src\System.Runtime.Serialization.Primitives.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(TargetGroup)' == 'netcore50' OR '$(TargetGroup)' == ''" >
<ProjectReference Include="$(SourceDir)System.Private.DataContractSerialization\src\System.Private.DataContractSerialization.csproj" />
<TargetingPackReference Include="mscorlib" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' == 'net46'" >
<TargetingPackReference Include="mscorlib" />
<TargetingPackReference Include="System" />
<TargetingPackReference Include="System.Runtime.Serialization" />
<Compile Include="$(SourceDir)System.Private.DataContractSerialization\src\System\Runtime\Serialization\DataContractSerializerExtensions.Desktop.cs" />
<Compile Include="$(CommonPath)\System\NotImplemented.cs">
<Link>Common\System\NotImplemented.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="project.json" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"frameworks": {
"netcore50": {
"dependencies": {
"Microsoft.TargetingPack.Private.NetNative": "1.0.0-rc2-23607"
"Microsoft.TargetingPack.Private.NetNative": "1.0.0-rc2-23712"
}
}
}
Expand Down
11 changes: 8 additions & 3 deletions src/System.Runtime.Serialization.Xml/src/project.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"frameworks": {
"dnxcore50": {
"dotnet5.4": {
"dependencies": {
"Microsoft.TargetingPack.Private.CoreCLR": "1.0.0-rc2-23604"
"Microsoft.TargetingPack.Private.CoreCLR": "1.0.0-rc2-23712"
}
},
"netcore50": {
"dependencies": {
"Microsoft.TargetingPack.Private.CoreCLR": "1.0.0-rc2-23604"
"Microsoft.TargetingPack.Private.CoreCLR": "1.0.0-rc2-23712"
}
},
"net46": {
"dependencies": {
"Microsoft.TargetingPack.NetFramework.v4.6": "1.0.0"
}
}
}
Expand Down

0 comments on commit 5fed590

Please sign in to comment.