Exemplo n.º 1
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="persistentStore"></param>
		/// <param name="mode"></param>
		internal UpdateContext(PersistentStore persistentStore, UpdateContextSyncMode mode)
			: base(persistentStore)
		{
			if (mode == UpdateContextSyncMode.Hold)
				throw new NotSupportedException("UpdateContextSyncMode.Hold is not supported");

			// create a default change-set logger
			_changeSetRecorder = new DefaultEntityChangeSetRecorder();
			_validator = new DomainObjectValidator();
			_validationChangeTracker = new ChangeTracker();
		}
Exemplo n.º 2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="persistentStore"></param>
        /// <param name="mode"></param>
        internal UpdateContext(PersistentStore persistentStore, UpdateContextSyncMode mode)
            : base(persistentStore)
        {
            if (mode == UpdateContextSyncMode.Hold)
            {
                throw new NotSupportedException("UpdateContextSyncMode.Hold is not supported");
            }

            // create a default change-set logger
            _changeSetRecorder       = new DefaultEntityChangeSetRecorder();
            _validator               = new DomainObjectValidator();
            _validationChangeTracker = new ChangeTracker();
        }
Exemplo n.º 3
0
 /// <summary>
 /// Disable domain object validation on this context.
 /// </summary>
 /// <remarks>
 /// This feature should be used with care.
 /// </remarks>
 public void DisableValidation()
 {
     _validator = DomainObjectValidator.NullValidator;
 }
Exemplo n.º 4
0
		/// <summary>
		/// Disable domain object validation on this context.
		/// </summary>
		/// <remarks>
		/// This feature should be used with care.
		/// </remarks>
		public void DisableValidation()
		{
			_validator = DomainObjectValidator.NullValidator;
		}