Meta Models - Happi-cat/Untech.SharePoint GitHub Wiki

Namespace Untech.SharePoint.Common.MetaModels

Class MetaContext

Represents MetaData of ISpContext.

Constructor:

  • MetaContext([NotNull]IReadOnlyCollection<IMetaListProvider> listProviders) - Initializes a new instance with next arguments:
    • listProviders - providers of MetaList associated with the current context.

Properties:

  • MetaListCollection Lists - Gets collection of child MetaList.
  • string Url - Gets or sets SP Web Url.

Class MetaList

Represents MetaData for SP List

Constructor:

  • MetaList([NotNull]MetaContext context, [NotNull]string listUrl, [NotNull]IReadOnlyCollection<IMetaContentTypeProvider> contentTypeProviders) - Initializes new instance with next parameters:
    • context - metadata of parent ISpContext;
    • listUrl - current list's site-relative URL;
    • contentTypeProviders - providers of MetaContentType that associated with current list.

Properties:

  • string Url - Gets the site-relative URL at which the list was placed.
  • string Title - Gets or sets current list title.
  • bool IsExternal - Gets or sets whether this list is external.
  • MetaContext Context - Gets parent MetaContext.
  • MetaContentTypeCollection ContentTypes - Gets collection of child MetaContentType.

Class MetaContentType

Represents MetaData for SP ContentType.

Constructor:

  • MetaContentType([NotNull]MetaList list, [NotNull]Type entityType, [NotNull]IReadOnlyCollection<IMetaFieldProvider> fieldProviders) - Initializes new instance using next arguments:
    • list- metadata of parent SP List;
    • entityType - equivalent .NET type;
    • fieldProviders - providers of MetaField that associated with current content type.

Properties:

  • string Id - Gets or sets ConetnTypeId
  • string Name - Gets or sets ContentType display name.
  • MetaList List - Gets parent MetaList.
  • MetaFieldCollection Fields - Gets collection of child MetaField.
  • Type EntityType - Gets Type of associated entity.

Class MetaField

Represents MetaData for SP Field.

Constructor:

  • MetaField([NotNull]MetaContentType contentType, [NotNull]MemberInfo member, [NotNull]string internalName) - Initializes new instance and accept next parameters:
    • contentType - parent MetaContentType;
    • member - field or property MemberInfo;
    • internalName - InternalName of the associated SP Field.

Properties:

  • Guid Id - Gets or sets SP Field Id.
  • string Title - Gets or sets SP Field DisplayName.
  • string InternalName - Gets SP Field internal name.
  • string TypeAsString - Gets or sets SP Field Type.
  • string OutputType - Gets or sets SP Field Output Type for calculated fields.
  • bool IsCalculated - Gets or sets whether this SP field is calculated.
  • bool ReadOnly - Gets or sets whether this SP field is read-only.
  • bool Required - Gets or sets whether this SP field is required.
  • bool AllowMultipleValues - Gets or sets whether this SP field is allow multiple values.
  • string LookupList - Gets or sets List Title if the current field is a Lookup.
  • string LookupField - Gets or sets List Field InternalName if the current field is a Lookup.
  • IFieldConverter Converter - Gets or sets converter associated with the current field. Will be populated automatically.
  • Type CustomConverterType - Gets or sets converter type if custom field conversion is required.
  • MemberInfo Member - Gets associated MemberInfo.
  • string MemberName - Gets associated member name.
  • Type MemberType - Gets associated member type.
  • MetaContentType ContentType - Gets parent MetaContentType.