Apply Fix on Base Entity Hub Class ...
This commit is contained in:
+56
-7
@@ -30,7 +30,14 @@ namespace xPushService.Base
|
|||||||
var connectionId = Context.ConnectionId;
|
var connectionId = Context.ConnectionId;
|
||||||
if (!connectionId.IsNullOrEmpty())
|
if (!connectionId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Clients.AllExcept(connectionId).SendAsync(XBaseEntityHubAction.Add.GetStringValue(), entity, connectionId);
|
//
|
||||||
|
await Clients
|
||||||
|
.AllExcept(connectionId)
|
||||||
|
.SendAsync(
|
||||||
|
XBaseEntityHubAction.Add.GetStringValue(),
|
||||||
|
entity.ToJSON(),
|
||||||
|
connectionId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,7 +52,14 @@ namespace xPushService.Base
|
|||||||
var connectionId = Context.ConnectionId;
|
var connectionId = Context.ConnectionId;
|
||||||
if (!connectionId.IsNullOrEmpty())
|
if (!connectionId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Clients.AllExcept(connectionId).SendAsync(XBaseEntityHubAction.AddOrUpdate.GetStringValue(), entity, connectionId);
|
//
|
||||||
|
await Clients
|
||||||
|
.AllExcept(connectionId)
|
||||||
|
.SendAsync(
|
||||||
|
XBaseEntityHubAction.AddOrUpdate.GetStringValue(),
|
||||||
|
entity.ToJSON(),
|
||||||
|
connectionId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +74,14 @@ namespace xPushService.Base
|
|||||||
var connectionId = Context.ConnectionId;
|
var connectionId = Context.ConnectionId;
|
||||||
if (!connectionId.IsNullOrEmpty())
|
if (!connectionId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Clients.AllExcept(connectionId).SendAsync(XBaseEntityHubAction.AddOrUpdate.GetStringValue(), entities.ToJSON(), connectionId);
|
//
|
||||||
|
await Clients
|
||||||
|
.AllExcept(connectionId)
|
||||||
|
.SendAsync(
|
||||||
|
XBaseEntityHubAction.AddOrUpdate.GetStringValue(),
|
||||||
|
entities.ToJSON(),
|
||||||
|
connectionId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,7 +96,14 @@ namespace xPushService.Base
|
|||||||
var connectionId = Context.ConnectionId;
|
var connectionId = Context.ConnectionId;
|
||||||
if (!connectionId.IsNullOrEmpty())
|
if (!connectionId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Clients.AllExcept(connectionId).SendAsync(XBaseEntityHubAction.Delete.GetStringValue(), entity, connectionId);
|
//
|
||||||
|
await Clients
|
||||||
|
.AllExcept(connectionId)
|
||||||
|
.SendAsync(
|
||||||
|
XBaseEntityHubAction.Delete.GetStringValue(),
|
||||||
|
entity.ToJSON(),
|
||||||
|
connectionId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +118,14 @@ namespace xPushService.Base
|
|||||||
var connectionId = Context.ConnectionId;
|
var connectionId = Context.ConnectionId;
|
||||||
if (!connectionId.IsNullOrEmpty())
|
if (!connectionId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Clients.AllExcept(connectionId).SendAsync(XBaseEntityHubAction.DeleteMany.GetStringValue(), entities.ToJSON(), connectionId);
|
//
|
||||||
|
await Clients
|
||||||
|
.AllExcept(connectionId)
|
||||||
|
.SendAsync(
|
||||||
|
XBaseEntityHubAction.DeleteMany.GetStringValue(),
|
||||||
|
entities.ToJSON(),
|
||||||
|
connectionId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +140,14 @@ namespace xPushService.Base
|
|||||||
var connectionId = Context.ConnectionId;
|
var connectionId = Context.ConnectionId;
|
||||||
if (!connectionId.IsNullOrEmpty())
|
if (!connectionId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Clients.AllExcept(connectionId).SendAsync(XBaseEntityHubAction.Update.GetStringValue(), entity, connectionId);
|
//
|
||||||
|
await Clients
|
||||||
|
.AllExcept(connectionId)
|
||||||
|
.SendAsync(
|
||||||
|
XBaseEntityHubAction.Update.GetStringValue(),
|
||||||
|
entity.ToJSON(),
|
||||||
|
connectionId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +162,14 @@ namespace xPushService.Base
|
|||||||
var connectionId = Context.ConnectionId;
|
var connectionId = Context.ConnectionId;
|
||||||
if (!connectionId.IsNullOrEmpty())
|
if (!connectionId.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
await Clients.AllExcept(connectionId).SendAsync(XBaseEntityHubAction.UpdateMany.GetStringValue(), entities.ToJSON(), connectionId);
|
//
|
||||||
|
await Clients
|
||||||
|
.AllExcept(connectionId)
|
||||||
|
.SendAsync(
|
||||||
|
XBaseEntityHubAction.UpdateMany.GetStringValue(),
|
||||||
|
entities.ToJSON(),
|
||||||
|
connectionId
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user