WCF - 서비스 문서 사용자 정의
문제
WCF 프로그래밍과 신디케이션 클래스 등의 새로운 기능이 있습니다. 누군가가 내 서비스의 루트 주소에 액세스하려고 할 때 프로그래밍 방식으로 ATommub 서비스 문서를 작성하려고합니다.ServicedoCument, ResourceCollectionInfo, Workspace 클래스 - 를 사용하여 어느 정도까지만 할 수 있습니다.
<service>
<app:workspace>
<a10:title type="text">Sample Repository</a10:title>
<app:collection href="http://some_url">
<a10:title type="text">Root Collection</a10:title>
</app:collection>
</app:workspace>
</service>
.
그러나 아래에서 볼 수있는 사용자 정의 속성과 요소를 추가하고 싶습니다.XMLNS 속성, CMISRA 요소 등을 확인하십시오.
.
<service
xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:app="http://www.w3.org/2007/app"
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/">
<workspace>
<atom:title>Sample Repository</atom:title>
<collection href="http://some_url">
<atom:title>Root Collection</atom:title>
<cmisra:collectionType>root</cmisra:collectionType>
</collection>
</workspace>
</service>
MSDN 웹 사이트 또는 다른 곳에서는 아무것도 제공되지 않습니다.이를 달성하는 방법에 대한 모든 입력은 인식 할 것입니다.
감사합니다!
감사합니다.
해결책
The ResourceCollectionInfo
class has two properties ElementExtensions
and AttributeExtensions
which can be used to customize the serialization of a ResourceCollectionInfo
. Please note that most of the syndication elements have those extensions, which work with both the RSS and Atom formatters.