Skip to content

Commit

Permalink
PnP Core SDK assemblies are now strong named #542 + PnP Core SDK inte…
Browse files Browse the repository at this point in the history
…rnals are not exposed anymore to libraries outside of the PnP Core SDK solution
  • Loading branch information
jansenbe committed Sep 14, 2021
1 parent ce90a90 commit 1e7f1ee
Show file tree
Hide file tree
Showing 27 changed files with 83 additions and 34 deletions.
2 changes: 2 additions & 0 deletions src/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Default retry mechanism now uses retry-after header for REST, CSOM and Graph requests, aligned with the settings in PnP Framework [jansenbe - Bert Jansen]
- Switched to using V1 Taxonomy API now that it's out of beta [jansenbe - Bert Jansen]
- Implemented generic handling for non-English timezone strings, initial fix for #543 [jansenbe - Bert Jansen]
- PnP Core SDK internals are not exposed anymore to libraries outside of the PnP Core SDK solution [jansenbe - Bert Jansen]
- PnP Core SDK assemblies are now strong named #542 [jansenbe - Bert Jansen]

## [1.3.0]

Expand Down
4 changes: 3 additions & 1 deletion src/sdk/PnP.Core.Admin.Test/PnP.Core.Admin.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PnP.Core.Admin/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;

#if DEBUG
[assembly: InternalsVisibleTo("PnP.Core.Admin.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Admin.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
#endif

[assembly: NeutralResourcesLanguage("en")]
2 changes: 2 additions & 0 deletions src/sdk/PnP.Core.Admin/PnP.Core.Admin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<Deterministic>true</Deterministic>
<Configurations>Debug;Release</Configurations>
<PackageIcon>nugeticon.png</PackageIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down
2 changes: 2 additions & 0 deletions src/sdk/PnP.Core.Auth.Test/PnP.Core.Auth.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>net5.0</TargetFramework>

<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PnP.Core.Auth/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Runtime.CompilerServices;

#if DEBUG
[assembly: InternalsVisibleTo("PnP.Core.Auth.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Auth.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
#endif

[assembly: NeutralResourcesLanguage("en")]
2 changes: 2 additions & 0 deletions src/sdk/PnP.Core.Auth/PnP.Core.Auth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<Deterministic>true</Deterministic>
<Configurations>Debug;Release</Configurations>
<PackageIcon>nugeticon.png</PackageIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down
6 changes: 3 additions & 3 deletions src/sdk/PnP.Core.Test.Common/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using System.Runtime.CompilerServices;

#if DEBUG
[assembly: InternalsVisibleTo("PnP.Core.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Auth.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Admin.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
[assembly: InternalsVisibleTo("PnP.Core.Auth.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
[assembly: InternalsVisibleTo("PnP.Core.Admin.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
#endif

[assembly: NeutralResourcesLanguage("en")]
4 changes: 3 additions & 1 deletion src/sdk/PnP.Core.Test.Common/PnP.Core.Test.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/sdk/PnP.Core.Test/PnP.Core.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<IsPackable>false</IsPackable>

<Configurations>Debug;Release</Configurations>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PnP.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PnP.Core.Admin", "PnP.Core.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PnP.Core.Admin.Test", "PnP.Core.Admin.Test\PnP.Core.Admin.Test.csproj", "{8806BABA-C6CC-495C-AA33-B9A56E213572}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PnP.Core.Test.Common", "PnP.Core.Test.Common\PnP.Core.Test.Common.csproj", "{A973BF05-1883-49AE-BA39-8CB837C5476F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PnP.Core.Test.Common", "PnP.Core.Test.Common\PnP.Core.Test.Common.csproj", "{A973BF05-1883-49AE-BA39-8CB837C5476F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
17 changes: 6 additions & 11 deletions src/sdk/PnP.Core/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
using System.Resources;
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("PnP.Core.Auth")]
[assembly: InternalsVisibleTo("PnP.Core.Admin")]
[assembly: InternalsVisibleTo("PnP.Framework")]
[assembly: InternalsVisibleTo("PnP.PowerShell")]
[assembly: InternalsVisibleTo("PnP.Core.Auth, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
[assembly: InternalsVisibleTo("PnP.Core.Admin, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]

#if DEBUG
[assembly: InternalsVisibleTo("PnP.Core.Test.Common")]
[assembly: InternalsVisibleTo("PnP.Core.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Auth.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Admin.Test")]
[assembly: InternalsVisibleTo("PnP.Framework.Test")]
[assembly: InternalsVisibleTo("PnP.Framework.Modernization.Test")]
[assembly: InternalsVisibleTo("PnP.PowerShell.Test")]
[assembly: InternalsVisibleTo("PnP.Core.Test.Common, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
[assembly: InternalsVisibleTo("PnP.Core.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
[assembly: InternalsVisibleTo("PnP.Core.Auth.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
[assembly: InternalsVisibleTo("PnP.Core.Admin.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001000dbc41bd44b97df5ebb933aeecf7a91a7bf9d2d10ce54c5daa3adc211ab557d179355b18ee4bc50e4e82151ee15cc4f4220e3bb6048b22bb93bd6193ed82a0b71c0cd56a527e1d28614988b1fdbdf6f40f850acc009fc26db1b37878e6d4d6da2463d6867ef7317c1cef37b5099c9138dcf21571bb6201b48d8814abdc33b8ad")]
#endif

[assembly: NeutralResourcesLanguage("en")]
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public string DataVersion
{
return dataVersion;
}
set
{
dataVersion = value;
}
}

/// <summary>
Expand Down Expand Up @@ -127,6 +131,10 @@ public Guid InstanceId
{
return instanceId;
}
set
{
instanceId = value;
}
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public List<ICanvasSection> Sections

public List<ICanvasControl> Controls { get; } = new List<ICanvasControl>(5);

internal List<ICanvasControl> HeaderControls { get; } = new List<ICanvasControl>();
public List<ICanvasControl> HeaderControls { get; } = new List<ICanvasControl>();

/// <summary>
/// Layout type of the client side page
Expand Down Expand Up @@ -256,7 +256,7 @@ public int? PageId
/// <summary>
/// ListItem linked to this page
/// </summary>
internal IListItem PageListItem { get; set; }
public IListItem PageListItem { get; set; }

#endregion

Expand Down Expand Up @@ -835,7 +835,7 @@ public void AddControl(ICanvasControl control, ICanvasColumn column, int order)
/// </summary>
/// <param name="control"><see cref="ICanvasControl"/> to add</param>
/// <param name="order">Order of the control in the given section</param>
internal void AddHeaderControl(ICanvasControl control, int order)
public void AddHeaderControl(ICanvasControl control, int order)
{
if (control == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ internal class PageHeader : IPageHeader
/// <summary>
/// Returns the type of header
/// </summary>
internal PageHeaderType Type { get; private set; }
public PageHeaderType Type { get; private set; }

/// <summary>
/// Server relative link to page header image, set to null for default header image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public override Type Type
/// <summary>
/// This control lives in the page header (not removable control)
/// </summary>
public bool IsHeaderControl { get; internal set; }
public bool IsHeaderControl { get; set; }

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@ public interface ICanvasColumn
/// Color emphasis of the column (used for the vertical section column)
/// </summary>
int? VerticalSectionEmphasis { get; }

/// <summary>
/// Resets the column, used in scenarios where a section is changed from type (e.g. from 3 column to 2 column)
/// </summary>
/// <param name="order">Column order to set</param>
/// <param name="columnFactor">Column factor to set</param>
void ResetColumn(int order, int columnFactor);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface ICanvasControl
/// <summary>
/// The internal storage version used for this control
/// </summary>
string DataVersion { get; }
string DataVersion { get; set; }

/// <summary>
/// The internal canvas storage version used
Expand All @@ -45,7 +45,7 @@ public interface ICanvasControl
/// <summary>
/// Instance ID of the control
/// </summary>
Guid InstanceId { get; }
Guid InstanceId { get; set; }

/// <summary>
/// Order of the control in the control collection
Expand Down
17 changes: 17 additions & 0 deletions src/sdk/PnP.Core/Model/SharePoint/Pages/Public/IPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ public interface IPage
/// </summary>
List<ICanvasControl> Controls { get; }

/// <summary>
/// List of controls on this page's header
/// </summary>
List<ICanvasControl> HeaderControls { get; }

/// <summary>
/// Returns the page header for this page
/// </summary>
Expand Down Expand Up @@ -106,6 +111,11 @@ public interface IPage
/// </summary>
IList PagesLibrary { get; }

/// <summary>
/// ListItem linked to this page
/// </summary>
public IListItem PageListItem { get; }

/// <summary>
/// ID value of the page (only available when the page was saved)
/// </summary>
Expand Down Expand Up @@ -230,6 +240,13 @@ public interface IPage
/// <param name="translateY">Y focal point for image</param>
public void SetCustomPageHeader(string serverRelativeImageUrl, double? translateX = null, double? translateY = null);

/// <summary>
/// Adds a new header control to your client side page with a given order. Used for topic page creation
/// </summary>
/// <param name="control"><see cref="ICanvasControl"/> to add</param>
/// <param name="order">Order of the control in the given section</param>
public void AddHeaderControl(ICanvasControl control, int order);

/// <summary>
/// Creates a new text part which can be configured and added to the page
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions src/sdk/PnP.Core/Model/SharePoint/Pages/Public/IPageHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
public interface IPageHeader
{

/// <summary>
/// Returns the type of header
/// </summary>
public PageHeaderType Type { get; }

/// <summary>
/// Server relative link to page header image, set to null for default header image.
/// Note: image needs to reside in the current site
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public interface IPageWebPart : ICanvasControl
/// <summary>
/// This control lives in the page header (not removable control)
/// </summary>
public bool IsHeaderControl { get; }
public bool IsHeaderControl { get; set; }

}
}
2 changes: 2 additions & 0 deletions src/sdk/PnP.Core/PnP.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<Deterministic>true</Deterministic>
<Configurations>Debug;Release</Configurations>
<PackageIcon>nugeticon.png</PackageIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\pnp.core.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
namespace PnP.Core.Services
{
/// <summary>
/// Defines the internal interface that a legacy Authentication Provider must implement
/// Defines the interface that a legacy Authentication Provider must implement.
/// Note: this is only meant to be used by PnP Framework, no 3rd party support will be provided.
/// </summary>
internal interface ILegacyAuthenticationProvider : IAuthenticationProvider
public interface ILegacyAuthenticationProvider : IAuthenticationProvider
{
/// <summary>
/// Provides the value of the Cookie header for legacy cookie-based authentication
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/PnP.Core/Services/Core/Batch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Batch() : this(Guid.NewGuid()) { }
/// <summary>
/// List with requests
/// </summary>
internal SortedList<int, BatchRequest> Requests { get; private set; } = new SortedList<int, BatchRequest>();
public SortedList<int, BatchRequest> Requests { get; internal set; } = new SortedList<int, BatchRequest>();

/// <summary>
/// List with batch results, will be populated when <see cref="ThrowOnError"/> is set
Expand All @@ -50,7 +50,7 @@ public Batch() : this(Guid.NewGuid()) { }
/// <summary>
/// Was this <see cref="Batch"/> executed?
/// </summary>
internal bool Executed { get; set; }
public bool Executed { get; internal set; }

/// <summary>
/// Only use Graph batching when all requests in the batch are targeting Graph
Expand Down
6 changes: 3 additions & 3 deletions src/sdk/PnP.Core/Services/Core/BatchRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace PnP.Core.Services
/// <summary>
/// Defines a request in a <see cref="Batch"/>
/// </summary>
internal class BatchRequest
public class BatchRequest
{
/// <summary>
/// Default constructor
Expand Down Expand Up @@ -92,7 +92,7 @@ internal BatchRequest(TransientObject modelInstance, EntityInfo entityInfo, Http
/// <summary>
/// Json response for this request (only populated when the <see cref="Batch"/> was executed)
/// </summary>
internal string ResponseJson { get; private set; }
public string ResponseJson { get; private set; }

/// <summary>
/// Stream containing the response binary content
Expand All @@ -102,7 +102,7 @@ internal BatchRequest(TransientObject modelInstance, EntityInfo entityInfo, Http
/// <summary>
/// Http response code for this request (only populated when the <see cref="Batch"/> was executed)
/// </summary>
internal HttpStatusCode ResponseHttpStatusCode { get; private set; }
public HttpStatusCode ResponseHttpStatusCode { get; private set; }

/// <summary>
/// Headers returned for this request (e.g. Content header to follow-up on async server side operations)
Expand Down
Binary file added src/sdk/pnp.core.snk
Binary file not shown.
Binary file added src/sdk/public.snk
Binary file not shown.

0 comments on commit 1e7f1ee

Please sign in to comment.