1 // Copyright 2004-2007 Castle Project - http://www.castleproject.org/
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 namespace Castle
.MonoRail
.Framework
.Views
.NVelocity
.JSGeneration
20 using Castle
.MonoRail
.Framework
.Helpers
;
21 using Castle
.MonoRail
.Framework
.Internal
;
26 public class JSElementGeneratorDuck
: JSElementGeneratorBase
, IDuck
28 public JSElementGeneratorDuck(IJSElementGenerator generator
) : base(generator
)
35 /// Defines the behavior when a property is read
37 /// <param name="propName">Property name.</param>
38 /// <returns>value back to the template</returns>
39 public object GetInvoke(string propName
)
41 InternalGet(propName
);
47 /// Defines the behavior when a property is written
49 /// <param name="propName">Property name.</param>
50 /// <param name="value">The value to assign.</param>
51 public void SetInvoke(string propName
, object value)
53 throw new NotImplementedException();
57 /// Invokes the specified method.
59 /// <param name="method">The method name.</param>
60 /// <param name="args">The method arguments.</param>
61 /// <returns>value back to the template</returns>
62 public object Invoke(string method
, params object[] args
)
64 return InternalInvoke(method
, args
);