コード例 #1
0
ファイル: RecipeContext.cs プロジェクト: sab39/nrdo
        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);
        }
コード例 #2
0
 private NrdoCodeBase(ILookupAssemblies lookup)
 {
     this.lookup = lookup;
 }
コード例 #3
0
 internal static NrdoCodeBase Get(ILookupAssemblies lookup)
 {
     return(new NrdoCodeBase(lookup));
 }
コード例 #4
0
ファイル: RecipeContext.cs プロジェクト: sab39/nrdo
 public RecipeContext(ILookupAssemblies lookup)
 {
     Lookup = lookup;
     RegisterTransformType("xslt", typeof(XsltTransformRecipe));
 }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 public static NrdoQuery GetQuery(ILookupAssemblies lookup, string name)
 {
     return(NrdoReflection.GetCodeBase(lookup).GetQuery(name));
 }
コード例 #7
0
 /// <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));
 }
コード例 #8
0
 public static IDictionary <string, string> GetRenameMapping(ILookupAssemblies lookup)
 {
     return(NrdoReflection.GetCodeBase(lookup).GetTableRenameMapping());
 }
コード例 #9
0
ファイル: RecipeLoader.cs プロジェクト: sab39/nrdo
 public RecipeLoader(ILookupAssemblies lookup)
     : this(new RecipeContext(lookup))
 {
 }
コード例 #10
0
 public static INrdoCodeBase GetCodeBase(ILookupAssemblies lookup)
 {
     return(NrdoCodeBase.Get(lookup));
 }