public void SetComposite(long association, object cacheId, IRoleType roleType, long?role) { if (!this.cachedCompositeRoleByAssociationByRoleType.TryGetValue(roleType, out var entryByAssociation)) { entryByAssociation = new Dictionary <long, CachedCompositeRole>(); this.cachedCompositeRoleByAssociationByRoleType[roleType] = entryByAssociation; } entryByAssociation[association] = new CachedCompositeRole(cacheId, role); }
public void SetComposite(ObjectId association, object cacheId, IRoleType roleType, ObjectId role) { Dictionary<ObjectId, CachedCompositeRole> entryByAssociation; if (!this.cachedCompositeRoleByAssociationByRoleType.TryGetValue(roleType, out entryByAssociation)) { entryByAssociation = new Dictionary<ObjectId, CachedCompositeRole>(); this.cachedCompositeRoleByAssociationByRoleType[roleType] = entryByAssociation; } entryByAssociation[association] = new CachedCompositeRole(cacheId, role); }