public CommitObjectStubsResult[] CommitObjects(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStubCollection objectsForDelete, XPObjectStubCollection objectsForSave, LockingOption lockingOption)
 {
     return(ExecuteWithLog(
                () => Channel.CommitObjects(clientInfo, dictionary, objectsForDelete, objectsForSave, lockingOption),
                $" - ClientId: { clientInfo.ClientId }; objectsForDelete.Count: {objectsForDelete.Count}; objectsForSave.Count: {objectsForSave.Count}; lockingOption: {lockingOption.ToString()}"));
 }
 public SerializableObjectLayerResult <XPObjectStubCollection[]> GetObjectsByKey(IClientInfo clientInfo, XPDictionaryStub dictionary, GetObjectStubsByKeyQuery[] queries)
 {
     return(ExecuteWithLog(() => Channel.GetObjectsByKey(clientInfo, dictionary, queries),
                           $" - ClientId: {clientInfo.ClientId};  queries.Length: {queries.Length}"));
 }
 public bool IsParentObjectToDelete(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStub theObject)
 {
     return(false);
 }
 public SerializableObjectLayerResult <XPObjectStubCollection[]> LoadObjects(IClientInfo clientInfo, XPDictionaryStub dictionary, ObjectStubsQuery[] queries)
 {
     return(LoadObjectCache.LoadFromCache(clientInfo, dictionary, queries,
                                          () => ExecuteWithLog(() => Channel.LoadObjects(clientInfo, dictionary, queries),
                                                               $" - ClientId: { clientInfo.ClientId };   Query(1 of {queries.Length})={GetQueryDebugString(queries.FirstOrDefault())}")));
 }
 public SerializableObjectLayerResult <object[]> LoadDelayedProperties(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStub theObject, string[] props)
 {
     return(ExecuteWithLog(() => Channel.LoadDelayedProperties(clientInfo, dictionary, theObject, props),
                           $" - clientId: {clientInfo.ClientId};  object.ClassName: {theObject.ClassName}; Properties.Length: {props.Length}"));
 }
 public SerializableObjectLayerResult <object[]> LoadDelayedProperties(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStubCollection objects, string property)
 {
     return(ExecuteWithLog(() => Channel.LoadDelayedProperties(clientInfo, dictionary, objects, property),
                           $" - clientId: {clientInfo.ClientId};  objects.Count: {objects.Count}; propName: {property}"));
 }
Exemplo n.º 7
0
 public bool IsParentObjectToDelete(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStub theObject)
 {
     return(Server.IsParentObjectToDelete(clientInfo, dictionary, theObject));
 }
Exemplo n.º 8
0
 public CommitObjectStubsResult[] CommitObjects(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStubCollection objectsForDelete, XPObjectStubCollection objectsForSave, LockingOption lockingOption)
 {
     return(Server.CommitObjects(clientInfo, dictionary, objectsForDelete, objectsForSave, lockingOption));
 }
Exemplo n.º 9
0
 public SerializableObjectLayerResult <object[]> LoadDelayedProperties(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStub theObject, string[] props)
 {
     return(Server.LoadDelayedProperties(clientInfo, dictionary, theObject, props));
 }
Exemplo n.º 10
0
 public SerializableObjectLayerResult <object[]> LoadDelayedProperties(IClientInfo clientInfo, XPDictionaryStub dictionary, XPObjectStubCollection objects, string property)
 {
     return(Server.LoadDelayedProperties(clientInfo, dictionary, objects, property));
 }
Exemplo n.º 11
0
 public SerializableObjectLayerResult <XPObjectStubCollection> LoadCollectionObjects(IClientInfo clientInfo, XPDictionaryStub dictionary, string refPropertyName, XPObjectStub ownerObject)
 {
     return(Server.LoadCollectionObjects(clientInfo, dictionary, refPropertyName, ownerObject));
 }
Exemplo n.º 12
0
 public object[][] SelectData(IClientInfo clientInfo, XPDictionaryStub dictionary, ObjectStubsQuery query, CriteriaOperatorCollection properties, CriteriaOperatorCollection groupProperties, CriteriaOperator groupCriteria)
 {
     return(Server.SelectData(clientInfo, dictionary, query, properties, groupProperties, groupCriteria));
 }
Exemplo n.º 13
0
 public SerializableObjectLayerResult <XPObjectStubCollection[]> GetObjectsByKey(IClientInfo clientInfo, XPDictionaryStub dictionary, GetObjectStubsByKeyQuery[] queries)
 {
     return(Server.GetObjectsByKey(clientInfo, dictionary, queries));
 }
 public object[][] SelectData(IClientInfo clientInfo, XPDictionaryStub dictionary, ObjectStubsQuery query, CriteriaOperatorCollection properties, CriteriaOperatorCollection groupProperties, CriteriaOperator groupCriteria)
 {
     return(ExecuteWithLog(() => Channel.SelectData(clientInfo, dictionary, query, properties, groupProperties, groupCriteria),
                           $" - ClientId: {clientInfo.ClientId};  query.ClassInfo.ClassName: {query.ClassInfo.ClassName};" +
                           $"groupProperties.Count: {groupProperties?.Count}; groupsCriteria: {groupCriteria}"));
 }
 public SerializableObjectLayerResult <XPObjectStubCollection> LoadCollectionObjects(IClientInfo clientInfo, XPDictionaryStub dictionary, string refPropertyName, XPObjectStub ownerObject)
 {
     return(ExecuteWithLog(() => Channel.LoadCollectionObjects(clientInfo, dictionary, refPropertyName, ownerObject), $" - {ownerObject.ClassName}.{refPropertyName}"));
 }
        internal static SerializableObjectLayerResult <XPObjectStubCollection[]> LoadFromCache(IClientInfo clientInfo, XPDictionaryStub dictionary, ObjectStubsQuery[] queries,
                                                                                               Func <SerializableObjectLayerResult <XPObjectStubCollection[]> > getDataFunc)
        {
            if (queries.Length != 1)
            {
                return(getDataFunc());
            }
            var query = queries[0];

            if (!ReferenceEquals(query.Criteria, null) || query.SkipSelectedRecords > 0 || query.TopSelectedRecords > 0 ||
                (query.Sorting != null && query.Sorting.Count > 0))
            {
                return(getDataFunc());
            }

            ObjectCacheInfo cacheInfo;
            var             key = new ObjectsCacheKey(query);

            if (cacheInfos.TryGetValue(query.ClassInfo.ClassName, out cacheInfo))
            {
                if (cacheInfo.Cachable)
                {
                    if (cacheInfo.Result != null)
                    {
                        return(cacheInfo.Result);
                    }
                    else
                    {
                        return(cacheInfo.Result = getDataFunc());
                    }
                }
            }

            return(getDataFunc());
        }
Exemplo n.º 17
0
 public SerializableObjectLayerResult <XPObjectStubCollection[]> LoadObjects(IClientInfo clientInfo, XPDictionaryStub dictionary, ObjectStubsQuery[] queries)
 {
     return(Server.LoadObjects(clientInfo, dictionary, queries));
 }