Skip to content
Permalink
Browse files

Improved null check that also compile.

  • Loading branch information...
mawtex committed Sep 30, 2019
1 parent f9b0bd0 commit a5026f06cbc4d6057319df367ba4d19149cf1bb4
Showing with 4 additions and 1 deletion.
  1. +4 −1 Composite/C1Console/Actions/ActionLockingFacade.cs
@@ -416,7 +416,10 @@ private static string GetLockKey(EntityToken entityToken)
if (entityToken is DataEntityToken)
{
var dataEntityToken = entityToken as DataEntityToken;
lockKey = lockKey + (dataEntityToken.DataSourceId.LocaleScope ?? "").ToString();
if (dataEntityToken.DataSourceId != null && dataEntityToken.DataSourceId.LocaleScope != null)

This comment has been minimized.

Copy link
@burningice2866

burningice2866 Oct 2, 2019

Contributor

@mawtex Can be simplified to if (dataEntityToken.DataSourceId?.LocaleScope != null)

{
lockKey = lockKey + dataEntityToken.DataSourceId.LocaleScope.ToString();
}
}

return lockKey;

0 comments on commit a5026f0

Please sign in to comment.
You can’t perform that action at this time.