Castle.MonoRail.Views.Brail.BrailBase.InitProperties C# (CSharp) Method

InitProperties() private method

Initialize all the properties that a script may need One thing to note here is that resources are wrapped in ResourceToDuck wrapper to enable easy use by the script
private InitProperties ( IRailsEngineContext myContext, Controller myController ) : void
myContext IRailsEngineContext
myController Castle.MonoRail.Framework.Controller
return void
		private void InitProperties(IRailsEngineContext myContext, Controller myController)
		{
			properties = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
            //properties.Add("dsl", new DslWrapper(this));
			properties.Add("Controller", myController);
			properties.Add("request", myContext.Request);
			properties.Add("response", myContext.Response);
			properties.Add("session", myContext.Session);

			if (myController.Resources != null)
			{
				foreach (object key in myController.Resources.Keys)
				{
					properties.Add(key, new ResourceToDuck(myController.Resources[key]));
				}
			}

			foreach (string key in myController.Params.AllKeys)
			{
				if (key == null)
					continue;
				properties[key] = myContext.Params[key];
			}

			foreach (DictionaryEntry entry in myContext.Flash)
			{
				properties[entry.Key] = entry.Value;
			}

			foreach (DictionaryEntry entry in myController.PropertyBag)
			{
				properties[entry.Key] = entry.Value;
			}
			
			foreach (DictionaryEntry entry in myController.Helpers)
			{
				properties[entry.Key] = entry.Value;
			}

			properties["siteRoot"] = myContext.ApplicationPath;
		}