Exemplo n.º 1
0
        /// <summary>
        /// Gets the permalink for this entity. Automatically creates new if it doesn't exist
        /// </summary>
        /// <param name="permalinkSupportedInstance"></param>
        /// <returns></returns>
        public static Permalink GetPermalink(this IPermalinkSupported permalinkSupportedInstance)
        {
            //resolve permalink service
            var permalinkService = mobSocialEngine.ActiveEngine.Resolve <IPermalinkService>();

            return(permalinkService.GetPermalink(permalinkSupportedInstance));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the permalink for this entity. Automatically creates new if it doesn't exist
        /// </summary>
        /// <param name="permalinkSupportedInstance"></param>
        /// <param name="typeName"></param>
        /// <param name="isUpdate"></param>
        /// <returns></returns>
        public static UrlRecord GetUrlRecord(this IPermalinkSupported permalinkSupportedInstance, string typeName = "", bool isUpdate = true)
        {
            //resolve permalink service
            var permalinkService = EngineContext.Current.Resolve <IUrlRecordService>();

            return(permalinkService.GetUrlRecord(permalinkSupportedInstance, typeName, isUpdate));
        }