Beispiel #1
0
        public IWfProcessDescriptor LoadDescriptor(string processKey)
        {
            processKey.CheckStringIsNullOrEmpty("processKey");
            XElement xml = LoadXml(processKey);

            return(WfProcessDescriptorManager.DeserializeXElementToProcessDescriptor(xml));
        }
Beispiel #2
0
        public IWfProcessDescriptor GetDescriptor(string processKey)
        {
            processKey.CheckStringIsNullOrEmpty("processKey");

            string cacheKey = NormalizeCacheKey(processKey);

            XElement processXml = WfProcessDescriptorXmlCache.Instance.GetOrAddNewValue(cacheKey, (cache, key) =>
            {
                XElement xml = LoadXml(processKey);

                MixedDependency dependency = new MixedDependency(new UdpNotifierCacheDependency(), new MemoryMappedFileNotifierCacheDependency());

                cache.Add(key, xml, dependency);

                return(xml);
            });

            return(WfProcessDescriptorManager.DeserializeXElementToProcessDescriptor(processXml));
        }