/// <summary> The try assert. </summary> /// <param name="context"> The context. </param> /// <param name="entityReference"> The entity reference. </param> /// <param name="right"> The right. </param> /// <param name="dependencies"> The dependencies. </param> /// <returns> The assertion. </returns> public bool TryAssert(OrganizationServiceContext context, EntityReference entityReference, CrmEntityRight right, CrmEntityCacheDependencyTrace dependencies) { EntityNode entity = null; this.ContentMapProvider.Using(map => map.TryGetValue(entityReference, out entity)); return(entity != null && this.TryAssert(context, entity.ToEntity(), right, dependencies)); }
public static Entity AttachTo(this EntityNode node, OrganizationServiceContext context, bool includeRelatedEntities = false) { if (node == null) { return(null); } return(MergeClone(context, node.ToEntity(), includeRelatedEntities)); }
private bool TryAssertSecurity(EntityNode node, CrmEntityRight right) { return(TryAssertSecurity(node.ToEntity(), right)); }