Ejemplo n.º 1
0
        protected override void EstablishContext()
        {
            directiveManager = The <IDirectiveManager>();
            velocityTypeName = "NVelocity.Some.Class,NVelocity";

            The <IAssembly>().WhenToldTo(assembly => assembly.Name).Return("NVelocity");
        }
Ejemplo n.º 2
0
        protected override void EstablishContext()
        {
            _directiveManager = The <IDirectiveManager>();
            _assemblyQualifiedDirectiveName = "NVelocity.Some.Class,NVelocity";

            The <IAssembly>().WhenToldTo(assembly => assembly.Name).Return("ReportGenerator");
        }
 /// <summary>
 ///   Initializes a new instance of the <see cref = "DirectiveManagerProxy" /> class.
 /// </summary>
 /// <param name = "directiveManager">The directive manager.</param>
 /// <param name = "assemblyContainingVelocity">
 ///   Specifies the assembly containing the NVelocity types.
 /// </param>
 public DirectiveManagerProxy(
     IDirectiveManager directiveManager,
     IAssembly assemblyContainingVelocity)
 {
     _directiveManager           = directiveManager;
     _assemblyContainingVelocity = assemblyContainingVelocity;
 }
Ejemplo n.º 4
0
		private void InitBlock()
		{
			nodeTree = new ParserState();
			directives = null;
			jj_la1 = new int[53];
			jj_2_rtns = new Calls[12];
			jj_expentries = new ArrayList();
			jj_lasttokens = new int[100];
		}
Ejemplo n.º 5
0
        private void initializeDirectiveManager()
        {
            string text = this.configuration.GetString("directive.manager");

            if (text == null)
            {
                throw new System.Exception("Looks like there's no 'directive.manager' configured. NVelocity can't go any further");
            }
            text = text.Replace(';', ',');
            Type type = Type.GetType(text, false, false);

            if (type == null)
            {
                throw new System.Exception(string.Format("The type {0} could not be resolved", text));
            }
            this.directiveManager = (IDirectiveManager)Activator.CreateInstance(type);
        }
Ejemplo n.º 6
0
        private void initializeDirectiveManager()
        {
            String directiveManagerTypeName = configuration.GetString("directive.manager");

            if (directiveManagerTypeName == null)
            {
                throw new System.Exception("Looks like there's no 'directive.manager' configured. NVelocity can't go any further");
            }

            directiveManagerTypeName = directiveManagerTypeName.Replace(';', ',');

            Type dirMngType = Type.GetType(directiveManagerTypeName, false, false);

            if (dirMngType == null)
            {
                throw new System.Exception(
                          String.Format("The type {0} could not be resolved", directiveManagerTypeName));
            }

            directiveManager = (IDirectiveManager)Activator.CreateInstance(dirMngType);
        }
Ejemplo n.º 7
0
		private void InitBlock()
		{
			nodeTree = new ParserState();
			directives = null;
			jj_la1 = new int[53];
			callsArray = new Calls[12];
			expEntries = new ArrayList();
			lastTokens = new int[100];
		}
Ejemplo n.º 8
0
		private void initializeDirectiveManager()
		{
			String directiveManagerTypeName = configuration.GetString("directive.manager");

			if (directiveManagerTypeName == null)
			{
				throw new System.Exception("Looks like there's no 'directive.manager' configured. NVelocity can't go any further");
			}

			directiveManagerTypeName = directiveManagerTypeName.Replace(';', ',');

			Type dirMngType = Type.GetType(directiveManagerTypeName, false, false);

			if (dirMngType == null)
			{
				throw new System.Exception(
					String.Format("The type {0} could not be resolved", directiveManagerTypeName));
			}

			directiveManager = (IDirectiveManager) Activator.CreateInstance(dirMngType);
		}