/// <summary> /// Adds the store. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="name">The name.</param> /// <param name="crud">The crud.</param> /// <param name="serializer">The serializer.</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, IDextopModelSerializer serializer = null, 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, serializer), remoteId, subRemote, own); }
/// <summary> /// Initializes a new instance of the <see cref="DextopLiveStore"/> class. /// </summary> /// <param name="meta">The meta.</param> /// <param name="source">The source.</param> /// <param name="serializer">The serializer.</param> public DextopLiveStore(DextopModelTypeMeta meta, IDextopObservableStore source = null, IDextopModelSerializer serializer = null) { this.meta = meta; this.serializer = serializer ?? meta.ArraySerializer; Source = source; }
/// <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; }