コード例 #1
0
 /// <summary>
 ///     Reads the DocRev from the local AppDomain working_folder\form\*. When nothing is found the Docdb store for the most
 ///     current DocRev. The first item in descending string order.
 /// </summary>
 /// <param name="DocTypeName"></param>
 /// <returns>string.Empty if nothing is found</returns>
 public string TopDocRev(string DocTypeName, bool forceRefresh) =>
 CacheMan.Cache(() =>
                DocTypeName.Equals(EmbededInterpreter.MY_ONLY_DOC_NAME, StringComparison.CurrentCultureIgnoreCase)
                            ? EmbededInterpreter.MY_ONLY_DOC_VERSION.ToString()
                            : _DefaultTopDocFilesystemTemplateController.TopDocRev(DocTypeName)
                ?? _OtherIDocResourceControllers
                //DOCREVs should always come from the embedded controller
                .Select(m => m.TopDocRev(DocTypeName))
                .Where(DocRev => !string.IsNullOrWhiteSpace(DocRev))
                .OrderByDescending(DocRev => new Version(DocRev))
                .ToArray()
                .FirstOrDefault(),
                forceRefresh,
                "TopDocRev",
                DocTypeName);
コード例 #2
0
 /// <summary>
 ///     Reads the DOCREV from the local AppDomain working_folder\form\*. When nothing is found the nosql store for the most
 ///     current DOCREV. The first item in descending string order.
 /// </summary>
 /// <param name="DocTypeName"></param>
 /// <returns>string.Empty if nothing is found</returns>
 public string TopDocRev(string DocTypeName, bool forceRefresh)
 {
     //TODO:change solutionVersion properties to System.Version
     return(CacheMan.Cache(() =>
                           _DefaultTopDocFilesystemTemplateController.TopDocRev(DocTypeName)
                           ?? _OtherIDocResourceControllers
                           //DOCREVs should always come from the embedded controller
                           .Where(m => (DocTypeName == "DOCREV") == (typeof(EmbededTemplateController) == m.GetType()))
                           .Select(m => m.TopDocRev(DocTypeName))
                           .Where(DocRev => !string.IsNullOrWhiteSpace(DocRev))
                           .OrderByDescending(DocRev => new Version(DocRev))
                           .ToArray()
                           .FirstOrDefault(),
                           forceRefresh,
                           "TopDocRev",
                           DocTypeName));
 }