Compare commits

...

23 Commits

Author SHA1 Message Date
Matija Koželj
c53cbe0096 Add local nuget push to remaining projects 2023-01-25 13:14:25 +01:00
Matija Koželj
6d6ca3f633 Add local nuget package push to projects
Add where clause rewriter to TSqlLinguist
2023-01-25 12:07:36 +01:00
Matija Koželj
f989b59330 Add nuget local push to additional projects 2023-01-25 10:59:10 +01:00
Matija Koželj
db4fd905a2 Add nuget local repo upload to Connected.Data 2023-01-25 09:37:50 +01:00
Matija Koželj
ed9f31df1f [WIP] Add additional check to entities list 2023-01-24 18:59:03 +01:00
Matija Koželj
018a48dd65 [WIP] Add debug output of entities 2023-01-24 18:51:59 +01:00
Matija Koželj
9381a4e4c6 Add local nuget push to Connected.Interop 2023-01-24 18:33:32 +01:00
Matija Koželj
93b39c97a7 Add nuget local uploads to Connected.Entities 2023-01-24 18:20:13 +01:00
Matija Koželj
379d31dbfd Add package upload to Connected.Caching 2023-01-24 18:07:41 +01:00
Matija Koželj
be2134313a Updated nuget.config to include local source 2023-01-24 18:07:26 +01:00
Matija Koželj
4ba5b64f66 Fix ReturnValueBinder taking existing value from operation instead of entity 2023-01-24 17:53:49 +01:00
Matija Koželj
1195fa1b7e Fix type conversion in ReturnValueBinder 2023-01-24 17:48:13 +01:00
Matija Koželj
5f48a06413 Replace early returns with continues in ReturnValueBinder 2023-01-24 17:41:47 +01:00
Matija Koželj
38d8781734 Remove redundant operation parameter binding 2023-01-24 17:41:30 +01:00
Matija Koželj
ae0131086e Fix ReturnValueBinder iterating through Operation properties instead
of entity properties
2023-01-24 17:36:19 +01:00
Matija Koželj
57a4f2fb05 Rewrite ReturnValueBinder to properly bind return values 2023-01-24 17:30:16 +01:00
Matija Koželj
d92f0a6f82 Fix CommandBuilder not appending output parameters on cached command 2023-01-24 17:13:27 +01:00
Matija Koželj
ccd824dcc3 Fix EntityStorage parameter binding 2023-01-24 16:52:11 +01:00
Matija Koželj
339dc635e5 Add clone method to EntityExtensions 2023-01-24 16:48:25 +01:00
Matija Koželj
9209bada7a Fix cached command builder 2023-01-24 16:28:49 +01:00
Matija Koželj
5b0537a04a Pass base configuration to WebApplication Instance builder 2023-01-20 13:56:03 +01:00
Matija Koželj
8fe51a15d5 Add IConfiguration constructors to Storage and Endpoint configuration 2023-01-20 10:21:46 +01:00
Matija Koželj
d2d1f66cf6 [WIP] Switch configuration service to use standard configuration stores 2023-01-17 15:38:39 +01:00
31 changed files with 279 additions and 175 deletions

View File

@ -10,8 +10,8 @@
</packageRestore>
<packageSources>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
<add key="Local repository" value="%LOCAL_NUGET%" />
<add key="LocalNugetServer" value="%LOCAL_NUGET_SERVER%" />
<add key="Local file repository" value="%LOCAL_NUGET%" />
</packageSources>
<disabledPackageSources />
</configuration>

View File

@ -59,4 +59,9 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -58,4 +58,9 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -1,14 +1,16 @@
using Connected.Configuration.Authentication;
using Connected.Configuration.Endpoints;
using Microsoft.Extensions.Configuration;
namespace Connected.Configuration;
internal class ConfigurationService : IConfigurationService
{
public ConfigurationService()
public ConfigurationService(IConfiguration configuration)
{
Endpoint = new EndpointConfiguration();
Storage = new StorageConfiguration();
Endpoint = new EndpointConfiguration(configuration.GetSection("endpoint"));
Storage = new StorageConfiguration(configuration.GetSection("storage"));
}
public IEndpointConfiguration Endpoint { get; }

View File

@ -40,4 +40,9 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -1,19 +1,18 @@
using System.Collections.Immutable;
using Microsoft.Extensions.Configuration;
namespace Connected.Configuration
{
internal class DatabaseConfiguration : IDatabaseConfiguration
{
private List<string> _shards;
private readonly List<string> _shards;
public DatabaseConfiguration()
public DatabaseConfiguration(IConfiguration configuration)
{
/*
* TODO: read from config
*/
DefaultConnectionString = "server=PIT-ZBOOK\\sqlexpress; database=connected; trusted_connection=true;TrustServerCertificate=True;multiple active result sets=true";
DefaultConnectionString = "";
_shards = new();
configuration.Bind(this);
configuration.Bind("shards", _shards);
}
public string? DefaultConnectionString { get; init; }

View File

@ -1,7 +1,14 @@
namespace Connected.Configuration.Endpoints
using Microsoft.Extensions.Configuration;
namespace Connected.Configuration.Endpoints
{
internal sealed class EndpointConfiguration : IEndpointConfiguration
{
public EndpointConfiguration(IConfiguration configuration)
{
configuration.Bind(this);
}
public string? Address { get; set; }
}
}

View File

@ -4,7 +4,7 @@ namespace Connected.Configuration
{
public interface IDatabaseConfiguration
{
string DefaultConnectionString { get; }
string? DefaultConnectionString { get; }
ImmutableList<string> Shards { get; }
}

View File

@ -1,10 +1,12 @@
namespace Connected.Configuration
using Microsoft.Extensions.Configuration;
namespace Connected.Configuration
{
internal class StorageConfiguration : IStorageConfiguration
{
public StorageConfiguration()
public StorageConfiguration(IConfiguration configuration)
{
Databases = new DatabaseConfiguration();
Databases = new DatabaseConfiguration(configuration.GetSection("databases"));
}
public IDatabaseConfiguration Databases { get; }

View File

@ -62,4 +62,9 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -152,7 +152,11 @@ internal class EntityStorage<TEntity> : IAsyncEnumerable<TEntity>, IStorage<TEnt
await Execute(new StorageContextArgs(operation));
return entity;
var clone = entity.Clone();
ReturnValueBinder.Bind(operation, clone);
return clone;
}
/// <summary>
/// Performs the update on the specified entity with optional concurrency callback support.
@ -271,10 +275,6 @@ internal class EntityStorage<TEntity> : IAsyncEnumerable<TEntity>, IStorage<TEnt
*/
if (recordsAffected == 0 && args.Operation.Concurrency == DataConcurrencyMode.Enabled)
throw new DBConcurrencyException($"{SR.ErrDataConcurrency} ({typeof(Entity).Name})");
/*
* Bind storage parameters with operation parameters.
*/
ReturnValueBinder.Bind(writer, args.Operation);
return recordsAffected;
}

View File

@ -6,47 +6,36 @@ using Connected.Interop;
namespace Connected.Data.Storage
{
internal static class ReturnValueBinder
internal static class ReturnValueBinder
{
public static void Bind(IStorageWriter w, IStorageOperation operation)
public static void Bind(IStorageOperation operation, object entity)
{
List<PropertyInfo> properties = null;
if (w.Operation.Parameters is null)
if (operation is null || operation.Parameters is null)
return;
foreach (var parameter in w.Operation.Parameters)
foreach (var parameter in operation.Parameters)
{
if (parameter.Direction != ParameterDirection.ReturnValue && parameter.Direction != ParameterDirection.Output)
continue;
if (parameter.Value == DBNull.Value)
continue;
if (properties is null)
var properties = new List<PropertyInfo>();
var all = entity.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
foreach (var prop in all)
{
properties = new List<PropertyInfo>();
var all = operation.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
foreach (var prop in all)
{
if (prop.FindAttribute<ReturnValueAttribute>() is not null)
properties.Add(prop);
}
if (prop.FindAttribute<ReturnValueAttribute>() is not null)
properties.Add(prop);
}
PropertyInfo property = null;
PropertyInfo? property = null;
if (property is null)
foreach (var prop in properties)
{
foreach (var prop in properties)
if (string.Equals(prop.Name, parameter.Name, StringComparison.Ordinal))
{
if (string.Equals(prop.Name, parameter.Name, StringComparison.Ordinal))
{
property = prop;
break;
}
property = prop;
break;
}
}
@ -65,9 +54,9 @@ namespace Connected.Data.Storage
if (property is null)
{
var candidates = new List<string>
{
parameter.Name.Replace("@", string.Empty)
};
{
parameter.Name.Replace("@", string.Empty)
};
foreach (var prop in properties)
{
@ -85,26 +74,28 @@ namespace Connected.Data.Storage
}
}
if (property is not null)
if (property is null)
continue;
var existingValue = property.GetValue(entity);
var overwriteAtt = property.FindAttribute<ReturnValueAttribute>();
if (overwriteAtt is null)
continue;
switch (overwriteAtt.ValueBehavior)
{
var existingValue = property.GetValue(operation);
var overwriteAtt = property.FindAttribute<ReturnValueAttribute>();
case PropertyValueBehavior.OverwriteDefault:
var defaultValue = property.PropertyType.GetDefault();
switch (overwriteAtt.ValueBehavior)
{
case PropertyValueBehavior.OverwriteDefault:
var defaultValue = property.PropertyType.GetDefault();
if (Equals(existingValue, defaultValue))
property.SetValue(operation, parameter.Value);
break;
case PropertyValueBehavior.AlwaysOverwrite:
property.SetValue(operation, parameter.Value);
break;
}
if (Equals(existingValue, defaultValue))
property.SetValue(entity, TypeConversion.Convert(parameter.Value, property.PropertyType));
break;
case PropertyValueBehavior.AlwaysOverwrite:
property.SetValue(entity, TypeConversion.Convert(parameter.Value, property.PropertyType));
break;
}
}
}
}
}

View File

@ -28,10 +28,12 @@ internal abstract class CommandBuilder
if (TryGetExisting(out StorageOperation? existing))
{
if (existing is null)
return null;
/*
* We need to rebuild an instance since StorageOperation
* is immutable
*/
* We need to rebuild an instance since StorageOperation
* is immutable
*/
var result = new StorageOperation
{
CommandText = existing.CommandText,
@ -43,20 +45,21 @@ internal abstract class CommandBuilder
if (result.Parameters is null)
return result;
foreach (var parameter in result.Parameters)
foreach (var parameter in existing.Parameters)
{
if (parameter.Direction == ParameterDirection.Input)
if (ResolveProperty(parameter.Name) is PropertyInfo property)
{
if (ResolveProperty(parameter.Name) is PropertyInfo property)
result.AddParameter(new StorageParameter
{
result.AddParameter(new StorageParameter
Value = parameter.Direction switch
{
Value = GetValue(property),
Name = parameter.Name,
Type = parameter.Type,
Direction = parameter.Direction
});
}
ParameterDirection.Input => GetValue(property),
_ => default
},
Name = parameter.Name,
Type = parameter.Type,
Direction = parameter.Direction
});
}
}

View File

@ -10,118 +10,122 @@ using System.Collections.Immutable;
namespace Connected.Entities.Caching;
public abstract class EntityCacheClient<TEntity, TPrimaryKey> : StatefulCacheClient<TEntity, TPrimaryKey>, IEntityCacheClient<TEntity, TPrimaryKey>
where TEntity : class, IPrimaryKey<TPrimaryKey>, IEntity
where TPrimaryKey : notnull
where TEntity : class, IPrimaryKey<TPrimaryKey>, IEntity
where TPrimaryKey : notnull
{
protected EntityCacheClient(IEntityCacheContext context, string key) : base(context.Cache, key)
{
Context = context;
}
protected EntityCacheClient(IEntityCacheContext context, string key) : base(context.Cache, key)
{
Context = context;
}
private IEntityCacheContext Context { get; }
private IEntityCacheContext Context { get; }
protected override sealed async Task OnInitializing()
{
using var ctx = Context.ContextProvider.Create();
protected override sealed async Task OnInitializing()
{
using var ctx = Context.ContextProvider.Create();
var transaction = ctx.GetService<ITransactionContext?>();
var transaction = ctx.GetService<ITransactionContext?>();
try
{
if (await OnInitializing(ctx) is ImmutableList<TEntity> ds)
{
foreach (var r in ds)
Set(r.Id, r, TimeSpan.Zero);
}
try
{
if (await OnInitializing(ctx) is ImmutableList<TEntity> ds)
{
foreach (var r in ds)
Set(r.Id, r, TimeSpan.Zero);
}
if (transaction is not null)
await transaction.Commit();
}
catch
{
if (transaction is not null)
await transaction.Rollback();
if (transaction is not null)
await transaction.Commit();
}
catch
{
if (transaction is not null)
await transaction.Rollback();
throw;
}
}
throw;
}
}
protected virtual async Task<ImmutableList<TEntity>?> OnInitializing(IContext context)
{
if (context.GetService<IStorageProvider>() is not IStorageProvider db)
return default;
protected virtual async Task<ImmutableList<TEntity>?> OnInitializing(IContext context)
{
if (context.GetService<IStorageProvider>() is not IStorageProvider db)
return default;
return await (from dc in db.Open<TEntity>()
select dc).AsEntities();
}
return await (from dc in db.Open<TEntity>()
select dc).AsEntities();
}
protected override async Task OnInvalidate(TPrimaryKey id)
{
using var ctx = Context.ContextProvider.Create();
var transaction = ctx.GetService<ITransactionContext>();
protected override async Task OnInvalidate(TPrimaryKey id)
{
using var ctx = Context.ContextProvider.Create();
var transaction = ctx.GetService<ITransactionContext>();
try
{
if (OnInvalidating(ctx, id) is TEntity entity && entity is IPrimaryKey<TPrimaryKey> pk)
Set(pk.Id, entity, TimeSpan.Zero);
try
{
if (OnInvalidating(ctx, id) is TEntity entity && entity is IPrimaryKey<TPrimaryKey> pk)
Set(pk.Id, entity, TimeSpan.Zero);
if (transaction is not null)
await transaction.Commit();
}
catch
{
if (transaction is not null)
await transaction.Rollback();
if (transaction is not null)
await transaction.Commit();
}
catch
{
if (transaction is not null)
await transaction.Rollback();
throw;
}
}
throw;
}
}
protected virtual async Task<TEntity?> OnInvalidating(IContext context, TPrimaryKey id)
{
if (context.GetService<IStorageProvider>() is not IStorageProvider provider)
return default;
protected virtual async Task<TEntity?> OnInvalidating(IContext context, TPrimaryKey id)
{
if (context.GetService<IStorageProvider>() is not IStorageProvider provider)
return default;
return await (from dc in provider.Open<TEntity>()
where TypeComparer.Compare(dc.Id, id)
select dc).AsEntity();
}
var entities = await provider.Open<TEntity>().AsEntities();
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Refresh(TPrimaryKey id)
{
await Refresh(id);
}
var entity = entities.FirstOrDefault(e => e.Id.Equals(id));
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Remove(TPrimaryKey id)
{
await Remove(id);
}
return await (from dc in provider.Open<TEntity>()
where TypeComparer.Compare(dc.Id, id)
select dc).AsEntity();
}
protected override void Set(TPrimaryKey id, TEntity instance)
{
Set(id, instance, TimeSpan.Zero);
}
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Refresh(TPrimaryKey id)
{
await Refresh(id);
}
protected override void Set(TPrimaryKey id, TEntity instance, TimeSpan duration)
{
if (instance is IConcurrentEntity<TPrimaryKey> concurrent)
{
if (Get(id) is TEntity existing && existing is IConcurrentEntity<TPrimaryKey> existingConcurrent)
{
lock (existingConcurrent)
{
if (existingConcurrent.Sync != concurrent.Sync)
throw new InvalidOperationException(SR.ErrConcurrent);
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Remove(TPrimaryKey id)
{
await Remove(id);
}
concurrent.GetType().GetProperty(nameof(IConcurrentEntity<TPrimaryKey>.Sync))?.SetValue(concurrent, concurrent.Sync + 1);
protected override void Set(TPrimaryKey id, TEntity instance)
{
Set(id, instance, TimeSpan.Zero);
}
Set(id, instance, duration);
protected override void Set(TPrimaryKey id, TEntity instance, TimeSpan duration)
{
if (instance is IConcurrentEntity<TPrimaryKey> concurrent)
{
if (Get(id) is TEntity existing && existing is IConcurrentEntity<TPrimaryKey> existingConcurrent)
{
lock (existingConcurrent)
{
if (existingConcurrent.Sync != concurrent.Sync)
throw new InvalidOperationException(SR.ErrConcurrent);
return;
}
}
}
concurrent.GetType().GetProperty(nameof(IConcurrentEntity<TPrimaryKey>.Sync))?.SetValue(concurrent, concurrent.Sync + 1);
base.Set(id, instance, duration);
}
Set(id, instance, duration);
return;
}
}
}
base.Set(id, instance, duration);
}
}

View File

@ -56,4 +56,9 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -85,6 +85,14 @@ public static class EntitiesExtensions
return Serializer.Merge(newEntity, existing, modifier, new StateModifier { State = state }, sources);
}
public static TEntity Clone<TEntity>(this TEntity existing)
where TEntity : IEntity
{
var newEntity = Activator.CreateInstance<TEntity>();
return Serializer.Merge(newEntity, existing);
}
public static async Task<ImmutableList<TSource>> AsEntities<TSource>(this IQueryable<TSource> source, CancellationToken cancellationToken = default)
{
if (source is null)

View File

@ -42,4 +42,9 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -40,4 +40,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -56,4 +56,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -71,4 +71,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -13,7 +13,10 @@ namespace Connected.Instance
var options = new WebApplicationOptions();
config.Bind(options);
var builder = WebApplication.CreateBuilder(options);
var builder = WebApplication
.CreateBuilder(options);
builder.Configuration.AddConfiguration(config);
var startups = Assemblies.QueryImplementations<IStartup>();

View File

@ -55,4 +55,13 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -41,4 +41,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -61,4 +61,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -41,5 +41,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -61,4 +61,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -43,4 +43,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -58,5 +58,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -61,4 +61,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -55,4 +55,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>

View File

@ -56,4 +56,8 @@
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
</Target>
<Target Name="UploadLocalPackages" AfterTargets="CopyPackages" >
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).nupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
<Exec Command="dotnet nuget push -s LocalNugetServer $(OutputPath)..\$(PackageId).$(PackageVersion).snupkg --api-key $([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET_SERVER_TOKEN'))" IgnoreExitCode="true"></Exec>
</Target>
</Project>