Custom Mappings - Happi-cat/Untech.SharePoint GitHub Wiki

Contents

  1. Start Point
  2. Namespace Untech.SharePoint.Common.Mappings
  3. Namespace Untech.SharePoint.Common.MetaModels.Providers

Start Point

  1. Create own mapping source and inherit it from MappingSource
  2. Implement IMetaListProvider
  3. Implement IMetaContentTypeProvider
  4. Implement IMetaFieldProvider
  5. Configure and register your mapping as usual: cfgBuilder.RegisterMappings(n => new YourMappingSource());

Back to Top

Namespace Untech.SharePoint.Common.Mappings

Abstract class MappingSource<TContext>

Represents class that can create MetaContext and resolve list title for the specified member of this context. TContext - Type of the data context that is associated with this instance of the MappingSource{TContext}

Property:

  • Type ContextType - Gets Type of the associated Data Context class.

Methods:

  • abstract MetaContext GetMetaContext() - Returns instance of MetaContext.
  • abstract string GetListUrlFromContextMember(MemberInfo member) - Gets list title that associated with member.

Interface IListUrlResolver

Represents interface of object that can resolve list URL by context member.

Methods:

  • string GetListUrlFromContextMember(MemberInfo member) - Gets list URL that associated with member.

Interface IMappingSource

Represents interface that can create MetaContext and resolve list title for the specified member of this context. Inherits IMetaContextProvider, IListUrlResolver

Property:

  • Type ContextType - Gets Type of the associated Data Context class.

Back to Top

Namespace Untech.SharePoint.Common.MetaModels.Providers

Interface IMetaContextProvider

Represents interface of MetaContext provider.

Methods:

  • MetaContext GetMetaContext() - Returns instance of MetaContext.

Interface IMetaListProvider

Represents interface of MetaList provider.

Methods:

  • MetaList GetMetaList([NotNull]MetaContext parent) - Returns instance of MetaList.

Interface IMetaContentTypeProvider

Represents interface of MetaContentType provider.

Methods:

  • MetaContentType GetMetaContentType([NotNull]MetaList parent) - Returns instance of MetaContentType.

Interface IMetaFieldProvider

Represents interface of MetaField provider.

Methods:

  • MetaField GetMetaField([NotNull]MetaContentType parent) - Returns instance of MetaField.

Back to Top