private string[] GetFiles(FileBasedFunction<UserControlBasedFunction> function)
        {
            var result = new List<string>();

            string markupFilePath = PathUtil.Resolve(function.VirtualPath);
            result.Add(markupFilePath);

            string codeFile = markupFilePath + ".cs";
            if(C1File.Exists(codeFile))
            {
                result.Add(codeFile);
            }

            return result.ToArray();
        }
        private string[] GetFiles(FileBasedFunction <UserControlBasedFunction> function)
        {
            var result = new List <string>();

            string markupFilePath = PathUtil.Resolve(function.VirtualPath);

            result.Add(markupFilePath);

            string codeFile = markupFilePath + ".cs";

            if (C1File.Exists(codeFile))
            {
                result.Add(codeFile);
            }

            return(result.ToArray());
        }
        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;
        }
Ejemplo n.º 4
0
 private string GetFile(FileBasedFunction<RazorBasedFunction> function)
 {
     return PathUtil.Resolve(function.VirtualPath);
 }
 private string GetFile(FileBasedFunction <RazorBasedFunction> function)
 {
     return(PathUtil.Resolve(function.VirtualPath));
 }