Commit Graph

59 Commits

Author SHA1 Message Date
Stephan
c76403077f Normalize cr/lf/tab 2017-07-20 11:21:28 +02:00
Stephan
1f5c47f029 Move Plugins to Composing 2017-05-30 15:56:30 +02:00
Stephan
d34a425dd1 porting 7.6@5c5baca into 8 2017-05-30 12:54:22 +02:00
Stephan
b26b415096 Merge origin/dev-v7-deploy into dev-v8-zbwip (builds) 2016-11-03 10:31:44 +01:00
Stephan
5d71df36bd Fix Entity to respect dates if forced 2016-09-09 09:28:25 +02:00
Stephan
3c7245f9ba Merge origin/dev-v7 into dev-v8 2016-07-08 16:32:06 +02:00
Shannon
33ca761441 Updated all to use the ref parameter, tests are passing - now to see if they run any faster :) 2016-06-21 20:43:02 +02:00
Shannon
06fd7c2780 starting ref refactor (need to merge first) 2016-06-21 18:20:55 +02:00
Shannon
b5411a5402 Initial commit of refactor of better/more efficient in terms of mem and performance properpty selectors for our models, this also yields a much cleaner syntax. I have discovered one issue now which is that the PropertyChanged event now fires before the property value is actually set, this is why the lambda syntax existed before. Instead we can use a ref property for the SetPropertyValueAndDetectChanges methods which will work much nicer - and also potentially have less allocations. 2016-06-21 18:11:03 +02:00
Stephan
928e74f24c No C# 6 yet 2016-05-26 17:14:13 +02:00
Stephan
d0c030a34c Reduce dictionary allocs in TracksChangesEntityBase 2016-05-26 16:49:55 +02:00
Shannon
41b68333d2 publicizes EnableChangeTracking and DisableChangeTracking methods for entities, ensures that change tracking is disabled whenever building an entity for a repository as this is totally unnecessary and probably large memory overhead. Updates examine content indexer to page by 10000 rows 2016-05-26 16:36:53 +02:00
Shannon
8127731f72 Namespace and file cleanup - Profiling --> Logging, root cache stuff moved to Cache, XmlHelper --> Xml, TypeFinder, etc.. --> Plugins 2016-05-18 23:34:56 +02:00
Stephan
02e94f9243 deploy-29 - Sanitize UniqueId 2016-01-13 12:32:30 +01:00
Shannon
9406675bf2 Ensures the Saving methods on the media service are wired up with the event messages, obsoletes the hacked WasCancelled internal property on Entity. 2015-07-24 11:52:30 +02:00
Shannon
813f1a1f2d Fixes: U4-6035 Properrty.WasDirty() always returns false 2015-05-07 11:43:53 +10:00
Shannon
1d22c1e81e fixes get hash code on Entity base class 2015-04-08 11:47:00 +10:00
Shannon
46212904ef Changes the SetPropertyValueAndDetectChanges to throw an exception if an Enumerable is passed in without using the overload the specifies an IEqualityComparer. Updates all entities that use this method with IEnumerables to specify the correct Equality comparer which now uses the new UnsortedSequenceEqual method. Added unit tests for new EnumerableExtensions and makes the ContainsAll work faster. 2015-03-05 17:08:58 +11:00
Shannon
8905878a87 Adds some methods to TracksChangesEntityBase to enable/disable change tracking and to reset the change tracking dictionaries, this is then used for DeepCloning so that change tracking is turned off for the cloning process. 2015-03-03 18:33:04 +11:00
Shannon
967030a9c4 Fixes up issues when tracking dirty changes on numerical or empty string values because json.net converts numerical to long and we were setting those values on the Property.Value which means that comparing long -> int will always return false and thus the property is flagged as dirty. Same goes with string and null when dealing with an object. This is all fixed up now and have added another method to see if we shold actually persist any changes for content when saving. This all relates to fixing: U4-5510 Previewing a content item saves that item 2014-10-21 13:12:31 +10:00
Shannon
95c0f80df4 Removes all the unecessary casting to ICanBeDirty - not sure why we've had it like this for so long. 2014-10-21 11:43:58 +10:00
Shannon
cca27e064a Fixes: U4-4855 Can't use macro parameters at all 2014-05-12 13:48:56 +10:00
Shannon
0d37a1f6e8 Fixes: U4-4849 Cannot change a users language/sections in the back office 2014-05-09 15:19:00 +10:00
Shannon
8c303893d2 updates deep clone to have the false flag for resetting properties (we don't want to remember them when cloning) 2014-04-17 18:46:37 +10:00
Shannon
7d556a0318 Merge remote-tracking branch 'origin/6.2.0' into 7.1.2
Conflicts:
	src/Umbraco.Core/Cache/CacheProviderExtensions.cs
	src/Umbraco.Core/Cache/DictionaryCacheProviderBase.cs
	src/Umbraco.Core/Cache/ICacheProvider.cs
	src/Umbraco.Core/Cache/ObjectCacheRuntimeCacheProvider.cs
	src/Umbraco.Core/Models/Member.cs
	src/Umbraco.Core/Models/PreValue.cs
	src/Umbraco.Core/Models/PropertyType.cs
	src/Umbraco.Core/Services/DataTypeService.cs
	src/Umbraco.Tests/Models/Collections/PropertyCollectionTests.cs
	src/Umbraco.Tests/Umbraco.Tests.csproj
	src/Umbraco.Web/Models/PublishedProperty.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/webservices/MediaUploader.ashx.cs
2014-04-17 18:10:42 +10:00
Shannon
1f2e46a195 Simplifies much of the deep cloning with the DeepCloneHelper and adds tests 2014-04-16 13:39:42 +10:00
Shannon
bb22f5a283 More code and tests written for deep cloning. 2014-04-16 11:23:00 +10:00
Shannon
58758e7a41 More work on deep cloning, have test passing for IContent 2014-04-15 13:52:49 +10:00
Shannon
b7f7775b89 adds initial commit of entity cloning 2014-02-20 22:34:54 +11:00
Shannon
3ff4930e8a Properly exposes the IRememberBeingDirty.ResetDirtyProperties required method 2013-10-10 19:03:59 +11:00
Shannon
09b7186713 Completes: U4-2963 Updated EntityService / IUmbracoEntity to have a dictionary to fill additional data - fixes merge issues and explicitly implements interface for entities that are not UmbracoEntity and hides other implementations from intellisense. 2013-10-09 13:32:58 +11:00
Shannon
9c96b247be Completes: U4-2963 Updated EntityService / IUmbracoEntity to have a dictionary to fill additional data 2013-10-01 19:37:51 +10:00
Shannon
a132f609d7 backports changes for -> Finished upgrading the UserRepository and entities to properly support Users' Allowed Sections & streamlines Persistence/Mappers with less code duplication. 2013-07-03 16:40:22 +10:00
Shannon
32ee1fadd6 Finished upgrading the UserRepository and entities to properly support Users' Allowed Sections 2013-07-03 16:07:20 +10:00
Shannon Deminick
710c8aa6ea Merge with 6.0.4 2013-04-23 21:52:07 -10:00
Morten Christensen
eeb0e0026a Making PropertyCollection, PropertyGroupCollection and PropertyTypeCollection return a proper null when FirstOrDefault should return null. 2013-04-20 19:47:30 -02:00
Shannon Deminick
1b5139889c Changed event handler to AfterDelete for DataTypeDefinition, fixes merge issue with Entity and changes WasCancelled to be tracked. 2013-03-22 22:10:24 +06:00
Shannon Deminick
d976fbe4de Merge with 6.0.3 2013-03-22 22:03:50 +06:00
Morten Christensen
c5710277a5 Redoing the fix for U4-1875 2013-03-22 12:13:06 -01:00
Shannon Deminick
52f05612ad Adds another method of distributed cache syncing using a custom json payload. this is necessary for things like ContentType cache
updates especially when deleting one since we require all sorts of Ids from the object but the object will be deleted by the time
the request reaches other servers so instead we create a json payload to send to other servers which contains all information necessary
to refresh/clear the cache on the other servers. This will probably be the preferred way going forward to handle cache refreshing.
With this in place, when removing a conent type cache is removed based on events.
This also adds a 'class' generic argument constraint to the repository base classes to guarantee we can do null checks and then we also
fix a null check on RepositoryBase. Updates the Entity class to properly support tracking properties - this now allows us to determine if
an entity was new, which is now used to ensure we don't re-update all of the content cache when a new content type is created.
Have also changed the deletion and creation of document types to use the new API, this allows for a lot less processing and streamlining how
all cache is invalidated. Fixes the construction of a new Template and Content Type in the v6 api and ensures that default values are set - #U4-1972, #U4-1971
2013-03-21 08:38:18 +06:00
Shannon Deminick
7ea87638f7 Updates all Entity models to use SetPropertyValueAndDetectChanges for setting all simple properties so that
tracking changes works the way it is supposed to. Creates a TracksChangesEntityBase class for any other entity
that wants to implement IRememberBeingDirty (now Entity inherits from this). Upgraded a bunch of other entities that
were not tracking changes properly.
2013-03-21 00:05:56 +06:00
Shannon Deminick
b260769799 Fixes: #U4-1946 - when entities are constructed via the factories (i.e. from the database), ensure that
properties are not tracked as dirty already.
2013-03-19 07:37:33 +06:00
Shannon Deminick
4495fd05c4 Creates IRememberBeingDirty interface to track the properties that we're changed before the last commit for a given entity.
Adds internal property and tracks it's dirty changes to the ContentTypeBase - HasPropertyBeenRemoved.
Fixes: #U4-1942 - ensures content xml cache is refreshed even across servers when a property is removed or when the alias is changed.
2013-03-19 06:38:15 +06:00
Shannon Deminick
de13f7e361 WIP ... Fixes: #U4-1666, Updates documentService to not have to manually
refresh content cache (and fix the unpublishing too since that logic wasn't correct)
Adds DebuggerDisplay support to ContentBase and Entity for better debugging info.
Adds new internal publishing methods to support publishing all children or only children previously published. This also adds new support
for getting a published result back even with bulk publishing.
Updates the publish dialog with new code and to use the new API based on issue #U4-1669.
Adds UmbracoUser property to AuthenticatedUmbracoController, Adds all common properties to the abstract UmbracoController.
Changes the legacy Document to allow content cache to be automatically refreshed (based on events)
2013-02-09 04:05:01 +06:00
Morten Christensen
0dbebaf12e Fixes U4-1557 so the name of a Media item is properly saved.
This has also be tested and verified for content.
2013-01-28 14:31:40 -01:00
Morten Christensen
25f91cc0da Fixes U4-1534 so documents containing the tag datatype is properly copied.
Copying a document with a Tags datatype on it would only work if a new TagRelationship is created.
2013-01-24 13:49:41 -01:00
Morten Christensen
c7e8143128 Adds IUmbracoEntity to the structure of interfaces for ContentBase, ContentTypeBase and DataTypeDefinition. 2013-01-03 08:30:38 -01:00
Morten Christensen
194d241b02 Adding Publish and UnPublish EventArgs 2012-12-28 14:15:12 -01:00
Morten Christensen
8338102944 Reverting use of DateTime.UtcNow to DateTime.Now in the new api. 2012-12-28 10:43:34 -01:00
Morten Christensen
f7b7b90bed Correcting a new issues after merge 2012-11-13 15:13:06 -01:00