Esempio n. 1
0
        private CRUDQueryHandler searchForScript(string name)
        {
            var asm     = Assembly.Load(m_ScriptAssembly);
            var asmname = asm.FullName;
            var ic      = asmname.IndexOf(',');

            if (ic > 0)
            {
                asmname = asmname.Substring(0, ic);
            }
            var resources = asm.GetManifestResourceNames();

            var resName = name + m_DataStore.ScriptFileSuffix;

            var res = resources.FirstOrDefault(r => r.EqualsIgnoreCase(resName) || r.EqualsIgnoreCase(asmname + "." + resName));

            if (res != null)
            {
                using (var stream = asm.GetManifestResourceStream(res))
                    using (var reader = new StreamReader(stream))
                    {
                        var script  = reader.ReadToEnd();
                        var qsource = new QuerySource(name, script);
                        return(m_DataStore.MakeScriptQueryHandler(qsource));
                    }
            }
            return(null);
        }
Esempio n. 2
0
 protected CRUDQueryHandler(ICRUDDataStore store, QuerySource source) : this(store, source.NonNull(nameof(source)).Name)
 {
     Source = source;
 }
 public CRUDQueryHandler MakeScriptQueryHandler(QuerySource querySource)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 protected CrudQueryHandler(ICrudDataStore store, QuerySource source) : this(store, source.NonNull(nameof(source)).Name)
 {
     Source = source;
     System.Threading.Thread.MemoryBarrier();
 }
Esempio n. 5
0
 public InstrumentedCrudQueryHandler(TStore store, QuerySource source) : base(store, source)
 {
 }
Esempio n. 6
0
 protected CRUDQueryHandler(TStore store, QuerySource source) : base(store, source)
 {
 }