Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieving the c or r attribute values from a script file
#1
I want to obtain the c or r attribute values from the first line of the script code, but the c variable in the code below does not currently support these attributes.

Could this feature be added in future versions? Or is there a better method to retrieve these values? Thanks in advance!
----------------------------------------------
/*/ role editorExtension; /*/

var c = PrePostBuild.Info;
print.it©;

if (c.c.Contains("c powershell.cs")) { print.it("Contains powershell.cs class file"); }
if (c.r.Contains(@"r %dll%\test.dll")) { print.it("Contains test.dll ref file"); }
#2
Code:
Copy      Help
// script "ppBuild script1.cs"
/*/ role editorExtension; testInternal Au.Editor; r Au.Editor.dll; r Au.Controls.dll; /*/

var c = PrePostBuild.Info;
var f = App.Model.FindCodeFile(c.source);
var mcp = new MetaCommentsParser(f);
print.it(mcp.c);
print.it(mcp.r);
if (mcp.c.Contains("powershell.cs")) { print.it("Contains powershell.cs class file"); }
#3
thank you!


Forum Jump:


Users browsing this thread: 2 Guest(s)