You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2013/08/05 17:23:48 UTC

svn commit: r1510564 - in /chemistry/dotcmis/trunk/DotCMIS: Properties/AssemblyInfo.cs binding/binding-caches.cs binding/webservices/webservices.cs client/client-caches.cs client/client-impl.cs client/client-objects.cs client/client-utils.cs enums.cs

Author: fmui
Date: Mon Aug  5 15:23:47 2013
New Revision: 1510564

URL: http://svn.apache.org/r1510564
Log:
DotCMIS: more quick fixes

Modified:
    chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs
    chemistry/dotcmis/trunk/DotCMIS/binding/binding-caches.cs
    chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs
    chemistry/dotcmis/trunk/DotCMIS/client/client-caches.cs
    chemistry/dotcmis/trunk/DotCMIS/client/client-impl.cs
    chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs
    chemistry/dotcmis/trunk/DotCMIS/client/client-utils.cs
    chemistry/dotcmis/trunk/DotCMIS/enums.cs

Modified: chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/Properties/AssemblyInfo.cs Mon Aug  5 15:23:47 2013
@@ -1,4 +1,5 @@
-using System.Reflection;
+using System;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 
@@ -19,6 +20,8 @@ using System.Runtime.InteropServices;
 // COM, set the ComVisible attribute to true on that type.
 [assembly: ComVisible(false)]
 
+[assembly: CLSCompliant(true)]
+
 // The following GUID is for the ID of the typelib if this project is exposed to COM
 [assembly: Guid("ac118463-00ec-4e63-8c93-b45760f9abcf")]
 

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/binding-caches.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/binding-caches.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/binding-caches.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/binding-caches.cs Mon Aug  5 15:23:47 2013
@@ -593,7 +593,7 @@ namespace DotCMIS.Binding
 
             cache = new Cache("Repository Info Cache");
             cache.Initialize(new string[] { 
-                typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount });
+                typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount.ToString() });
         }
 
         public void Put(IRepositoryInfo repositoryInfo)
@@ -643,8 +643,8 @@ namespace DotCMIS.Binding
 
             cache = new Cache("Type Definition Cache");
             cache.Initialize(new string[] {
-                typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount, // repository
-                typeof(LruCacheLevel).FullName + " " + LruCacheLevel.MaxEntries + "=" + typeCount // type
+                typeof(DictionaryCacheLevel).FullName + " " + DictionaryCacheLevel.Capacity + "=" + repCount.ToString(), // repository
+                typeof(LruCacheLevel).FullName + " " + LruCacheLevel.MaxEntries + "=" + typeCount.ToString() // type
         });
         }
 

Modified: chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/binding/webservices/webservices.cs Mon Aug  5 15:23:47 2013
@@ -257,29 +257,30 @@ namespace DotCMIS.Binding.WebServices
                 elements.Add(transportElement);
 
                 binding = new CustomBinding(elements);
+                TimeSpan timeout;
 
                 string openTimeOut = session.GetValue(SessionParameter.WebServicesOpenTimeout) as string;
-                if (openTimeOut != null)
+                if (openTimeOut != null && TimeSpan.TryParse(openTimeOut, out timeout))
                 {
-                    binding.OpenTimeout = TimeSpan.Parse(openTimeOut);
+                    binding.OpenTimeout = timeout;
                 }
 
                 string closeTimeOut = session.GetValue(SessionParameter.WebServicesCloseTimeout) as string;
-                if (closeTimeOut != null)
+                if (closeTimeOut != null && TimeSpan.TryParse(closeTimeOut, out timeout))
                 {
-                    binding.CloseTimeout = TimeSpan.Parse(closeTimeOut);
+                    binding.CloseTimeout = timeout;
                 }
 
                 string sendTimeOut = session.GetValue(SessionParameter.WebServicesSendTimeout) as string;
-                if (sendTimeOut != null)
+                if (sendTimeOut != null && TimeSpan.TryParse(sendTimeOut, out timeout))
                 {
-                    binding.SendTimeout = TimeSpan.Parse(sendTimeOut);
+                    binding.SendTimeout = timeout;
                 }
 
                 string receiveTimeOut = session.GetValue(SessionParameter.WebServicesReceiveTimeout) as string;
-                if (receiveTimeOut != null)
+                if (receiveTimeOut != null && TimeSpan.TryParse(receiveTimeOut, out timeout))
                 {
-                    binding.ReceiveTimeout = TimeSpan.Parse(receiveTimeOut);
+                    binding.ReceiveTimeout = timeout;
                 }
             }
 

Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-caches.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-caches.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-caches.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-caches.cs Mon Aug  5 15:23:47 2013
@@ -73,8 +73,7 @@ namespace DotCMIS.Client.Impl.Cache
 
         public void Initialize(ISession session, IDictionary<string, string> parameters)
         {
-            Lock();
-            try
+            lock (cacheLock)
             {
                 // cache size
                 cacheSize = 1000;
@@ -142,24 +141,15 @@ namespace DotCMIS.Client.Impl.Cache
 
                 InitializeInternals();
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         private void InitializeInternals()
         {
-            Lock();
-            try
+            lock (cacheLock)
             {
                 objectCache = new LRUCache<string, IDictionary<string, ICmisObject>>(cacheSize, TimeSpan.FromMilliseconds(cacheTtl));
                 pathToIdCache = new LRUCache<string, string>(pathToIdSize, TimeSpan.FromMilliseconds(pathToIdTtl));
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public void Clear()
@@ -169,34 +159,23 @@ namespace DotCMIS.Client.Impl.Cache
 
         public bool ContainsId(string objectId, string cacheKey)
         {
-            Lock();
-            try
+            lock (cacheLock)
             {
                 return objectCache.Get(objectId) != null;
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public bool ContainsPath(string path, string cacheKey)
         {
-            Lock();
-            try
+            lock (cacheLock)
             {
                 return pathToIdCache.Get(path) != null;
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public ICmisObject GetById(string objectId, string cacheKey)
         {
-            Lock();
-            try
+            lock (cacheLock)
             {
                 IDictionary<string, ICmisObject> cacheKeyDict = objectCache.Get(objectId);
                 if (cacheKeyDict == null)
@@ -212,16 +191,11 @@ namespace DotCMIS.Client.Impl.Cache
 
                 return null;
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public ICmisObject GetByPath(string path, string cacheKey)
         {
-            Lock();
-            try
+            lock (cacheLock)
             {
                 string id = pathToIdCache.Get(path);
                 if (id == null)
@@ -231,10 +205,6 @@ namespace DotCMIS.Client.Impl.Cache
 
                 return GetById(id, cacheKey);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public void Put(ICmisObject cmisObject, string cacheKey)
@@ -245,8 +215,7 @@ namespace DotCMIS.Client.Impl.Cache
                 return;
             }
 
-            Lock();
-            try
+            lock (cacheLock)
             {
                 IDictionary<string, ICmisObject> cacheKeyDict = objectCache.Get(cmisObject.Id);
                 if (cacheKeyDict == null)
@@ -264,10 +233,6 @@ namespace DotCMIS.Client.Impl.Cache
                     pathToIdCache.Add(path, cmisObject.Id);
                 }
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public void PutPath(string path, ICmisObject cmisObject, string cacheKey)
@@ -278,16 +243,11 @@ namespace DotCMIS.Client.Impl.Cache
                 return;
             }
 
-            Lock();
-            try
+            lock (cacheLock)
             {
                 Put(cmisObject, cacheKey);
                 pathToIdCache.Add(path, cmisObject.Id);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public void Remove(string objectId)
@@ -297,30 +257,15 @@ namespace DotCMIS.Client.Impl.Cache
                 return;
             }
 
-            Lock();
-            try
+            lock (cacheLock)
             {
                 objectCache.Remove(objectId);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public int CacheSize
         {
             get { return cacheSize; }
         }
-
-        protected void Lock()
-        {
-            Monitor.Enter(cacheLock);
-        }
-
-        protected void Unlock()
-        {
-            Monitor.Exit(cacheLock);
-        }
     }
 }

Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-impl.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-impl.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-impl.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-impl.cs Mon Aug  5 15:23:47 2013
@@ -202,27 +202,17 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (sessionLock)
                 {
                     return context;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
             set
             {
-                Lock();
-                try
+                lock (sessionLock)
                 {
                     context = (value == null ? FallbackContext : value);
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -252,8 +242,7 @@ namespace DotCMIS.Client.Impl
 
         public void Connect()
         {
-            Lock();
-            try
+            lock (sessionLock)
             {
                 Binding = CmisBindingHelper.CreateBinding(parameters, AuthenticationProvider);
 
@@ -265,10 +254,6 @@ namespace DotCMIS.Client.Impl
 
                 RepositoryInfo = Binding.GetRepositoryService().GetRepositoryInfo(repositoryId, null);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         protected ICache CreateCache()
@@ -337,16 +322,11 @@ namespace DotCMIS.Client.Impl
 
         public void Clear()
         {
-            Lock();
-            try
+            lock (sessionLock)
             {
                 Cache = CreateCache();
                 Binding.ClearAllCaches();
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         // session context
@@ -654,18 +634,13 @@ namespace DotCMIS.Client.Impl
         public IChangeEvents GetContentChanges(string changeLogToken, bool includeProperties, long maxNumItems,
                 IOperationContext context)
         {
-            Lock();
-            try
+            lock (sessionLock)
             {
                 IObjectList objectList = Binding.GetDiscoveryService().GetContentChanges(RepositoryId, ref changeLogToken, includeProperties,
                     context.FilterString, context.IncludePolicies, context.IncludeAcls, maxNumItems, null);
 
                 return ObjectFactory.ConvertChangeEvents(changeLogToken, objectList);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         // create
@@ -960,15 +935,5 @@ namespace DotCMIS.Client.Impl
                 Binding.GetPolicyService().RemovePolicy(RepositoryId, id, objectId.Id, null);
             }
         }
-
-        protected void Lock()
-        {
-            Monitor.Enter(sessionLock);
-        }
-
-        protected void Unlock()
-        {
-            Monitor.Exit(sessionLock);
-        }
     }
 }

Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-objects.cs Mon Aug  5 15:23:47 2013
@@ -44,15 +44,10 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (objectLock)
                 {
                     return objectType;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -80,7 +75,7 @@ namespace DotCMIS.Client.Impl
         private IList<IRelationship> relationships;
         private IDictionary<ExtensionLevel, IList<ICmisExtensionElement>> extensions;
 
-        private object objectLock = new object();
+        protected object objectLock = new object();
 
         protected void Initialize(ISession session, IObjectType objectType, IObjectData objectData, IOperationContext context)
         {
@@ -176,8 +171,7 @@ namespace DotCMIS.Client.Impl
 
         protected string GetPropertyQueryName(string propertyId)
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 IPropertyDefinition propDef = objectType[propertyId];
                 if (propDef == null)
@@ -187,25 +181,16 @@ namespace DotCMIS.Client.Impl
 
                 return propDef.QueryName;
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         // --- object ---
 
         public void Delete(bool allVersions)
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 Session.Delete(this, allVersions);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public ICmisObject UpdateProperties(IDictionary<string, object> properties)
@@ -233,8 +218,7 @@ namespace DotCMIS.Client.Impl
 
             string newObjectId = null;
 
-            Lock();
-            try
+            lock (objectLock)
             {
                 string objectId = ObjectId;
                 string changeToken = ChangeToken;
@@ -255,10 +239,6 @@ namespace DotCMIS.Client.Impl
 
                 newObjectId = objectId;
             }
-            finally
-            {
-                Unlock();
-            }
 
             if (refresh)
             {
@@ -306,15 +286,10 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (objectLock)
                 {
                     return new List<IProperty>(properties.Values);
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -327,8 +302,7 @@ namespace DotCMIS.Client.Impl
                     throw new ArgumentNullException("propertyId");
                 }
 
-                Lock();
-                try
+                lock (objectLock)
                 {
                     IProperty property;
                     if (properties.TryGetValue(propertyId, out property))
@@ -337,10 +311,6 @@ namespace DotCMIS.Client.Impl
                     }
                     return null;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -358,15 +328,10 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (objectLock)
                 {
                     return allowableActions;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -376,15 +341,10 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (objectLock)
                 {
                     return renditions;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -418,15 +378,10 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (objectLock)
                 {
                     return acl;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -434,30 +389,20 @@ namespace DotCMIS.Client.Impl
 
         public void ApplyPolicy(params IObjectId[] policyId)
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 Session.ApplyPolicy(this, policyId);
             }
-            finally
-            {
-                Unlock();
-            }
 
             Refresh();
         }
 
         public void RemovePolicy(params IObjectId[] policyId)
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 Session.RemovePolicy(this, policyId);
             }
-            finally
-            {
-                Unlock();
-            }
 
             Refresh();
         }
@@ -466,15 +411,10 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (objectLock)
                 {
                     return policies;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -484,15 +424,10 @@ namespace DotCMIS.Client.Impl
         {
             get
             {
-                Lock();
-                try
+                lock (objectLock)
                 {
                     return relationships;
                 }
-                finally
-                {
-                    Unlock();
-                }
             }
         }
 
@@ -515,8 +450,7 @@ namespace DotCMIS.Client.Impl
 
         public void Refresh()
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 IOperationContext oc = CreationContext;
 
@@ -527,36 +461,17 @@ namespace DotCMIS.Client.Impl
                 // reset this object
                 Initialize(Session, ObjectType, objectData, CreationContext);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public void RefreshIfOld(long durationInMillis)
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 if (((DateTime.UtcNow - RefreshTimestamp).Ticks / 10000) > durationInMillis)
                 {
                     Refresh();
                 }
             }
-            finally
-            {
-                Unlock();
-            }
-        }
-
-        protected void Lock()
-        {
-            Monitor.Enter(objectLock);
-        }
-
-        protected void Unlock()
-        {
-            Monitor.Exit(objectLock);
         }
     }
 
@@ -773,8 +688,7 @@ namespace DotCMIS.Client.Impl
         {
             string newObjectId = null;
 
-            Lock();
-            try
+            lock (objectLock)
             {
                 string objectId = ObjectId;
                 bool? contentCopied;
@@ -782,10 +696,6 @@ namespace DotCMIS.Client.Impl
                 Binding.GetVersioningService().CheckOut(RepositoryId, ref objectId, null, out contentCopied);
                 newObjectId = objectId;
             }
-            finally
-            {
-                Unlock();
-            }
 
             if (newObjectId == null)
             {
@@ -805,8 +715,7 @@ namespace DotCMIS.Client.Impl
         {
             String newObjectId = null;
 
-            Lock();
-            try
+            lock (objectLock)
             {
                 string objectId = ObjectId;
 
@@ -821,10 +730,6 @@ namespace DotCMIS.Client.Impl
 
                 newObjectId = objectId;
             }
-            finally
-            {
-                Unlock();
-            }
 
             if (newObjectId == null)
             {
@@ -845,16 +750,11 @@ namespace DotCMIS.Client.Impl
             string objectId;
             string versionSeriesId;
 
-            Lock();
-            try
+            lock (objectLock)
             {
                 objectId = ObjectId;
                 versionSeriesId = VersionSeriesId;
             }
-            finally
-            {
-                Unlock();
-            }
 
             IList<IObjectData> versions = Binding.GetVersioningService().GetAllVersions(RepositoryId, objectId, versionSeriesId,
                 context.FilterString, context.IncludeAllowableActions, null);
@@ -890,16 +790,11 @@ namespace DotCMIS.Client.Impl
             string objectId;
             string versionSeriesId;
 
-            Lock();
-            try
+            lock (objectLock)
             {
                 objectId = ObjectId;
                 versionSeriesId = VersionSeriesId;
             }
-            finally
-            {
-                Unlock();
-            }
 
             if (versionSeriesId == null)
             {
@@ -977,8 +872,7 @@ namespace DotCMIS.Client.Impl
         {
             string newObjectId = null;
 
-            Lock();
-            try
+            lock (objectLock)
             {
                 string objectId = ObjectId;
                 string changeToken = ChangeToken;
@@ -987,10 +881,6 @@ namespace DotCMIS.Client.Impl
 
                 newObjectId = objectId;
             }
-            finally
-            {
-                Unlock();
-            }
 
             if (refresh)
             {
@@ -1025,8 +915,7 @@ namespace DotCMIS.Client.Impl
         {
             string newObjectId = null;
 
-            Lock();
-            try
+            lock (objectLock)
             {
                 string objectId = ObjectId;
                 string changeToken = ChangeToken;
@@ -1035,10 +924,6 @@ namespace DotCMIS.Client.Impl
 
                 newObjectId = objectId;
             }
-            finally
-            {
-                Unlock();
-            }
 
             if (refresh)
             {
@@ -1165,8 +1050,7 @@ namespace DotCMIS.Client.Impl
             {
                 IList<IObjectType> result = new List<IObjectType>();
 
-                Lock();
-                try
+                lock (objectLock)
                 {
                     IList<string> otids = GetPropertyValue(PropertyIds.AllowedChildObjectTypeIds) as IList<string>;
                     if (otids == null)
@@ -1179,10 +1063,6 @@ namespace DotCMIS.Client.Impl
                         result.Add(Session.GetTypeDefinition(otid));
                     }
                 }
-                finally
-                {
-                    Unlock();
-                }
 
                 return result;
             }
@@ -1359,8 +1239,7 @@ namespace DotCMIS.Client.Impl
             {
                 string path;
 
-                Lock();
-                try
+                lock (objectLock)
                 {
                     // get the path property
                     path = GetPropertyValue(PropertyIds.Path) as string;
@@ -1382,10 +1261,6 @@ namespace DotCMIS.Client.Impl
                         }
                     }
                 }
-                finally
-                {
-                    Unlock();
-                }
 
                 // we still don't know the path ... it's not a CMIS compliant repository
                 if (path == null)
@@ -1460,8 +1335,7 @@ namespace DotCMIS.Client.Impl
 
         public ICmisObject GetSource(IOperationContext context)
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 IObjectId sourceId = SourceId;
                 if (sourceId == null)
@@ -1471,10 +1345,6 @@ namespace DotCMIS.Client.Impl
 
                 return Session.GetObject(sourceId, context);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public IObjectId SourceId
@@ -1498,8 +1368,7 @@ namespace DotCMIS.Client.Impl
 
         public ICmisObject GetTarget(IOperationContext context)
         {
-            Lock();
-            try
+            lock (objectLock)
             {
                 IObjectId targetId = TargetId;
                 if (targetId == null)
@@ -1509,10 +1378,6 @@ namespace DotCMIS.Client.Impl
 
                 return Session.GetObject(targetId, context);
             }
-            finally
-            {
-                Unlock();
-            }
         }
 
         public IObjectId TargetId

Modified: chemistry/dotcmis/trunk/DotCMIS/client/client-utils.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/client/client-utils.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/client/client-utils.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/client/client-utils.cs Mon Aug  5 15:23:47 2013
@@ -436,7 +436,7 @@ namespace DotCMIS.Client.Impl
         private long? totalNumItems = null;
         private bool? hasMoreItems = null;
 
-        protected T current;
+        protected T Current;
 
         public AbstractEnumerator(long skipCount, PageFetcher<T> pageFetcher)
         {
@@ -444,8 +444,8 @@ namespace DotCMIS.Client.Impl
             this.pageFetcher = pageFetcher;
         }
 
-        T IEnumerator<T>.Current { get { return current; } }
-        object IEnumerator.Current { get { return current; } }
+        T IEnumerator<T>.Current { get { return Current; } }
+        object IEnumerator.Current { get { return Current; } }
 
         public void Reset()
         {
@@ -633,7 +633,7 @@ namespace DotCMIS.Client.Impl
                 return false;
             }
 
-            current = items[IncrementSkipOffset()];
+            Current = items[IncrementSkipOffset()];
 
             return true;
         }
@@ -678,7 +678,7 @@ namespace DotCMIS.Client.Impl
                 return false;
             }
 
-            current = items[IncrementSkipOffset()];
+            Current = items[IncrementSkipOffset()];
 
             return true;
         }

Modified: chemistry/dotcmis/trunk/DotCMIS/enums.cs
URL: http://svn.apache.org/viewvc/chemistry/dotcmis/trunk/DotCMIS/enums.cs?rev=1510564&r1=1510563&r2=1510564&view=diff
==============================================================================
--- chemistry/dotcmis/trunk/DotCMIS/enums.cs (original)
+++ chemistry/dotcmis/trunk/DotCMIS/enums.cs Mon Aug  5 15:23:47 2013
@@ -308,6 +308,7 @@ namespace DotCMIS.Enums
 
     // --- attribute class ---
 
+    [AttributeUsage(AttributeTargets.Field)]
     public class CmisValueAttribute : System.Attribute
     {
         public CmisValueAttribute(string value)