Skip to content

Commit

Permalink
change pcl's to .netstandard
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Nov 3, 2016
1 parent a8eeb8a commit f0ab172
Show file tree
Hide file tree
Showing 44 changed files with 208 additions and 240 deletions.
20 changes: 17 additions & 3 deletions Emby.Common.Implementations/HttpClientManager/HttpClientManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,23 @@ private WebRequest GetRequest(HttpRequestOptions options, string method)
AddRequestHeaders(httpWebRequest, options);

#if NET46
httpWebRequest.AutomaticDecompression = options.EnableHttpCompression ?
(options.DecompressionMethod ?? DecompressionMethods.Deflate) :
DecompressionMethods.None;
if (options.EnableHttpCompression)
{
if (options.DecompressionMethod.HasValue)
{
httpWebRequest.AutomaticDecompression = options.DecompressionMethod.Value == CompressionMethod.Gzip
? DecompressionMethods.GZip
: DecompressionMethods.Deflate;
}
else
{
httpWebRequest.AutomaticDecompression = DecompressionMethods.Deflate;
}
}
else
{
httpWebRequest.AutomaticDecompression = DecompressionMethods.None;
}
#endif
}

Expand Down
28 changes: 13 additions & 15 deletions Emby.Common.Implementations/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,20 @@
"System.Xml.Serialization": "4.0.0.0"
},
"dependencies": {
"MediaBrowser.Common": {
"target": "project"
},
"SimpleInjector": "3.2.4",
"NLog": "4.4.0-betaV15",
"MediaBrowser.Model": {
"target": "project"
},
"SimpleInjector": "3.2.4",
"NLog": "4.4.0-betaV15"
}
"MediaBrowser.Common": {
"target": "project"
} }
},
"netstandard1.6": {
"imports": "dnxcore50",
"dependencies": {
"NETStandard.Library": "1.6.0",
"MediaBrowser.Common": {
"target": "project"
},
"MediaBrowser.Model": {
"target": "project"
},
"System.IO.FileSystem.DriveInfo": "4.0.0",
"System.IO.FileSystem.DriveInfo": "4.0.0",
"System.Diagnostics.Process": "4.1.0",
"System.Threading.Timer": "4.0.1",
"System.Net.Requests": "4.0.11",
Expand All @@ -58,8 +51,13 @@
"System.Reflection.Primitives": "4.0.1",
"System.Runtime.Loader": "4.0.0",
"SimpleInjector": "3.2.4",
"NLog": "4.4.0-betaV15"
}
"NLog": "4.4.0-betaV15",
"MediaBrowser.Model": {
"target": "project"
},
"MediaBrowser.Common": {
"target": "project"
} }
}
}
}
50 changes: 19 additions & 31 deletions Emby.Server.Implementations/Emby.Server.Implementations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
<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>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D08B8079-08B3-48F2-83C4-E9CCCE48AFF1}</ProjectGuid>
<ProjectGuid>{E383961B-9356-4D5D-8233-9A1079D03055}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Emby.Server.Implementations</RootNamespace>
<AssemblyName>Emby.Server.Implementations</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -35,23 +36,9 @@
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .NET Framework is automatically included -->
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
<Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
<Name>MediaBrowser.Common</Name>
</ProjectReference>
<ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj">
<Project>{17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2}</Project>
<Name>MediaBrowser.Controller</Name>
</ProjectReference>
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
<Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
<Name>MediaBrowser.Model</Name>
</ProjectReference>
<None Include="project.json" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SharedVersion.cs">
<Link>Properties\SharedVersion.cs</Link>
</Compile>
<Compile Include="Activity\ActivityLogEntryPoint.cs" />
<Compile Include="Activity\ActivityManager.cs" />
<Compile Include="Branding\BrandingConfigurationFactory.cs" />
Expand Down Expand Up @@ -170,20 +157,21 @@
<Compile Include="UserViews\DynamicImageProvider.cs" />
</ItemGroup>
<ItemGroup>
<Reference Include="MediaBrowser.Naming, Version=1.0.6146.28476, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Naming.1.0.0.57\lib\portable-net45+sl4+wp71+win8+wpa81\MediaBrowser.Naming.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Patterns.Logging, Version=1.0.6149.1756, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Patterns.Logging.1.0.0.4\lib\portable-net45+dnxcore50+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<Folder Include="IO\" />
</ItemGroup>
<ItemGroup>
<Folder Include="IO\" />
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
<Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
<Name>MediaBrowser.Common</Name>
</ProjectReference>
<ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj">
<Project>{17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2}</Project>
<Name>MediaBrowser.Controller</Name>
</ProjectReference>
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
<Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
<Name>MediaBrowser.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
4 changes: 3 additions & 1 deletion Emby.Server.Implementations/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
10 changes: 7 additions & 3 deletions Emby.Server.Implementations/Updates/InstallationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public class InstallationManager : IInstallationManager
/// <summary>
/// The completed installations
/// </summary>
public ConcurrentBag<InstallationInfo> CompletedInstallations { get; set; }
private ConcurrentBag<InstallationInfo> CompletedInstallationsInternal { get; set; }

public IEnumerable<InstallationInfo> CompletedInstallations {
get { return CompletedInstallationsInternal; }
}

#region PluginUninstalled Event
/// <summary>
Expand Down Expand Up @@ -125,7 +129,7 @@ public InstallationManager(ILogger logger, IApplicationHost appHost, IApplicatio
}

CurrentInstallations = new List<Tuple<InstallationInfo, CancellationTokenSource>>();
CompletedInstallations = new ConcurrentBag<InstallationInfo>();
CompletedInstallationsInternal = new ConcurrentBag<InstallationInfo>();

_applicationHost = appHost;
_appPaths = appPaths;
Expand Down Expand Up @@ -503,7 +507,7 @@ public async Task InstallPackage(PackageVersionInfo package, bool isPlugin, IPro

progress.Report(100);

CompletedInstallations.Add(installationInfo);
CompletedInstallationsInternal.Add(installationInfo);

EventHelper.FireEventIfNotNull(PackageInstallationCompleted, this, installationEventArgs, _logger);
}
Expand Down
5 changes: 0 additions & 5 deletions Emby.Server.Implementations/packages.config

This file was deleted.

12 changes: 12 additions & 0 deletions Emby.Server.Implementations/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"supports": {},
"dependencies": {
"MediaBrowser.Naming": "1.0.0.58",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0",
"Patterns.Logging": "1.0.0.5"
},
"frameworks": {
"netstandard1.3": {}
}
}
7 changes: 4 additions & 3 deletions MediaBrowser.Common/MediaBrowser.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
6 changes: 0 additions & 6 deletions MediaBrowser.Common/MediaBrowser.Common.nuget.targets

This file was deleted.

8 changes: 7 additions & 1 deletion MediaBrowser.Common/Net/HttpRequestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class HttpRequestOptions
/// <value>The URL.</value>
public string Url { get; set; }

public DecompressionMethods? DecompressionMethod { get; set; }
public CompressionMethod? DecompressionMethod { get; set; }

/// <summary>
/// Gets or sets the accept header.
Expand Down Expand Up @@ -141,4 +141,10 @@ public enum CacheMode
None = 0,
Unconditional = 1
}

public enum CompressionMethod
{
Deflate,
Gzip
}
}
3 changes: 0 additions & 3 deletions MediaBrowser.Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cdec1bb7-6ffd-409f-b41f-0524a73df9be")]

// Version information for an assembly consists of the following four values:
//
// Major Version
Expand Down
3 changes: 1 addition & 2 deletions MediaBrowser.Common/Updates/IInstallationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Updates;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -24,7 +23,7 @@ public interface IInstallationManager : IDisposable
/// <summary>
/// The completed installations
/// </summary>
ConcurrentBag<InstallationInfo> CompletedInstallations { get; set; }
IEnumerable<InstallationInfo> CompletedInstallations { get; }

/// <summary>
/// Occurs when [plugin uninstalled].
Expand Down
25 changes: 9 additions & 16 deletions MediaBrowser.Common/project.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"frameworks":{
"netstandard1.6":{
"dependencies":{
"NETStandard.Library":"1.6.0",
}
},
".NETPortable,Version=v4.5,Profile=Profile7":{
"buildOptions": {
"define": [ ]
},
"frameworkAssemblies":{

}
}
}
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.0": {}
}
}
9 changes: 4 additions & 5 deletions MediaBrowser.Controller/MediaBrowser.Controller.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -367,9 +369,6 @@
<Name>MediaBrowser.Model</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent />
Expand Down
6 changes: 0 additions & 6 deletions MediaBrowser.Controller/MediaBrowser.Controller.nuget.targets

This file was deleted.

3 changes: 0 additions & 3 deletions MediaBrowser.Controller/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("bc09905a-04ed-497d-b39b-27593401e715")]

// Version information for an assembly consists of the following four values:
//
// Major Version
Expand Down
3 changes: 0 additions & 3 deletions MediaBrowser.Controller/packages.config

This file was deleted.

25 changes: 9 additions & 16 deletions MediaBrowser.Controller/project.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{
"frameworks":{
"netstandard1.6":{
"dependencies":{
"NETStandard.Library":"1.6.0",
}
},
".NETPortable,Version=v4.5,Profile=Profile7":{
"buildOptions": {
"define": [ ]
},
"frameworkAssemblies":{

}
}
}
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0"
},
"frameworks": {
"netstandard1.1": {}
}
}
Loading

0 comments on commit f0ab172

Please sign in to comment.