private void SetupClass()
        {
            Ctx.CurrentDeclaration.IsPartial = false;
            Ctx.CurrentDeclaration.Name      = string.Format("{0}Check{1}Action", Ctx.Data.Node.Name.AsViewModel(), Ctx.Data.Name);

            Ctx.AddAttribute(typeof(CategoryAttribute), string.Format("\"ViewModels/{0}\"", ContainerName.AsViewModel()));
            Ctx.AddAttribute(typeof(NameAttribute), string.Format("\"Check {0}\"", Ctx.Data.Name));
            Ctx.AddAttribute(typeof(RequireComponent), "typeof(ViewBase)");

            var codeType = new CodeTypeOfExpression("ViewBase");

            Ctx.CurrentDeclaration.CustomAttributes.Add(new CodeAttributeDeclaration("AgentType", new CodeAttributeArgument(codeType)));
            Ctx.SetBaseType(typeof(ConditionTask));
        }
Пример #2
0
        private void SetupClass()
        {
            Ctx.CurrentDeclaration.IsPartial = false;
            Ctx.CurrentDeclaration.Name      = string.Format("{0}Get{1}CurrentStateAction", Ctx.Data.Node.Name.AsViewModel(), Ctx.Data.Name);

            Ctx.AddAttribute(typeof(CategoryAttribute), string.Format("\"ViewModels/{0}\"", Ctx.Data.Node.Name.AsViewModel()));
            Ctx.AddAttribute(typeof(NameAttribute), string.Format("\"Get {0}s Current State\"", Ctx.Data.Name));

            var codeType = new CodeTypeOfExpression("ViewBase");

            Ctx.CurrentDeclaration.CustomAttributes.Add(new CodeAttributeDeclaration("AgentType", new CodeAttributeArgument(codeType)));

            Ctx.SetBaseType(typeof(ActionTask));
        }