public static RecipeContext FromXml(ILookupAssemblies lookup, XmlDocument doc) { XmlElement root = doc.DocumentElement; if (root.LocalName != "nrdo.context") { throw new ArgumentException("Cannot create a context from a <" + root.LocalName + "> element"); } RecipeContext result = new RecipeContext(lookup); foreach (XmlElement element in Recipe.elementChildren(root)) { result.PutRecordRaw(RecipeRecord.FromXmlElement(result, element)); } return(result); }
private NrdoCodeBase(ILookupAssemblies lookup) { this.lookup = lookup; }
internal static NrdoCodeBase Get(ILookupAssemblies lookup) { return(new NrdoCodeBase(lookup)); }
public RecipeContext(ILookupAssemblies lookup) { Lookup = lookup; RegisterTransformType("xslt", typeof(XsltTransformRecipe)); }
/// <summary> /// Gets all known tables. To determine which assemblies to load from, the given lookup strategy is used. /// </summary> /// <param name="lookup">The lookup strategy to use to find the appropriate assembly</param> /// <returns>NrdoTable objects corresponding to all known tables</returns> public static IEnumerable <NrdoQuery> GetAllQueries(ILookupAssemblies lookup) { return(NrdoReflection.GetCodeBase(lookup).AllQueries); }
public static NrdoQuery GetQuery(ILookupAssemblies lookup, string name) { return(NrdoReflection.GetCodeBase(lookup).GetQuery(name)); }
/// <summary> /// Gets a NrdoTable object corresponding to the given table name. To determine which assembly to load from, the given /// lookup strategy is used. /// </summary> /// <param name="lookup">The lookup strategy to use to find the appropriate assembly</param> /// <param name="name">The name of the table to get</param> /// <returns>A NrdoTable object corresponding to the named table</returns> public static NrdoTable GetTable(ILookupAssemblies lookup, string name) { return(NrdoReflection.GetCodeBase(lookup).GetTable(name)); }
public static IDictionary <string, string> GetRenameMapping(ILookupAssemblies lookup) { return(NrdoReflection.GetCodeBase(lookup).GetTableRenameMapping()); }
public RecipeLoader(ILookupAssemblies lookup) : this(new RecipeContext(lookup)) { }
public static INrdoCodeBase GetCodeBase(ILookupAssemblies lookup) { return(NrdoCodeBase.Get(lookup)); }