3using System.Collections.Generic;
8using System.Threading.Tasks;
41 m_rgCustomQueries.
Add(iqry);
51 if (strName ==
"OutputConverter" || strName ==
"Info")
52 return m_rgCustomQueries[0];
56 if (strName == iqry.
Name)
63 private void addCustomQueries()
65 string codeBase = Assembly.GetExecutingAssembly().CodeBase;
66 UriBuilder uri =
new UriBuilder(codeBase);
67 string path = Uri.UnescapeDataString(uri.Path);
68 string strPath = Path.GetDirectoryName(path);
70 strPath +=
"\\CustomQuery";
72 if (Directory.Exists(strPath))
74 string[] rgstrFiles = Directory.GetFiles(strPath);
76 foreach (
string strFile
in rgstrFiles)
78 FileInfo fi =
new FileInfo(strFile);
80 if (fi.Extension.ToLower() ==
".dll")
84 m_rgCustomQueries.
Add(iqry);
90 private IXCustomQuery loadCustomQuery(
string strFile)
94 Assembly a = Assembly.LoadFile(strFile);
95 AssemblyName aName = a.GetName();
97 foreach (Type t
in a.GetTypes())
99 Type[] rgT = t.GetInterfaces();
101 foreach (Type iface
in rgT)
103 string strIface = iface.ToString();
104 if (strIface.Contains(
"IXCustomQuery"))
106 object obj = Activator.CreateInstance(t);
107 return obj as IXCustomQuery;
The GenericList provides a base used to implement a generic list by only implementing the minimum amo...
virtual void Add(T item)
Add a new item to the list.
The CustomQueryCollection manages the external Custom Queries placed in the
void Load()
Loads all custom query DLL's (if found).
CustomQueryCollection()
The constructor.
IXCustomQuery Find(string strName)
Locates a custom query by name and returns it.
void Add(IXCustomQuery iqry)
Directly adds a custom query to the list.
The custom query interface defines the functions implemented by each Custom Query object used to spec...
string Name
Returns the name of the Custom Query.
The MyCaffe.basecode contains all generic types used throughout MyCaffe.
The MyCaffe.db.stream namespace contains all data streaming related classes.
The MyCaffe namespace contains the main body of MyCaffe code that closesly tracks the C++ Caffe open-...