Beispiel #1
0
 private void LoadDependencies(CodeGenerationParameter aggregate, bool useCQRS)
 {
     if (useCQRS)
     {
         aggregate.Relate(RouteDetail.DefaultQueryRouteParameter(aggregate));
     }
     this.DependOn(AutoDispatchRouteTemplateData.From(aggregate.RetrieveAllRelated(Label.RouteSignature)));
 }
Beispiel #2
0
        private static void InferModelParameters(CodeGenerationParameter aggregateParameter, List <ContentBase> contents)
        {
            var modelActor = new TemplateStandard(TemplateStandardType.Aggregate).ResolveClassname(aggregateParameter.value);
            var modelProtocolQualifiedName = ContentQuery.FindFullyQualifiedClassName(new TemplateStandard(TemplateStandardType.AggregateProtocol), aggregateParameter.value, contents);
            var modelActorQualifiedName    = ContentQuery.FindFullyQualifiedClassName(new TemplateStandard(TemplateStandardType.Aggregate), modelActor, contents);

            aggregateParameter.Relate(Label.ModelProtocol, modelProtocolQualifiedName).Relate(Label.ModelActor, modelActorQualifiedName);
        }