-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from DynamicsValue/feature/26-updates
2.6.x
- Loading branch information
Showing
58 changed files
with
3,313 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/FakeXrmEasy.Core/Exceptions/Query/FetchXml/ArithmeticTypeConversionException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.Exceptions.Query.FetchXml | ||
{ | ||
/// <summary> | ||
/// Exception raised in a query when an attribute value type could not be determined correctly | ||
/// </summary> | ||
public class ArithmeticTypeConversionException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
/// <param name="entityName"></param> | ||
/// <param name="attributeName"></param> | ||
internal ArithmeticTypeConversionException(string entityName, string attributeName) : | ||
base($"When using arithmetic values in a condition of attribute '{attributeName}' of entity '{entityName}' in a Fetch a ProxyTypesAssembly must be used in order to know which types to cast values to. If you are using early bound types, please make sure the early bound type was generated for entity '{entityName}'") | ||
{ | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/AlreadyInitializedFilesException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Exception raised when InitializeFiles is called more than once. | ||
/// </summary> | ||
public class AlreadyInitializedFilesException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
public AlreadyInitializedFilesException() : base("InitializeFiles has been called more than once. Always initialize all the files you need in a single call to .InitializeFiles()") | ||
{ | ||
|
||
} | ||
|
||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/BlockedAttachmentException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Exception raised when a file is uploaded and its file extension is blocked by the BlockedAttachment settings | ||
/// </summary> | ||
public class BlockedAttachmentException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
internal BlockedAttachmentException(string fileName) : base($"The attachment with file name '{fileName}' is not a valid file extension type") | ||
{ | ||
|
||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/BlockedMimeTypeException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Exception raised when a file is uploaded and its file MIME type is blocked by either the BlockedMimeType or AllowedMimeType settings | ||
/// </summary> | ||
public class BlockedMimeTypeException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
internal BlockedMimeTypeException(string fileName, string mimeType) : base($"The MIME Type '{mimeType}' for file name '{fileName}' is not a valid") | ||
{ | ||
|
||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/CouldNotAddFileException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Internal exception used for internal testing only thrown when a file could not be added to the InMemoryFileDb | ||
/// </summary> | ||
public class CouldNotAddFileException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
internal CouldNotAddFileException(): base("A file could not be added") | ||
{ | ||
|
||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/CouldNotCommitFileException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Throws an exception when a file could not be committed due to an unknown error | ||
/// </summary> | ||
public class CouldNotCommitFileException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
/// <param name="fileUploadContinuationToken"></param> | ||
internal CouldNotCommitFileException(string fileUploadContinuationToken) : base($"The file associated to continuation token '{fileUploadContinuationToken}' could not be committed due to an unknown error") | ||
{ | ||
|
||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/CouldNotDeleteFileException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Exception thrown when a particular file could not be deleted or it doesn't exists | ||
/// </summary> | ||
public class CouldNotDeleteFileException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
/// <param name="fileId"></param> | ||
internal CouldNotDeleteFileException(string fileId) : base($"Could not delete file with Id '{fileId}'") | ||
{ | ||
|
||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/DuplicateFileBlockException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Exception raised when a block id already exists in the current file upload session | ||
/// </summary> | ||
public class DuplicateFileBlockException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
/// <param name="blockId">The block Id that already existed</param> | ||
/// <param name="fileUploadSessionId">The Id of the FileUploadSession where that block existed</param> | ||
internal DuplicateFileBlockException(string blockId, string fileUploadSessionId) : base($"A block was already uploaded with Id {blockId} against the current file continuation token: {fileUploadSessionId}") | ||
{ | ||
|
||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/FileToDownloadNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using Microsoft.Xrm.Sdk; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Exception raised when downloading a file block for a database record and column that doesn't actually have a file against it | ||
/// </summary> | ||
public class FileToDownloadNotFoundException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
/// <param name="entityReference">An entity reference of the record</param> | ||
/// <param name="fileAttributeName">The column where a file was not found</param> | ||
internal FileToDownloadNotFoundException(EntityReference entityReference, string fileAttributeName) | ||
: base($"A file was not found for record with logical name '{entityReference.LogicalName}' and Id '{entityReference.Id.ToString()}' in column '{fileAttributeName}'") | ||
{ | ||
|
||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/FakeXrmEasy.Core/FileStorage/Db/Exceptions/FileTokenContinuationNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
|
||
namespace FakeXrmEasy.Core.FileStorage.Db.Exceptions | ||
{ | ||
/// <summary> | ||
/// Exception thrown when a file continuation token could not be found or invalid, either when initiating a file upload or a file download | ||
/// </summary> | ||
public class FileTokenContinuationNotFoundException: Exception | ||
{ | ||
/// <summary> | ||
/// Default constructor | ||
/// </summary> | ||
/// <param name="fileContinuationTokenId">The file continuation token that could not be found</param> | ||
internal FileTokenContinuationNotFoundException(string fileContinuationTokenId) | ||
: base($"The file continuation token with Id '{fileContinuationTokenId}' could not be found or has already been committed") | ||
{ | ||
|
||
} | ||
} | ||
} |
Oops, something went wrong.