Last active
December 24, 2015 16:28
-
-
Save djfr/6827866 to your computer and use it in GitHub Desktop.
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
public class DocumentClient : IDocumentService | |
{ | |
public string InsertDocument(string documentClass, string filePath) | |
{ | |
using (var service = new WcfService<IDocumentService>()) | |
{ | |
return InsertDocument(documentClass, filePath, service); | |
} | |
} | |
internal static string InsertDocument(string documentClass, string filePath, WcfService<IDocumentService> service) | |
{ | |
try | |
{ | |
return service.Channel.InsertDocument(documentClass, filePath); | |
} | |
catch (FaultException<CALFault> ex) | |
{ | |
throw new DocumentCALException(ex); | |
} | |
catch (Exception ex) | |
{ | |
throw new ServiceUnavailableException(ex.Message, ex); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment