AddResourceAssembly() public method

Add an assembly to the resource collection.
public AddResourceAssembly ( string assembly ) : void
assembly string
return void
示例#1
0
		public AbstractGenerator()
		{
			engine = new NVelocityTemplateEngine();

			engine.AddResourceAssembly(System.Reflection.Assembly.GetExecutingAssembly().FullName);
			
			engine.BeginInit();
			engine.EndInit();
		}
		private static void InitializeTemplateEngine()
		{
			if (templateEngine == null)
			{
				NVelocityTemplateEngine nvelTemplateEng = new NVelocityTemplateEngine();

#if USE_LOCAL_TEMPLATES
				nvelTemplateEng.TemplateDir = @"E:\dev\castle\trunk\MonoRail\Castle.MonoRail.ActiveRecordSupport.Scaffold\Templates\";
				nvelTemplateEng.BeginInit();
				nvelTemplateEng.EndInit();
#else
				nvelTemplateEng.AddResourceAssembly("Castle.MonoRail.ActiveRecordSupport");
				nvelTemplateEng.BeginInit();
				nvelTemplateEng.EndInit();
#endif

				templateEngine = nvelTemplateEng;
			}
		}