src/Picturepark.SDK.V1.Contract/Partials/ContentDetail.cs
/// <summary>Creates a typed content item wrapped in a ContentItem container.</summary>
/// <typeparam name="T">The content item type.</typeparam>
/// <returns>The content item.</returns>
Creates a typed content item wrapped in a ContentItem container.
Creates a typed content item wrapped in a ContentItem container .
public ContentItem<T> AsContentItem<T>()
        {
            var item = Content is T content ? content : ((JObject)Content).ToObject<T>();
            return new ContentItem<T>
            {
                Id = Id,
                ContentPermissionSetIds = ContentPermissionSetIds,
                ContentRights = ContentRights,
                ContentSchemaId = ContentSchemaId,
                ContentType = ContentType,
                DisplayValues = DisplayValues,
                LayerSchemaIds = LayerSchemaIds,
                LifeCycle = LifeCycle,
                Metadata = Metadata,
                Outputs = Outputs,
                Owner = Owner,
                OwnerTokenId = OwnerTokenId,
                Audit = Audit,
                Content = item
            };
        }
public ContentItem < T > AsContentItem < T > ( ) { var item = Content is T content ? content : ( ( JObject ) Content ) . ToObject < T > ( ) ; return new ContentItem < T > { Id = Id , ContentPermissionSetIds = ContentPermissionSetIds , ContentRights = ContentRights , ContentSchemaId = ContentSchemaId , ContentType = ContentType , DisplayValues = DisplayValues , LayerSchemaIds = LayerSchemaIds , LifeCycle = LifeCycle , Metadata = Metadata , Outputs = Outputs , Owner = Owner , OwnerTokenId = OwnerTokenId , Audit = Audit , Content = item } ; }
Creates a typed content item wrapped in a ContentItem container.
Creates a typed content item wrapped in a ContentItem container .
The content item.
The content item .
typeparam
The content item type.
The content item type .