Exemple #1
0
        public void Delete()
        {
            int id = _resource.Id;

            if (Core.ResourceAP.IsOwnerThread)
            {
                _resource.Delete();
            }
            else
            {
                new ResourceProxy(_resource).Delete();
            }
            BusinessObjectCache.Remove(id);
        }
Exemple #2
0
 private void DoSave()
 {
     lock (this)
     {
         if (_resource == null)
         {
             _resource = Core.ResourceStore.BeginNewResource(_newResourceType);
             BusinessObjectCache.Put(this);
         }
         else
         {
             _resource.BeginUpdate();
         }
         if (_props != null)
         {
             foreach (var prop in _props)
             {
                 _resource.SetProp(prop.Key, prop.Value);
             }
             _props = null;
         }
         _resource.EndUpdate();
     }
 }
Exemple #3
0
            private T GetCurrentItem()
            {
                IResource res = (IResource)_resourceEnumerator.Current;

                return(BusinessObjectCache.Get(res, _resourceType));
            }
Exemple #4
0
 public T this[int i]
 {
     get { return(BusinessObjectCache.Get(_baseList[i], _resourceTypeId)); }
 }