Renames project: Umbraco.ModelsBuilder.Embedded and namespaces since we need a different assembly, updates nuspec, changes file path of MB app_plugins

This commit is contained in:
Shannon
2019-10-29 00:25:03 +11:00
parent c10ad86c43
commit 3b6abbb936
48 changed files with 86 additions and 126 deletions

View File

@@ -0,0 +1,36 @@
using System;
using System.Reflection;
using Semver;
namespace Umbraco.ModelsBuilder.Embedded
{
/// <summary>
/// Manages API version handshake between client and server.
/// </summary>
public class ApiVersion
{
/// <summary>
/// Initializes a new instance of the <see cref="ApiVersion"/> class.
/// </summary>
/// <param name="executingVersion">The currently executing version.</param>
/// <exception cref="ArgumentNullException"></exception>
internal ApiVersion(SemVersion executingVersion)
{
Version = executingVersion ?? throw new ArgumentNullException(nameof(executingVersion));
}
private static SemVersion CurrentAssemblyVersion
=> SemVersion.Parse(Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion);
/// <summary>
/// Gets the currently executing API version.
/// </summary>
public static ApiVersion Current { get; }
= new ApiVersion(CurrentAssemblyVersion);
/// <summary>
/// Gets the executing version of the API.
/// </summary>
public SemVersion Version { get; }
}
}