public override int Add(Property x)
            {
                int result = 0;

                rwLock.AcquireWriterLock(timeout);

                try
                {
                    result = collection.Add(x);
                }
                finally
                {
                    rwLock.ReleaseWriterLock();
                }

                return(result);
            }
        private static PropertyCollection BuildParentProperties(CslaObjectInfo info)
        {
            var propertyCollection = new PropertyCollection();

            CslaObjectInfo parent = info.FindMyParent(info);

            if (parent != null)
            {
                foreach (Property pvp in parent.ValueProperties)
                {
                    ValueProperty prop = parent.GetAllValueProperties().Find(pvp.Name);
                    if (prop != null && prop.PrimaryKey != ValueProperty.UserDefinedKeyBehaviour.Default)
                    {
                        propertyCollection.Add(prop);
                    }
                }
            }

            return(propertyCollection);
        }