More working tests.
[castle.git] / MonoRail / Castle.MonoRail.Framework.Views.NVelocity / JSGeneration / JSElementGeneratorDuck.cs
blobecca1899093ee2b2ee0ae81bcab02e0b5ea95817
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 using NVelocity;
17 namespace Castle.MonoRail.Framework.Views.NVelocity.JSGeneration
19 using System;
20 using Castle.MonoRail.Framework.JSGeneration;
21 using Castle.MonoRail.Framework.JSGeneration.DynamicDispatching;
23 /// <summary>
24 /// Pendent
25 /// </summary>
26 public class JSElementGeneratorDuck : JSElementGeneratorDispatcherBase, IDuck
28 public JSElementGeneratorDuck(IJSCodeGenerator codeGen, IJSElementGenerator elementGenerator, params object[] extensions) :
29 base(codeGen, elementGenerator, extensions)
33 #region IDuck
35 /// <summary>
36 /// Defines the behavior when a property is read
37 /// </summary>
38 /// <param name="propName">Property name.</param>
39 /// <returns>value back to the template</returns>
40 public object GetInvoke(string propName)
42 InternalGet(propName);
44 return this;
47 /// <summary>
48 /// Defines the behavior when a property is written
49 /// </summary>
50 /// <param name="propName">Property name.</param>
51 /// <param name="value">The value to assign.</param>
52 public void SetInvoke(string propName, object value)
54 throw new NotImplementedException();
57 /// <summary>
58 /// Invokes the specified method.
59 /// </summary>
60 /// <param name="method">The method name.</param>
61 /// <param name="args">The method arguments.</param>
62 /// <returns>value back to the template</returns>
63 public object Invoke(string method, params object[] args)
65 return InternalInvoke(method, args);
68 #endregion