private Stream LoadUNCDocument(bool isLoadingStream)
        {
            if (!DocumentLibraryUtilities.IsNavigationToUNCAllowed(this.owaContext.UserContext))
            {
                throw new OwaSegmentationException("Access to Unc documents is disabled");
            }
            DocumentLibraryObjectId documentLibraryObjectId = DocumentLibraryUtilities.CreateDocumentLibraryObjectId(this.owaContext);
            UncSession  session     = this.owaContext.UserContext.LogonIdentity.CreateUncSession(documentLibraryObjectId);
            UncDocument uncDocument = UncDocument.Read(session, documentLibraryObjectId);

            this.mimeType     = (uncDocument[UncDocumentSchema.FileType] as string);
            this.fileName     = Path.GetFileName(uncDocument.Uri.ToString());
            this.fileSize     = uncDocument.Size;
            this.documentPath = uncDocument.Uri.ToString();
            string queryStringParameter = Utilities.GetQueryStringParameter(this.owaContext.HttpContext.Request, "URL");

            this.openLink = string.Concat(new string[]
            {
                "ev.owa?ns=UncDocument&ev=GetDoc&allowLevel2=1&URL=",
                Utilities.UrlEncode(queryStringParameter),
                "&id=",
                Utilities.UrlEncode(documentLibraryObjectId.ToBase64String()),
                Utilities.GetCanaryRequestParameter()
            });
            this.documentIdStringBuilder.Append(documentLibraryObjectId.ToBase64String());
            this.documentIdStringBuilder.Append("-");
            object obj = uncDocument.TryGetProperty(UncItemSchema.LastModifiedDate);

            if (obj is DateTime)
            {
                this.documentIdStringBuilder.Append(((DateTime)obj).Ticks);
            }
            if (!isLoadingStream)
            {
                return(null);
            }
            return(uncDocument.GetDocument());
        }