public static IHandlerInvocationResolver With(CodeGenerationParameter parentParameter)
 {
     if (parentParameter.IsLabeled(Label.AutoDispatchName))
     {
         return(new AutoDispatchHandlerInvocationResolver());
     }
     return(new DefaultHandlerInvocationResolver());
 }
Exemplo n.º 2
0
        private string ResolveModelAttributeName(CodeGenerationParameter mainParameter, Label protocolLabel)
        {
            if (mainParameter.IsLabeled(Label.Aggregate))
            {
                return(ClassFormatter.SimpleNameToAttribute(mainParameter.value));
            }
            var qualifiedName = mainParameter.RetrieveRelatedValue(protocolLabel);

            return(ClassFormatter.QualifiedNameToAttribute(qualifiedName));
        }
 private Label ResolveFieldsLabel(CodeGenerationParameter parameter) => parameter.IsLabeled(Label.Aggregate) ? Label.StateField : Label.MethodParameter;