예제 #1
0
        private void ApplyReferenceHierarchy(TBuilderContext builderContext, CompositeDefinitionProcessorContext processorContext)
        {
            if (processorContext.ShouldUseReferenceHierarchy())
            {
                string referenceName = processorContext.AttributeValue(CompositeDefinitionHelper.HierarchicalReferenceName);

                var referencedResourceClass = processorContext.CurrentResourceClass.ReferenceByName[referenceName]
                                              .ReferencedResource;

                _compositeBuilder.ApplySelfReferencingProperties(
                    referencedResourceClass.Entity.SelfReferencingAssociations,
                    builderContext,
                    processorContext);
            }
        }
 /// <summary>
 /// Applies properties necessary to support self-referencing association behavior.
 /// </summary>
 /// <param name="selfReferencingAssociations">The relevant self-referencing associations.</param>
 /// <param name="builderContext">The current builder context.</param>
 /// <param name="processorContext">The composite definition processor context.</param>
 /// <remarks>The associations supplied may not be from the current resource class.  In cases where the self-referencing
 /// behavior is obtained through a referenced resource, the associations will be from the referenced resource.</remarks>
 public void ApplySelfReferencingProperties(
     IReadOnlyList <AssociationView> selfReferencingAssociations,
     HqlBuilderContext builderContext,
     CompositeDefinitionProcessorContext processorContext)
 {
     _next.ApplySelfReferencingProperties(selfReferencingAssociations, builderContext, processorContext);
 }