public RazorBasedFunction(string ns, string name, string description,
                           IDictionary <string, FunctionParameter> parameters, Type returnType, string virtualPath,
                           bool preventCaching,
                           FileBasedFunctionProvider <RazorBasedFunction> provider)
     : base(ns, name, description, parameters, returnType, virtualPath, provider)
 {
     PreventFunctionOutputCaching = preventCaching;
 }
 public UserControlBasedFunction(
     string @namespace,
     string name,
     string description,
     string virtualPath,
     FileBasedFunctionProvider <UserControlBasedFunction> provider)
     : base(@namespace, name, description, typeof(UserControl), virtualPath, provider)
 {
 }
 public UserControlBasedFunction(
     string @namespace,
     string name,
     string description,
     IDictionary <string, FunctionParameter> parameters,
     Type returnType,
     string virtualPath,
     FileBasedFunctionProvider <UserControlBasedFunction> provider)
     : base(@namespace, name, description, parameters, returnType, virtualPath, provider)
 {
 }
        internal void GetProviderAndFunction <FunctionType>(
            FileBasedFunctionEntityToken entityToken,
            out FileBasedFunctionProvider <FunctionType> provider,
            out FileBasedFunction <FunctionType> function) where FunctionType : FileBasedFunction <FunctionType>
        {
            string functionProviderName = entityToken.FunctionProviderName;

            provider = (FileBasedFunctionProvider <FunctionType>)FunctionProviderPluginFacade.GetFunctionProvider(functionProviderName);
            IFunction func = FunctionFacade.GetFunction(entityToken.FunctionName);

            Verify.IsNotNull(func, "Failed to get function '{0}'", entityToken.FunctionName);

            if (func is FunctionWrapper)
            {
                func = (func as FunctionWrapper).InnerFunction;
            }

            function = (FileBasedFunction <FunctionType>)func;
        }
Esempio n. 5
0
 public RazorBasedFunction(string ns, string name, string description, Type returnType, string virtualPath, FileBasedFunctionProvider <RazorBasedFunction> provider)
     : base(ns, name, description, returnType, virtualPath, provider)
 {
 }
Esempio n. 6
0
 public RazorBasedFunction(string ns, string name, string description, IDictionary <string, FunctionParameter> parameters, Type returnType, string virtualPath, FileBasedFunctionProvider <RazorBasedFunction> provider)
     : base(ns, name, description, parameters, returnType, virtualPath, provider)
 {
 }