Esempio n. 1
0
        protected override void SaveLive()
        {
            var finalOutput = CodeBuilder.RemoveHighlights(output);

            finalOutput = CodeBuilder.RemoveMarkdown(finalOutput);
            ClassExtensions.Save(guid, decorated, finalOutput, (type) => { decorated.inheritance.compiledName = type; });
        }
Esempio n. 2
0
        protected override void SaveCompiled()
        {
            var finalOutput = CodeBuilder.RemoveHighlights(output);

            finalOutput = CodeBuilder.RemoveMarkdown(finalOutput);
            ClassExtensions.Save(guid, decorated, finalOutput);
        }
Esempio 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);
        }
Esempio n. 4
0
 public void Invoke(IUAClass @class, string name, Action <object> returnMethod, params object[] parameters)
 {
     EnsureInitialized(GUID);
     ClassExtensions.Invoke(@class, name, returnMethod, parameters);
 }
Esempio n. 5
0
 private void EnsureInitialized(string GUID)
 {
     ClassExtensions.GetClass(ref macro, GUID);
 }