TeamMentor.CoreLib.TM_WebServices.GetCurrentSessionLibrary C# (CSharp) Method

GetCurrentSessionLibrary() private method

private GetCurrentSessionLibrary ( ) : System.Guid
return System.Guid
        public Guid GetCurrentSessionLibrary()
        {
            var libraryId = Guid.Empty;

            if (HttpContextFactory.Session.notNull() && HttpContextFactory.Session["Library"].notNull())
            {
                var libraryValue = HttpContextFactory.Session["Library"].str();
                var library = (libraryValue.isGuid())
                                    ? GetLibraryById(libraryValue.guid())
                                    : GetLibraryByName(libraryValue);
                if (library.notNull())
                {
                    guiObjectsCacheOk = false;
                    return library.id.guid();
                }
                "[GetCurrentSessionLibrary] could not find library for provided value: {0}".error(libraryValue);
            }
            return libraryId;
        }
TM_WebServices