Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Exception/IdsError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace Intuit.Ipp.Exception
/// TODO: Update summary.
/// </summary>
[System.Serializable]
public class IdsError : System.Exception
public class IdsError : System.Exception, ISafeSerializationData
{
/// <summary>
/// Error Code.
Expand Down Expand Up @@ -148,6 +148,7 @@ public string Detail
}
}

#if NETCORE
/// <summary>
/// Contains the System.Runtime.Serialization.SerializationInfo with information about the exception.
/// </summary>
Expand All @@ -165,5 +166,19 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
info.AddValue("detail", this.detail);
}
}
#endif

/// <summary>
/// This method is called when the instance is deserialized.
/// </summary>
/// <param name="deserialized">An object that contains the state of the instance.</param>
public void CompleteDeserialization(object deserialized)
{
IdsError exception = (IdsError)deserialized;
exception.errorCode = this.errorCode;
exception.errorMessage = this.errorMessage;
exception.element = this.element;
exception.detail = this.detail;
}
}
}
18 changes: 17 additions & 1 deletion IPPDotNetDevKitCSV3/Code/Intuit.Ipp.Exception/IdsException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Intuit.Ipp.Exception
/// Represents an IdsException.
/// </summary>
[System.Serializable]
public class IdsException : System.Exception
public class IdsException : System.Exception, ISafeSerializationData
{
/// <summary>
/// Error Code.
Expand Down Expand Up @@ -283,6 +283,7 @@ public ReadOnlyCollection<IdsError> InnerExceptions
}
}

#if NETCORE
/// <summary>
/// Contains the System.Runtime.Serialization.SerializationInfo with information about the exception.
/// </summary>
Expand All @@ -301,5 +302,20 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
info.AddValue("innerExceptions", this.innerExceptions);
}
}
#endif

/// <summary>
/// This method is called when the instance is deserialized.
/// </summary>
/// <param name="deserialized">An object that contains the state of the instance.</param>
public void CompleteDeserialization(object deserialized)
{
IdsException exception = (IdsException)deserialized;
exception.errorCode = this.errorCode;
exception.errorMessage = this.errorMessage;
exception.source = this.source;
exception.innerException = this.innerException;
exception.innerExceptions = this.innerExceptions;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
<LibTargetFrameworks>netstandard2.0;net472;net461</LibTargetFrameworks>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb;.xml</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PackageId>IppDotNetSdkForQuickBooksApiV3</PackageId>
<PackageId>eWayIppDotNetSdkForQuickBooksApiV3</PackageId>
<AssemblyName>IppDotNetSdkForQuickBooksApiV3</AssemblyName>
<DocumentationFile>$(BaseOutputPath)$(AssemblyName).xml</DocumentationFile>
<MainVersion>14.7.0.0</MainVersion>
Expand Down