Refactor: Rename DocumentOperator to DocumentService
Updated project and solution files to rename and restructure `DocumentOperator` to `DocumentService`. Modified project references in `DocumentService.API.csproj`, `DocumentService.Application.csproj`, and `DocumentService.Infrastructure.csproj` to reflect the new naming convention. Updated `DocumentService.sln` to remove old project references, add new ones, and adjust configuration and nested project mappings accordingly. This change aligns the project structure with the new naming convention.
This commit is contained in:
16
DocumentService.Infrastructure/Services/StringExtensions.cs
Normal file
16
DocumentService.Infrastructure/Services/StringExtensions.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace DocumentService.Infrastructure.Services;
|
||||
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static T? DeserializeXml<T>(this string xmlText)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(xmlText))
|
||||
return default;
|
||||
|
||||
var serializer = new XmlSerializer(typeof(T));
|
||||
using var reader = new StringReader(xmlText);
|
||||
return (T?)serializer.Deserialize(reader);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user