public static Compile ( string source, string name, string queryText, OrderedPartCollection |
||
source | string | |
name | string | |
queryText | string | |
extensions | OrderedPartCollection |
|
basePath | string | |
return |
public AbstractViewGenerator GenerateInstance() { TransformQueryToClass(); string tempFileName = null; try { try { tempFileName = Path.GetTempFileName(); File.WriteAllText(tempFileName, CompiledQueryText); } catch (Exception) { throw new InvalidOperationException(@"Raven could not write to the temp directory. This is usually the result of security settings when running in IIS. Raven requiers access to the temp directory in order to compile indexes."); } GeneratedType = QueryParsingUtils.Compile(tempFileName, CSharpSafeName, CompiledQueryText, extensions); } finally { if (tempFileName != null) { File.Delete(tempFileName); } } return((AbstractViewGenerator)Activator.CreateInstance(GeneratedType)); }
public AbstractViewGenerator GenerateInstance() { TransformQueryToClass(); GeneratedType = QueryParsingUtils.Compile(CompiledQueryText, CSharpSafeName, CompiledQueryText, extensions, basePath); return((AbstractViewGenerator)Activator.CreateInstance(GeneratedType)); }
public AbstractTransformer GenerateInstance() { TransformToClass(); GeneratedType = QueryParsingUtils.Compile(CompiledQueryText, CSharpSafeName, CompiledQueryText, extensions, basePath, configuration); var abstractTransformer = (AbstractTransformer)Activator.CreateInstance(GeneratedType); abstractTransformer.SourceCode = CompiledQueryText; abstractTransformer.Init(transformerDefinition); return(abstractTransformer); }