/// <summary> /// Adds the store. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="name">The name.</param> /// <param name="crud">The crud.</param> /// <param name="remoteId">The remote id.</param> /// <param name="subRemote">if set to <c>true</c> [sub remote].</param> /// <param name="own">if set to <c>true</c> [own].</param> public void AddStore <T>(String name, IDextopDataProxy <T> crud, String remoteId = null, bool subRemote = true, bool own = true) where T : class { var meta = Context.ModelManager.GetModelMeta(typeof(T)); var proxy = new DextopDataProxyAdapter <T>(crud); AddRemotableComponent(name + "Proxy", new DextopProxy(proxy, meta), remoteId, subRemote, own); }
/// <summary> /// Initializes a new instance of the <see cref="DextopDataProxyAdapter<Model>"/> class. /// </summary> /// <param name="proxy">The proxy.</param> public DextopDataProxyAdapter(IDextopDataProxy <Model> proxy) { if (proxy == null) { throw new ArgumentNullException("proxy"); } this.proxy = proxy; }
/// <summary> /// Initializes a new instance of the <see cref="DextopProxy"/> class. /// </summary> /// <param name="dataProxy">The data proxy service.</param> /// <param name="meta">The meta.</param> /// <param name="serializer">The serializer.</param> public DextopProxy(IDextopDataProxy dataProxy, DextopModelTypeMeta meta, IDextopModelSerializer serializer = null) { this.proxy = dataProxy; this.meta = meta; this.serializer = serializer ?? meta.DefaultSerializer; }
/// <summary> /// Initializes a new instance of the <see cref="DextopProxy"/> class. /// </summary> /// <param name="dataProxy">The data proxy service.</param> /// <param name="meta">The meta.</param> /// <param name="serializer">The serializer.</param> public DextopProxy(IDextopDataProxy dataProxy, DextopModelTypeMeta meta, IDextopModelSerializer serializer = null) { this.proxy = dataProxy; this.meta = meta; this.serializer = serializer ?? meta.ArraySerializer; }