CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
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>DataPortalResult defines the results of DataPortal operation.</summary>
7//-----------------------------------------------------------------------
8using System;
9
10namespace Csla
11{
19 public class DataPortalResult<T> : EventArgs, IDataPortalResult
20 {
24 public T Object { get; private set; }
29 public Exception Error { get; private set; }
30
35 public object UserState { get; private set; }
36
51 public DataPortalResult(T obj, Exception ex, object userState)
52 {
53 this.Object = obj;
54 this.Error = ex;
55 this.UserState = userState;
56 }
57
59 {
60 get { return this.Object; }
61 }
62
63 Exception IDataPortalResult.Error
64 {
65 get { return this.Error; }
66 }
67
68 object IDataPortalResult.UserState
69 {
70 get { return this.UserState; }
71 }
72 }
73}
DataPortalResult defines the results of DataPortal operation.
Exception Error
Error that occurred during the DataPotal call.
object UserState
User defined information that was passed into data portal on initial request
T Object
Object that DataPortal received as a result of current operation
DataPortalResult(T obj, Exception ex, object userState)
Create new instance of data portal result
IDataPortalResult defines the results of DataPortal operation
object Object
Gets the resulting object.