Compare commits
No commits in common. "c53cbe009668f81c53900b93c45c8747dce78f9f" and "c9bb863108617dbb733132d94e0220dd20a065f0" have entirely different histories.
c53cbe0096
...
c9bb863108
@ -10,8 +10,8 @@
|
|||||||
</packageRestore>
|
</packageRestore>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
|
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
|
||||||
<add key="LocalNugetServer" value="%LOCAL_NUGET_SERVER%" />
|
<add key="Local repository" value="%LOCAL_NUGET%" />
|
||||||
<add key="Local file repository" value="%LOCAL_NUGET%" />
|
|
||||||
</packageSources>
|
</packageSources>
|
||||||
|
|
||||||
<disabledPackageSources />
|
<disabledPackageSources />
|
||||||
</configuration>
|
</configuration>
|
@ -59,9 +59,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -58,9 +58,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
using Connected.Configuration.Authentication;
|
using Connected.Configuration.Authentication;
|
||||||
using Connected.Configuration.Endpoints;
|
using Connected.Configuration.Endpoints;
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
|
|
||||||
namespace Connected.Configuration;
|
namespace Connected.Configuration;
|
||||||
|
|
||||||
internal class ConfigurationService : IConfigurationService
|
internal class ConfigurationService : IConfigurationService
|
||||||
{
|
{
|
||||||
public ConfigurationService(IConfiguration configuration)
|
public ConfigurationService()
|
||||||
{
|
{
|
||||||
Endpoint = new EndpointConfiguration(configuration.GetSection("endpoint"));
|
Endpoint = new EndpointConfiguration();
|
||||||
|
Storage = new StorageConfiguration();
|
||||||
Storage = new StorageConfiguration(configuration.GetSection("storage"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEndpointConfiguration Endpoint { get; }
|
public IEndpointConfiguration Endpoint { get; }
|
||||||
|
@ -40,9 +40,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
|
|
||||||
namespace Connected.Configuration
|
namespace Connected.Configuration
|
||||||
{
|
{
|
||||||
internal class DatabaseConfiguration : IDatabaseConfiguration
|
internal class DatabaseConfiguration : IDatabaseConfiguration
|
||||||
{
|
{
|
||||||
private readonly List<string> _shards;
|
private List<string> _shards;
|
||||||
|
|
||||||
public DatabaseConfiguration(IConfiguration configuration)
|
public DatabaseConfiguration()
|
||||||
{
|
{
|
||||||
DefaultConnectionString = "";
|
/*
|
||||||
|
* TODO: read from config
|
||||||
|
*/
|
||||||
|
DefaultConnectionString = "server=PIT-ZBOOK\\sqlexpress; database=connected; trusted_connection=true;TrustServerCertificate=True;multiple active result sets=true";
|
||||||
|
|
||||||
_shards = new();
|
_shards = new();
|
||||||
configuration.Bind(this);
|
|
||||||
configuration.Bind("shards", _shards);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string? DefaultConnectionString { get; init; }
|
public string? DefaultConnectionString { get; init; }
|
||||||
|
@ -1,14 +1,7 @@
|
|||||||
using Microsoft.Extensions.Configuration;
|
namespace Connected.Configuration.Endpoints
|
||||||
|
|
||||||
namespace Connected.Configuration.Endpoints
|
|
||||||
{
|
{
|
||||||
internal sealed class EndpointConfiguration : IEndpointConfiguration
|
internal sealed class EndpointConfiguration : IEndpointConfiguration
|
||||||
{
|
{
|
||||||
public EndpointConfiguration(IConfiguration configuration)
|
|
||||||
{
|
|
||||||
configuration.Bind(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string? Address { get; set; }
|
public string? Address { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ namespace Connected.Configuration
|
|||||||
{
|
{
|
||||||
public interface IDatabaseConfiguration
|
public interface IDatabaseConfiguration
|
||||||
{
|
{
|
||||||
string? DefaultConnectionString { get; }
|
string DefaultConnectionString { get; }
|
||||||
|
|
||||||
ImmutableList<string> Shards { get; }
|
ImmutableList<string> Shards { get; }
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
using Microsoft.Extensions.Configuration;
|
namespace Connected.Configuration
|
||||||
|
|
||||||
namespace Connected.Configuration
|
|
||||||
{
|
{
|
||||||
internal class StorageConfiguration : IStorageConfiguration
|
internal class StorageConfiguration : IStorageConfiguration
|
||||||
{
|
{
|
||||||
public StorageConfiguration(IConfiguration configuration)
|
public StorageConfiguration()
|
||||||
{
|
{
|
||||||
Databases = new DatabaseConfiguration(configuration.GetSection("databases"));
|
Databases = new DatabaseConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IDatabaseConfiguration Databases { get; }
|
public IDatabaseConfiguration Databases { get; }
|
||||||
|
@ -62,9 +62,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -152,11 +152,7 @@ internal class EntityStorage<TEntity> : IAsyncEnumerable<TEntity>, IStorage<TEnt
|
|||||||
|
|
||||||
await Execute(new StorageContextArgs(operation));
|
await Execute(new StorageContextArgs(operation));
|
||||||
|
|
||||||
var clone = entity.Clone();
|
return entity;
|
||||||
|
|
||||||
ReturnValueBinder.Bind(operation, clone);
|
|
||||||
|
|
||||||
return clone;
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Performs the update on the specified entity with optional concurrency callback support.
|
/// Performs the update on the specified entity with optional concurrency callback support.
|
||||||
@ -275,6 +271,10 @@ internal class EntityStorage<TEntity> : IAsyncEnumerable<TEntity>, IStorage<TEnt
|
|||||||
*/
|
*/
|
||||||
if (recordsAffected == 0 && args.Operation.Concurrency == DataConcurrencyMode.Enabled)
|
if (recordsAffected == 0 && args.Operation.Concurrency == DataConcurrencyMode.Enabled)
|
||||||
throw new DBConcurrencyException($"{SR.ErrDataConcurrency} ({typeof(Entity).Name})");
|
throw new DBConcurrencyException($"{SR.ErrDataConcurrency} ({typeof(Entity).Name})");
|
||||||
|
/*
|
||||||
|
* Bind storage parameters with operation parameters.
|
||||||
|
*/
|
||||||
|
ReturnValueBinder.Bind(writer, args.Operation);
|
||||||
|
|
||||||
return recordsAffected;
|
return recordsAffected;
|
||||||
}
|
}
|
||||||
|
@ -6,36 +6,47 @@ using Connected.Interop;
|
|||||||
|
|
||||||
namespace Connected.Data.Storage
|
namespace Connected.Data.Storage
|
||||||
{
|
{
|
||||||
internal static class ReturnValueBinder
|
internal static class ReturnValueBinder
|
||||||
{
|
{
|
||||||
public static void Bind(IStorageOperation operation, object entity)
|
public static void Bind(IStorageWriter w, IStorageOperation operation)
|
||||||
{
|
{
|
||||||
if (operation is null || operation.Parameters is null)
|
List<PropertyInfo> properties = null;
|
||||||
|
|
||||||
|
if (w.Operation.Parameters is null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (var parameter in operation.Parameters)
|
foreach (var parameter in w.Operation.Parameters)
|
||||||
{
|
{
|
||||||
|
if (parameter.Direction != ParameterDirection.ReturnValue && parameter.Direction != ParameterDirection.Output)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (parameter.Value == DBNull.Value)
|
if (parameter.Value == DBNull.Value)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var properties = new List<PropertyInfo>();
|
if (properties is null)
|
||||||
|
|
||||||
var all = entity.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance);
|
|
||||||
|
|
||||||
foreach (var prop in all)
|
|
||||||
{
|
{
|
||||||
if (prop.FindAttribute<ReturnValueAttribute>() is not null)
|
properties = new List<PropertyInfo>();
|
||||||
properties.Add(prop);
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyInfo? property = null;
|
PropertyInfo property = null;
|
||||||
|
|
||||||
foreach (var prop in properties)
|
if (property is null)
|
||||||
{
|
{
|
||||||
if (string.Equals(prop.Name, parameter.Name, StringComparison.Ordinal))
|
foreach (var prop in properties)
|
||||||
{
|
{
|
||||||
property = prop;
|
if (string.Equals(prop.Name, parameter.Name, StringComparison.Ordinal))
|
||||||
break;
|
{
|
||||||
|
property = prop;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,9 +65,9 @@ namespace Connected.Data.Storage
|
|||||||
if (property is null)
|
if (property is null)
|
||||||
{
|
{
|
||||||
var candidates = new List<string>
|
var candidates = new List<string>
|
||||||
{
|
{
|
||||||
parameter.Name.Replace("@", string.Empty)
|
parameter.Name.Replace("@", string.Empty)
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var prop in properties)
|
foreach (var prop in properties)
|
||||||
{
|
{
|
||||||
@ -74,28 +85,26 @@ namespace Connected.Data.Storage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (property is null)
|
if (property is not null)
|
||||||
continue;
|
|
||||||
|
|
||||||
var existingValue = property.GetValue(entity);
|
|
||||||
var overwriteAtt = property.FindAttribute<ReturnValueAttribute>();
|
|
||||||
|
|
||||||
if (overwriteAtt is null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
switch (overwriteAtt.ValueBehavior)
|
|
||||||
{
|
{
|
||||||
case PropertyValueBehavior.OverwriteDefault:
|
var existingValue = property.GetValue(operation);
|
||||||
var defaultValue = property.PropertyType.GetDefault();
|
var overwriteAtt = property.FindAttribute<ReturnValueAttribute>();
|
||||||
|
|
||||||
if (Equals(existingValue, defaultValue))
|
switch (overwriteAtt.ValueBehavior)
|
||||||
property.SetValue(entity, TypeConversion.Convert(parameter.Value, property.PropertyType));
|
{
|
||||||
break;
|
case PropertyValueBehavior.OverwriteDefault:
|
||||||
case PropertyValueBehavior.AlwaysOverwrite:
|
var defaultValue = property.PropertyType.GetDefault();
|
||||||
property.SetValue(entity, TypeConversion.Convert(parameter.Value, property.PropertyType));
|
|
||||||
break;
|
if (Equals(existingValue, defaultValue))
|
||||||
|
property.SetValue(operation, parameter.Value);
|
||||||
|
break;
|
||||||
|
case PropertyValueBehavior.AlwaysOverwrite:
|
||||||
|
property.SetValue(operation, parameter.Value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,12 +28,10 @@ internal abstract class CommandBuilder
|
|||||||
|
|
||||||
if (TryGetExisting(out StorageOperation? existing))
|
if (TryGetExisting(out StorageOperation? existing))
|
||||||
{
|
{
|
||||||
if (existing is null)
|
|
||||||
return null;
|
|
||||||
/*
|
/*
|
||||||
* We need to rebuild an instance since StorageOperation
|
* We need to rebuild an instance since StorageOperation
|
||||||
* is immutable
|
* is immutable
|
||||||
*/
|
*/
|
||||||
var result = new StorageOperation
|
var result = new StorageOperation
|
||||||
{
|
{
|
||||||
CommandText = existing.CommandText,
|
CommandText = existing.CommandText,
|
||||||
@ -45,21 +43,20 @@ internal abstract class CommandBuilder
|
|||||||
if (result.Parameters is null)
|
if (result.Parameters is null)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
foreach (var parameter in existing.Parameters)
|
foreach (var parameter in result.Parameters)
|
||||||
{
|
{
|
||||||
if (ResolveProperty(parameter.Name) is PropertyInfo property)
|
if (parameter.Direction == ParameterDirection.Input)
|
||||||
{
|
{
|
||||||
result.AddParameter(new StorageParameter
|
if (ResolveProperty(parameter.Name) is PropertyInfo property)
|
||||||
{
|
{
|
||||||
Value = parameter.Direction switch
|
result.AddParameter(new StorageParameter
|
||||||
{
|
{
|
||||||
ParameterDirection.Input => GetValue(property),
|
Value = GetValue(property),
|
||||||
_ => default
|
Name = parameter.Name,
|
||||||
},
|
Type = parameter.Type,
|
||||||
Name = parameter.Name,
|
Direction = parameter.Direction
|
||||||
Type = parameter.Type,
|
});
|
||||||
Direction = parameter.Direction
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,122 +10,118 @@ using System.Collections.Immutable;
|
|||||||
namespace Connected.Entities.Caching;
|
namespace Connected.Entities.Caching;
|
||||||
|
|
||||||
public abstract class EntityCacheClient<TEntity, TPrimaryKey> : StatefulCacheClient<TEntity, TPrimaryKey>, IEntityCacheClient<TEntity, TPrimaryKey>
|
public abstract class EntityCacheClient<TEntity, TPrimaryKey> : StatefulCacheClient<TEntity, TPrimaryKey>, IEntityCacheClient<TEntity, TPrimaryKey>
|
||||||
where TEntity : class, IPrimaryKey<TPrimaryKey>, IEntity
|
where TEntity : class, IPrimaryKey<TPrimaryKey>, IEntity
|
||||||
where TPrimaryKey : notnull
|
where TPrimaryKey : notnull
|
||||||
{
|
{
|
||||||
protected EntityCacheClient(IEntityCacheContext context, string key) : base(context.Cache, key)
|
protected EntityCacheClient(IEntityCacheContext context, string key) : base(context.Cache, key)
|
||||||
{
|
{
|
||||||
Context = context;
|
Context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEntityCacheContext Context { get; }
|
private IEntityCacheContext Context { get; }
|
||||||
|
|
||||||
protected override sealed async Task OnInitializing()
|
protected override sealed async Task OnInitializing()
|
||||||
{
|
{
|
||||||
using var ctx = Context.ContextProvider.Create();
|
using var ctx = Context.ContextProvider.Create();
|
||||||
|
|
||||||
var transaction = ctx.GetService<ITransactionContext?>();
|
var transaction = ctx.GetService<ITransactionContext?>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (await OnInitializing(ctx) is ImmutableList<TEntity> ds)
|
if (await OnInitializing(ctx) is ImmutableList<TEntity> ds)
|
||||||
{
|
{
|
||||||
foreach (var r in ds)
|
foreach (var r in ds)
|
||||||
Set(r.Id, r, TimeSpan.Zero);
|
Set(r.Id, r, TimeSpan.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transaction is not null)
|
if (transaction is not null)
|
||||||
await transaction.Commit();
|
await transaction.Commit();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (transaction is not null)
|
if (transaction is not null)
|
||||||
await transaction.Rollback();
|
await transaction.Rollback();
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual async Task<ImmutableList<TEntity>?> OnInitializing(IContext context)
|
protected virtual async Task<ImmutableList<TEntity>?> OnInitializing(IContext context)
|
||||||
{
|
{
|
||||||
if (context.GetService<IStorageProvider>() is not IStorageProvider db)
|
if (context.GetService<IStorageProvider>() is not IStorageProvider db)
|
||||||
return default;
|
return default;
|
||||||
|
|
||||||
return await (from dc in db.Open<TEntity>()
|
return await (from dc in db.Open<TEntity>()
|
||||||
select dc).AsEntities();
|
select dc).AsEntities();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnInvalidate(TPrimaryKey id)
|
protected override async Task OnInvalidate(TPrimaryKey id)
|
||||||
{
|
{
|
||||||
using var ctx = Context.ContextProvider.Create();
|
using var ctx = Context.ContextProvider.Create();
|
||||||
var transaction = ctx.GetService<ITransactionContext>();
|
var transaction = ctx.GetService<ITransactionContext>();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (OnInvalidating(ctx, id) is TEntity entity && entity is IPrimaryKey<TPrimaryKey> pk)
|
if (OnInvalidating(ctx, id) is TEntity entity && entity is IPrimaryKey<TPrimaryKey> pk)
|
||||||
Set(pk.Id, entity, TimeSpan.Zero);
|
Set(pk.Id, entity, TimeSpan.Zero);
|
||||||
|
|
||||||
if (transaction is not null)
|
if (transaction is not null)
|
||||||
await transaction.Commit();
|
await transaction.Commit();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
if (transaction is not null)
|
if (transaction is not null)
|
||||||
await transaction.Rollback();
|
await transaction.Rollback();
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual async Task<TEntity?> OnInvalidating(IContext context, TPrimaryKey id)
|
protected virtual async Task<TEntity?> OnInvalidating(IContext context, TPrimaryKey id)
|
||||||
{
|
{
|
||||||
if (context.GetService<IStorageProvider>() is not IStorageProvider provider)
|
if (context.GetService<IStorageProvider>() is not IStorageProvider provider)
|
||||||
return default;
|
return default;
|
||||||
|
|
||||||
var entities = await provider.Open<TEntity>().AsEntities();
|
return await (from dc in provider.Open<TEntity>()
|
||||||
|
where TypeComparer.Compare(dc.Id, id)
|
||||||
|
select dc).AsEntity();
|
||||||
|
}
|
||||||
|
|
||||||
var entity = entities.FirstOrDefault(e => e.Id.Equals(id));
|
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Refresh(TPrimaryKey id)
|
||||||
|
{
|
||||||
|
await Refresh(id);
|
||||||
|
}
|
||||||
|
|
||||||
return await (from dc in provider.Open<TEntity>()
|
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Remove(TPrimaryKey id)
|
||||||
where TypeComparer.Compare(dc.Id, id)
|
{
|
||||||
select dc).AsEntity();
|
await Remove(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Refresh(TPrimaryKey id)
|
protected override void Set(TPrimaryKey id, TEntity instance)
|
||||||
{
|
{
|
||||||
await Refresh(id);
|
Set(id, instance, TimeSpan.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
async Task IEntityCacheClient<TEntity, TPrimaryKey>.Remove(TPrimaryKey id)
|
protected override void Set(TPrimaryKey id, TEntity instance, TimeSpan duration)
|
||||||
{
|
{
|
||||||
await Remove(id);
|
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);
|
||||||
|
|
||||||
protected override void Set(TPrimaryKey id, TEntity instance)
|
concurrent.GetType().GetProperty(nameof(IConcurrentEntity<TPrimaryKey>.Sync))?.SetValue(concurrent, concurrent.Sync + 1);
|
||||||
{
|
|
||||||
Set(id, instance, TimeSpan.Zero);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Set(TPrimaryKey id, TEntity instance, TimeSpan duration)
|
Set(id, instance, 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);
|
|
||||||
|
|
||||||
concurrent.GetType().GetProperty(nameof(IConcurrentEntity<TPrimaryKey>.Sync))?.SetValue(concurrent, concurrent.Sync + 1);
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Set(id, instance, duration);
|
base.Set(id, instance, duration);
|
||||||
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Set(id, instance, duration);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -56,9 +56,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -85,14 +85,6 @@ public static class EntitiesExtensions
|
|||||||
return Serializer.Merge(newEntity, existing, modifier, new StateModifier { State = state }, sources);
|
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)
|
public static async Task<ImmutableList<TSource>> AsEntities<TSource>(this IQueryable<TSource> source, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
if (source is null)
|
if (source is null)
|
||||||
|
@ -42,9 +42,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -40,8 +40,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -56,8 +56,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -71,8 +71,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -13,10 +13,7 @@ namespace Connected.Instance
|
|||||||
var options = new WebApplicationOptions();
|
var options = new WebApplicationOptions();
|
||||||
config.Bind(options);
|
config.Bind(options);
|
||||||
|
|
||||||
var builder = WebApplication
|
var builder = WebApplication.CreateBuilder(options);
|
||||||
.CreateBuilder(options);
|
|
||||||
|
|
||||||
builder.Configuration.AddConfiguration(config);
|
|
||||||
|
|
||||||
var startups = Assemblies.QueryImplementations<IStartup>();
|
var startups = Assemblies.QueryImplementations<IStartup>();
|
||||||
|
|
||||||
|
@ -55,13 +55,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -41,8 +41,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -61,8 +61,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -41,8 +41,5 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -61,8 +61,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -43,8 +43,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -58,8 +58,5 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -61,8 +61,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -55,8 +55,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
@ -56,8 +56,4 @@
|
|||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
<Copy SourceFiles="$(OutputPath)..\$(PackageId).$(PackageVersion).snupkg" DestinationFolder="$([System.Environment]::GetEnvironmentVariable('LOCAL_NUGET'))" />
|
||||||
</Target>
|
</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>
|
</Project>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user