TestPage

Enter a topic name to show or a new topic name to create; then press Enter

Level 1 Header for a New Page

Level 2 Header for a New Page

Edit the content of this message to create your new page. Add tags as required and then save the page.

	public static string ExecuteBehavior(string scriptInput)
	{
	    if (importRegex.IsMatch(scriptInput)) {
		return "IronWiki: IronWiki - Script may not include 'import'";
	    }
	    string _code_path = HostingEnvironment.ApplicationPhysicalPath + @"App_Code\IronWiki.dll";
	    StringBuilder scriptSource = new StringBuilder();
	    scriptSource.AppendLine("import clr");
	    scriptSource.AppendLine("import datetime");
	    scriptSource.AppendLine("from datetime import date, datetime, timedelta, tzinfo, time");
	    scriptSource.AppendFormat(@"clr.AddReferenceToFileAndPath(r'{0}')", _code_path);
	    scriptSource.AppendLine();
	    scriptSource.AppendLine("import IronWiki");
	    scriptSource.AppendLine("from IronWiki import UtilityProperties");
	    scriptSource.AppendLine("from IronWiki import IronWikiSyntax");
	    scriptSource.AppendLine("from IronWiki import WikiTopic, WikiSearch, WikiDirectory");
	    scriptSource.Append(scriptInput);
	    try {
		ScriptSource source = Engine.CreateScriptSourceFromString(scriptSource.ToString(), Microsoft.Scripting.SourceCodeKind.Statements);
		var res = (string)source.Execute(scope);
		var varPyNow = String.Empty;
		scope.TryGetVariable<string>("ScriptOutput", out varPyNow);
		return varPyNow;
	    }
	    catch (Exception ex) {
		Debug.Print(ex.Message);
		return ex.Message;
	    }
	}

IronWiki Classes and Members

2017-03-24 16:00:01

IronWikiSyntax A class containing information about the IronWiki syntax
IronWikiClass The class describing an IronWiki class
IronWikiMember The class describing an IronWiki member
UtilityProperties A class that provides a number of utility properties
WikiDirectory A class that provides access to wiki topic data
WikiRequest A class that provides data about the current HttpRequest
WikiSearch A class that provides search capabilities to wiki topic data
WikiSearchData A class to return values from the search functions
WikiTopic A class that provides access to wiki topic data
WikiTopics A class that provides a List of WikiTopic classes
IronWikiClasses A collection describing all IronWiki classes IronWikiSyntax
IronWikiMembers A collection describing all members of IronWiki classes IronWikiSyntax
ParentClassName The name of the parent class for the IronWiki member IronWikiMember
Now Provides the current DateTime UtilityProperties
Newline Provides a newline in the text UtilityProperties
Tab Provides a tab in the text UtilityProperties
ProductName Provides the name of the application UtilityProperties
ScriptEngineName Provides the name of the scripting language UtilityProperties
GetDirectoryFileInfos Returns a list of " FileInfo" for the directory WikiDirectory
GetCookie returns the cookie requested by name WikiRequest
GetParameterNamed returns the parameter requested by name WikiRequest
ParameterExists Returns a boolean indicating if the paramater exists WikiRequest
Url The Url in a string for the current request WikiRequest
VisitorIdentity The IP of the current request WikiRequest
IsAuthenticated A value indicating if the user is authenticated WikiRequest
AuthenticatedUserName A value giving the user name when authenticated WikiRequest
ParameterNames An array of parameter names for query, form, cookie and server variable items WikiRequest
SearchCreator Search the Creator field for specific value and optionally limit the number of items returned. WikiSearch
SearchForProperty Search wikiText field for property specificed - this is not an exact return set WikiSearch
SearchForTag Search Tags field for a specificed value WikiSearch
GetTopicsWithProperty Retrieves a list of WikiTopics from the wiki repository that have a property specified WikiSearch
TopicName The topic name returned from the search query WikiSearchData
WikiDir The wikidir returned from the search query WikiSearchData
ID An identifier for the item WikiSearchData
Creator The creator returned from the search query WikiSearchData
CreatedOn The date the topic was created on returned from the search query WikiSearchData
WikiText The wikitext returned from the search query WikiSearchData
Tags The comma-separated tag list returned from the search query WikiSearchData
Type The document type returned from the search query WikiSearchData
GetTopicBody Retrieves a topic wikitext from the wiki repository WikiTopic

Version: 6   Revised: 2014-01-10 08:11:10 Last Updated by: 46.254.120.3 Rename Show Links to Topic