You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -0,0 +1,87 @@
|
||||
//---------------------------------------------------------------------
|
||||
// <copyright file="UpdateException.cs" company="Microsoft">
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// </copyright>
|
||||
//
|
||||
// @owner [....]
|
||||
// @backupOwner [....]
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
namespace System.Data
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Security.Permissions;
|
||||
using System.Data.Objects;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// Exception during save changes to store
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UpdateException : DataException
|
||||
{
|
||||
[NonSerialized]
|
||||
private ReadOnlyCollection<ObjectStateEntry> _stateEntries;
|
||||
|
||||
|
||||
#region constructors
|
||||
/// <summary>
|
||||
/// Default constructor
|
||||
/// </summary>
|
||||
public UpdateException()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that takes a message
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public UpdateException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that takes a message and an inner exception
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public UpdateException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor that takes a message and an inner exception
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
/// <param name="stateEntries"></param>
|
||||
public UpdateException(string message, Exception innerException, IEnumerable<ObjectStateEntry> stateEntries)
|
||||
: base(message, innerException)
|
||||
{
|
||||
List<ObjectStateEntry> list = new List<ObjectStateEntry>(stateEntries);
|
||||
_stateEntries = list.AsReadOnly();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets state entries implicated in the error.
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<ObjectStateEntry> StateEntries { get { return _stateEntries; } }
|
||||
|
||||
/// <summary>
|
||||
/// The protected constructor for serialization
|
||||
/// </summary>
|
||||
/// <param name="info"></param>
|
||||
/// <param name="context"></param>
|
||||
protected UpdateException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user