* rc20-alpah2 + empty Model set from Yavsc
This commit is contained in:
parent
b962d58ded
commit
8ee81e9357
6 changed files with 9 additions and 14 deletions
|
|
@ -11,16 +11,12 @@ namespace Yavsc.Models.Messaging
|
||||||
|
|
||||||
public class EstimationEvent: IEvent
|
public class EstimationEvent: IEvent
|
||||||
{
|
{
|
||||||
public EstimationEvent(ApplicationDbContext context, Estimate estimate, IStringLocalizer SR)
|
public EstimationEvent( Estimate estimate, IStringLocalizer SR)
|
||||||
{
|
{
|
||||||
Topic = "Estimation";
|
Topic = "Estimation";
|
||||||
Estimation = estimate;
|
Estimation = estimate;
|
||||||
perfer = context.Performers.Include(
|
perfer = estimate.Owner;
|
||||||
p=>p.Performer
|
|
||||||
).FirstOrDefault(
|
|
||||||
p => p.PerformerId == estimate.OwnerId
|
|
||||||
);
|
|
||||||
// Use estimate.OwnerId;
|
|
||||||
ProviderInfo = new ProviderClientInfo {
|
ProviderInfo = new ProviderClientInfo {
|
||||||
Rate = perfer.Rate,
|
Rate = perfer.Rate,
|
||||||
UserName = perfer.Performer.UserName,
|
UserName = perfer.Performer.UserName,
|
||||||
|
|
@ -52,7 +48,7 @@ namespace Yavsc.Models.Messaging
|
||||||
|
|
||||||
public string CreateBody()
|
public string CreateBody()
|
||||||
{
|
{
|
||||||
return string.Format(_localizer["EstimationMessageToClient"], perfer.Performer.UserName, this.Estimation.Bill.Addition());
|
return string.Format( _localizer["EstimationMessageToClient"], perfer.Performer.UserName, this.Estimation.Bill.Addition());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +125,7 @@ namespace Yavsc.ApiControllers
|
||||||
// Notify the client
|
// Notify the client
|
||||||
var locstr = _localizer["EstimationMessageToClient"];
|
var locstr = _localizer["EstimationMessageToClient"];
|
||||||
|
|
||||||
var yaev = new EstimationEvent(dbContext,estimate,_localizer);
|
var yaev = new EstimationEvent(estimate,_localizer);
|
||||||
|
|
||||||
var regids = estimate.Client.Devices.Select(d => d.GCMRegistrationId).ToArray();
|
var regids = estimate.Client.Devices.Select(d => d.GCMRegistrationId).ToArray();
|
||||||
bool gcmSent = false;
|
bool gcmSent = false;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ namespace Yavsc.Models.Access
|
||||||
|
|
||||||
}
|
}
|
||||||
// Abstract method to compute any authorization on a resource
|
// Abstract method to compute any authorization on a resource
|
||||||
public abstract bool Allow(ApplicationDbContext context, string userId, TResource resource, TRequirement requirement);
|
public abstract bool Allow(string userId, TResource resource, TRequirement requirement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ namespace Yavsc.Models.Access
|
||||||
{
|
{
|
||||||
public abstract class RuleSet <TResource,TRequirement>:List<Rule<TResource,TRequirement>> {
|
public abstract class RuleSet <TResource,TRequirement>:List<Rule<TResource,TRequirement>> {
|
||||||
|
|
||||||
public abstract bool Allow(ApplicationDbContext context, string userId, TResource resource, TRequirement requirement);
|
public abstract bool Allow(string userId, TResource resource, TRequirement requirement);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="Yavsc.Abstract" version="$version$"></dependency>
|
<dependency id="Yavsc.Abstract" version="$version$"></dependency>
|
||||||
<dependency id="Yavsc.Server" version="$version$"></dependency>
|
<dependency id="Yavsc.Server" version="$version$"></dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
<file src="bin/$config$/dnx451/Yavsc.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" />
|
<file src="bin/$config$/dnx451/Yavsc.dll" target="lib/portable-net45+win8+wp8+wpa81+Xamarin.Mac+MonoAndroid10+MonoTouch10+Xamarin.iOS10" />
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
20-alpha2
|
20-alpha3
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue