Ejemplo n.º 1
0
        protected override void SaveCompiled()
        {
            var finalOutput = CodeBuilder.RemoveHighlights(output);

            finalOutput = CodeBuilder.RemoveMarkdown(finalOutput);
            ClassExtensions.Save(guid, decorated, finalOutput);
        }
Ejemplo n.º 2
0
        protected override void SaveLive()
        {
            var finalOutput = CodeBuilder.RemoveHighlights(output);

            finalOutput = CodeBuilder.RemoveMarkdown(finalOutput);
            ClassExtensions.Save(guid, decorated, finalOutput, (type) => { decorated.inheritance.compiledName = type; });
        }
Ejemplo n.º 3
0
        protected override void AfterLiveGeneration()
        {
            var uaClass          = FieldGenerator.Field(AccessModifier.Private, FieldModifier.None, typeof(UAClass), "data").CustomDefault("new UAClass(" + guid.As().Code(false) + ");");
            var interfaceUAClass = PropertyGenerator.Property(AccessModifier.Public, PropertyModifier.None, typeof(UAClass), "Class", false).SingleStatementGetter(AccessModifier.Public, "data");

            @class.AddField(uaClass);
            @class.AddProperty(interfaceUAClass);

            @namespace?.AddClass(@class);
            var usings = CodeBuilder.Using(@class.Usings()) + "\n\n";
            var output = (string.IsNullOrEmpty(decorated.@namespace) || string.IsNullOrWhiteSpace(decorated.@namespace)) ? usings + @class.Generate(0) : usings + @namespace.Generate(0);

            ClassExtensions.Save(guid, decorated, output);
        }