Пример #1
0
        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);
        }
Пример #2
0
        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);
        }