예제 #1
0
        /// <summary>
        /// Returns the External ID of the object the SubmitContext is related to. Typically this is sourced from the Core metadata on the
        /// SubmitContext, but in some cases (e.g. on the BinarySubmitContext) it may be stored in a strongly typed field
        /// </summary>
        /// <returns></returns>
        protected virtual string GetExternalId()
        {
            var externalId = CoreMetaData?.FirstOrDefault(metaInfo => metaInfo.Name == Fields.ExternalId)?.Value;

            return(!string.IsNullOrEmpty(externalId) ? externalId : NoExternalIdFound);
        }
예제 #2
0
        /// <summary>
        /// Returns the title of the object the SubmitContext is related to. Typically this is sourced from the Core metadata on the
        /// SubmitContext, but in some cases (e.g. on the BinarySubmitContext) it may be stored in a strongly typed field
        /// </summary>
        /// <returns></returns>
        protected virtual string GetTitle()
        {
            var fileName = CoreMetaData?.FirstOrDefault(metaInfo => metaInfo.Name == Fields.Title)?.Value;

            return(!string.IsNullOrEmpty(fileName) ? fileName : NoTitleFound);
        }