예제 #1
0
파일: App.cs 프로젝트: deathkiller/fvis
        private static void ResolveStringAnsi(RemoteCall data, Stream pipe)
        {
            try {
                // Read Ansi string from memory of current process
                string stringAnsi = Marshal.PtrToStringAnsi((IntPtr)data.Parameters[0]);

                RemoteCallResult callResult = new RemoteCallResult {
                    Result = stringAnsi
                };

                // Write result back to the client
                formatter.Serialize(pipe, callResult);
            } catch (Exception e) {
                WriteExceptionToClient(pipe, e);
            }
        }
예제 #2
0
파일: App.cs 프로젝트: deathkiller/fvis
        private static void ProcedureExists(RemoteCall data, Stream pipe, NativeLibrary library)
        {
            try {
                // Check if procedure with given name exists in target library
                bool exists = library.ProcedureExists(data.Name);

                RemoteCallResult callResult = new RemoteCallResult {
                    Result = exists
                };

                // Write result back to the client
                formatter.Serialize(pipe, callResult);
            } catch (Exception e) {
                WriteExceptionToClient(pipe, e);
            }
        }
예제 #3
0
파일: App.cs 프로젝트: deathkiller/fvis
        private static void Invoke(RemoteCall data, Stream pipe, NativeLibrary library)
        {
            try {
                Delegate method;
                if (!delegateCache.TryGetValue(data.Name, out method))
                {
                    method = library.Resolve(data.Name, data.Delegate);
                    delegateCache.Add(data.Name, method);
                }

                // Invoke requested method
                object result = method.DynamicInvoke(data.Parameters);

                RemoteCallResult callResult = new RemoteCallResult {
                    Result = result
                };

                // Write result back to the client
                formatter.Serialize(pipe, callResult);
            } catch (Exception e) {
                WriteExceptionToClient(pipe, e);
            }
        }
예제 #4
0
 public async Task <RemoteCallResult <int> > SaveSupplier(tblSupplier tblSupplier) => RemoteCallResult.Success(await _repository.SaveSupplier(tblSupplier));
예제 #5
0
 public async Task <RemoteCallResult <List <Product> > > GetAllProducts() => RemoteCallResult.Success(await _repository.GetAllProducts());
예제 #6
0
 public async Task <RemoteCallResult <List <Product> > > GetQuickViewProduct() => RemoteCallResult.Success(await _repository.GetQuickViewProduct());
예제 #7
0
 public async Task <RemoteCallResult <List <CategoryBrand> > > GetAllCategoryBrands() => RemoteCallResult.Success(await _repository.GetAllCategoryBrands());
예제 #8
0
 public async Task <RemoteCallResult <List <tblSupplier> > > GetAllSuppliers() => RemoteCallResult.Success(await _repository.GetAllSuppliers());
예제 #9
0
 public async Task <RemoteCallResult <List <tblBrands> > > GetAllBrands() => RemoteCallResult.Success(await _repository.GetAllBrands());