Breaking Changes in Xafari 15.2.9010.523

New Major Features in x010

Major Features in x010

Enhancements and Updates

To learn about new features, updates, and resolved issues in this version, please refer to the following page:

What's New in Xafari 15.2.9010.523

Breaking Changes


AppSettings no longer uses an additional object of the Application Model.

AppSettings no longer uses an additional object of the Application Model.
A layer for the AppSettings runtime is added to the main model.


Some classes and methods are marked as Obsolete.
  • The methods of the Xafari.Base.HierarchyNodePersistentHelper class are displaced. It is recommended to use HierarchyManager, HierarchyInfo, HierarchyNodeTypeInfo, and the classes from the Xafari.Helpers namespace.
  • Xafari.XF.XFCloner is renamed Xafari.Base.XafariCloner.
  • The classes from the Xafari.BC.Services namespace of Xafari.BC.dll are moved to the Xafari.Services namespace of Xafari.dll.
  • Some methods of Xafari.XF.EntityFactoryExtensions are displaced. It is recommended to use Xafari.Helpers.IObjectSpaceHelper (objectSpace.Xafari()).
The Mode property with the ServiceModes enum type is added to the IServiceSpace interface.

The IServiceSpace interface now has the Mode property with the ServiceModes enum type.

public enum ServiceModes
        /// <summary>
        /// Default service mode equals to <see cref="Bulk"/> mode.
        /// </summary>
        /// <summary>
        /// UI service mode used on Views and immediatly performs service operations.
        /// </summary>
        /// <summary>
        /// Bulk service mode used by operations and delays service operations until <see cref="IServiceSpace.CommitChanges"/> is called.
        /// </summary>
        Bulk = Default,
        /// <summary>
        /// Import service mode used by import data operations.
        /// </summary>
        /// <summary>
        /// Immediate service mode equals to <see cref="UI"/> mode.
        /// </summary>
        Immediate = UI,

This property contains the value for the current ServiceSpace mode. The default mode is ServiceModes.Bulk.
The mode can be changed, for example, in the following way:

objectSpace.Xafari().ServiceSpace().Mode = ServiceModes.UI;
The support of AliveType is added to LogicControllerService.
LogicControllerService now supports AliveType.

New features are added to improve the functionality of LogicControllers:

  • The LogicControllerService.Instance singleton is created for registration and other LogicController use cases.
  • The following methods are added:
    • void Register<T>() – registers LogicController <T>
    • void Register([NotNull] LogicControllerBase logicController) – registers the specified LogicController
  • There is a new base class:
    abstract class LogicControllerBase<T, TView> : LogicControllerBase<T> where TView : ObjectView
  • New properties are added to the LogicControllerBase class:
    • public Type TypeOfView { get; set; } – binds the LogicController to the specified View type (ObjectView by default).
    • public Type TargetType { get; set; } – binds the LogicController to the specified Target type.
    • public LogicControllerViewController ViewController { get; set; } – refers to the internal LogicControllerViewController.
    • public View View { get; } – refers to the current View.
    • public BoolList Active { get; } – defines whether the LogicController is active.
  • New methods are added to the LogicControllerBase class:
    • public void Dispose() – IDisposeExt implemented.
    • public virtual void OnActivated() – instead of obsolete method void OnActivated(LogicControllerViewController controller).
    • public virtual void OnViewControlsCreated() – instead of obsolete method void OnViewControlsCreated(LogicControllerViewController controller).
    • public virtual void OnDeactivated() – instead of obsolete method void OnDeactivated(LogicControllerViewController controller).
    • protected virtual void Assign(LogicControllerBase logicConntroller) – is used while creating a LogicController. It is necessary to override in the descendant if there are additional properties that should be copied when cloning.
  • Data caching is implemented for selection LogicController for View.
  • New information about LogicController is added to the DiagnosticInfo.
Controllers in the modules Xafari, Xafari.Win, Xafari.Web, Xafari.BC, Xafari.Security are moved to the appropriate namespaces - Xafari.*.Controllers.

The controllers are moved from several modules (Xafari, Xafari.Win, Xafari.Web, Xafari.BC, Xafari.Security) to the appropriate Xafari.*.Controllers namespaces.

Improved logic of the Xafari.BC.DC.DisplayNameSupport domain component.

The logic of domain component Xafari.BC.DC.DisplayNameSupport is renewed.
The ability to specify DisplayName by using XafariObjectFormatter or DevExpress Expressions in Xafari.BC.DC.DisplayNameSupport is implemented.
It is possible to specify the format for DisplayName in DisplayNameFormatAttribute and to use Expression for calculating DisplayName in DisplayNameExpressionAttribute. Earlier DisplayName could be set using DisplayNameFormatAttribute and formatting processed only as Expression.
For more info on DevExpress Expressions, refer to
The value of DisplayNameExpressionAttribute has priority over DisplayNameFormatAttribute (does not require the simultaneous using because XafariObjectFormatter supports Expression in the format string).

Business Components

Xafari.BC.DC.HierarchicalClassifierItem inherits from HierarchyNodeExt, the HierarchyFullName and HierarchyFullPath properties are provided by HierarchyNodeExt.

Xafari.BC.DC.HierarchicalClassifierItem inherits from HierarchyNodeExt that provides the required properties: HierarchyFullName and HierarchyFullPath.

It is now possible to run managed operation in the current thread.

The opportunity to run managed operation in the current thread is added. There is a new parameter (useSeparateThread) in the constructor of the managed operation. By default, all operations run as before. For example, in the following case the operation will run in a separate thread:

var mo = new ManagedOperation(this.Application)

But if you add the following parameter to the constructor:

var mo = new ManagedOperation(this.Application, false)

the operation will run in the current thread.

This feature is also implemented for unique managed operations. You need to set the third parameter to the constructor: ManagedOperation(app, guid, false).

ERP Components

IBusinessOperationManager. Improved method signature IList<IModelBusinessOperationContext> GetContextBusinessOperationNodes(Type) -> GetContextBusinessOperationNodes().

IBusinessOperationManager signature method IList<IModelBusinessOperationContext> GetContextBusinessOperationNodes(Type) -> GetContextBusinessOperationNodes() is changed. Now the method does not check for compliance with the context. You should do it yourself when calling this method:
BusinessOperationManager.Instance.GetContextBusinessOperationNodes().Where(bo => bo.ContextTypeMatchMode.IsContextTypeMatches(bo.ContextDataType, actualContextType)).

ContextBusinessOperationHelper. The .ctor(IBusinessOperation, ICollectionCreatorFactory, IObjectSpace) constructor is removed.

ContextBusinessOperationHelper. The .ctor(IBusinessOperation, ICollectionCreatorFactory, IObjectSpace) is removed. Use the .ctor(IBusinessOperation, ICollectionCreatorFactory) constructor.

It is now possible to assign users to the branch in the branch View (List or Detail).

Dock panel “Branch Users” (Id=DCBranchUsersDockPanel) is implemented for the “Branches” business object which contains a list of relations between users and branches (UserBranchItem_Users_ListView). On this List View it is possible to add and remove user-branch relations, i.e. to assign users to particular branches.

The core functionality of business operations is moved to the Xafari.BC.dll assembly. Namespaces are not changed.

The core functionality of business operations is moved to the Xafari.BC.dll assembly. Namespaces are not changed.

Branches functionality is a Xafari service now.

Branches functionality is a Xafari service now.

It is possible to configure Branches in XAS.

Branches can be now configured in the XAS tool.

General Components

Types used to implement RunCmd console commands are moved to Xafari.BC.dll assembly. Namespace Xafari.Commands is changed to Xafari.BC.Commands.

Types used to implement RunCmd console commands are moved to Xafari.BC.dll assembly. The Xafari.Commands namespace is now changed to Xafari.BC.Commands.

The default base class uses entities and persistent extensions to generate Xafari.DC.XafariDCBaseObject.

Entities and persistent extensions are now used by the default base class when generating Xafari.DC.XafariDCBaseObject.
In particular, the EntityFactory.RegisterEntity() or EntityFactory.RegisterExtension() method is used.

In some cases, persistent extension can be inherited from other DC. Then, to avoid any exceptions, they should be registered without specifying a base class. In this case, you should use EntityFactory.RegisterExtension2().

In the example below the persistent extension DocflowExtension is being registered. It inherits from a persistent DocflowSupport domain component.

public interface DocflowExtension : DocflowSupport { }

EntityFactory.Instance.RegisterExtension2(typeof(DocflowDocument), typeof(DocflowExtension));

Write US