CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Server/DataPortalResult.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="DataPortalResult.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>Returns data from the server-side DataPortal to the </summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Specialized;
10using Csla.Core;
11
12namespace Csla.Server
13{
20 public class DataPortalResult : EventArgs
21 {
26 public object ReturnObject { get; private set; }
27
32 public Exception Error { get; private set; }
33
38 public ContextDictionary GlobalContext { get; private set; }
39
44 {
45 GlobalContext = ApplicationContext.ContextManager.GetGlobalContext();
46 }
47
53 public DataPortalResult(object returnObject)
54 {
55 ReturnObject = returnObject;
56 GlobalContext = ApplicationContext.ContextManager.GetGlobalContext();
57 }
58
66 public DataPortalResult(object returnObject, ContextDictionary globalContext)
67 {
68 ReturnObject = returnObject;
69 GlobalContext = globalContext;
70 }
71
83 public DataPortalResult(object returnObject, Exception ex, ContextDictionary globalContext)
84 {
85 ReturnObject = returnObject;
86 Error = ex;
87 GlobalContext = globalContext;
88 }
89 }
90}
Dictionary type that is serializable with the SerializationFormatterFactory.GetFormatter().
Returns data from the server-side DataPortal to the client-side DataPortal.
DataPortalResult()
Creates an instance of the object.
DataPortalResult(object returnObject)
Creates an instance of the object.
object ReturnObject
The business object being returned from the server.
ContextDictionary GlobalContext
The global context being returned from the server.
DataPortalResult(object returnObject, Exception ex, ContextDictionary globalContext)
Creates an instance of the object.
DataPortalResult(object returnObject, ContextDictionary globalContext)
Creates an instance of the object.
Exception Error
Error that occurred during the DataPotal call.
@ Serializable
Prevents updating or inserting until the transaction is complete.