コード例 #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);
        }
コード例 #2
0
 protected CRUDQueryHandler(ICRUDDataStore store, QuerySource source) : this(store, source.NonNull(nameof(source)).Name)
 {
     Source = source;
 }
コード例 #3
0
 public CRUDQueryHandler MakeScriptQueryHandler(QuerySource querySource)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 protected CrudQueryHandler(ICrudDataStore store, QuerySource source) : this(store, source.NonNull(nameof(source)).Name)
 {
     Source = source;
     System.Threading.Thread.MemoryBarrier();
 }
コード例 #5
0
 public InstrumentedCrudQueryHandler(TStore store, QuerySource source) : base(store, source)
 {
 }
コード例 #6
0
 protected CRUDQueryHandler(TStore store, QuerySource source) : base(store, source)
 {
 }