Back to Devexpress

BaseObject.AfterConstruction() Method

expressappframework-devexpress-dot-persistent-dot-baseimpl-dot-baseobject.md

latest4.5 KB
Original Source

BaseObject.AfterConstruction() Method

Invoked when the current object is about to be initialized after its creation.

Namespace : DevExpress.Persistent.BaseImpl

Assembly : DevExpress.Persistent.BaseImpl.Xpo.v25.2.dll

NuGet Package : DevExpress.Persistent.BaseImpl.Xpo

Declaration

csharp
public override void AfterConstruction()
vb
Public Overrides Sub AfterConstruction

Remarks

The BaseObject class overrides this method to initialize the BaseObject.Oid property, when the BaseObject.OidInitializationMode is set to OidInitializationMode.AfterConstruction.

This method is not intended to be called from your code. However, when deriving from the BaseObject class, you may need to override this method to initialize new objects with default property values. For additional information, refer to the How to: Initialize Business Objects with Default Property Values in XPO help topic.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AfterConstruction() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

xaf-how-to-create-custom-event-and-resource-classes-for-scheduler/CS/XPO/CustomEventsAndResources.Module/BusinessObjects/CustomResource.cs#L13

csharp
public override void AfterConstruction() {
    base.AfterConstruction();
    Color = Color.White;

CriteriaOperatorsCheatSheet/CS/CheatSheetXAF/CriteriaOperatorCheatSheetXAF.Module/BusinessObjects/MyTask.cs#L26

csharp
public override void AfterConstruction() {
    base.AfterConstruction();
}

xaf-how-to-execute-actions-in-code/CS/XPO/ExecuteAction/ExecuteAction.Module/BusinessObjects/MyTask.cs#L25

csharp
public override void AfterConstruction() {
    base.AfterConstruction();
}

xaf-how-to-import-data-in-xaf/CS/XPO/ImportData/ImportData.Module/BusinessObjects/MyTask.cs#L25

csharp
public override void AfterConstruction() {
    base.AfterConstruction();
}

xaf-how-to-implement-dependent-views-in-a-dashboardview-filter-based-on-selection/CS/XPO/DependentDashboard/DependentDashboard.Module/BusinessObjects/MyTask.cs#L25

csharp
public override void AfterConstruction() {
    base.AfterConstruction();
}

See Also

BaseObject Class

BaseObject Members

DevExpress.Persistent.BaseImpl Namespace