示例#1
0
        private static ServicingIndex LoadIndex()
        {
            return LazyInitializer.EnsureInitialized(ref _index, ref _indexInitialized, ref _indexSync, () =>
            {
                var index = new ServicingIndex();
                var servicingRoot = GetServicingRoot();
                if (servicingRoot != null)
                {
                    index.Initialize(servicingRoot);
                }

                return index;
            });
        }
示例#2
0
        private static ServicingIndex LoadIndex()
        {
            return(LazyInitializer.EnsureInitialized(ref _index, ref _indexInitialized, ref _indexSync, () =>
            {
                var index = new ServicingIndex();
                var servicingRoot = GetServicingRoot();
                if (servicingRoot != null)
                {
                    index.Initialize(servicingRoot);
                }

                return index;
            }));
        }
示例#3
0
        private static void ServicingTest(string indexContent, Action<ServicingIndex, string> validator)
        {
            const string fakePatchesFolder = @"C:/foo/patchesFolder/";

            using (MemoryStream indexStream = new MemoryStream(Encoding.UTF8.GetBytes(indexContent)))
            {
                var index = new ServicingIndex();
                index.Initialize(fakePatchesFolder, indexStream);
                validator(index, fakePatchesFolder);
            }
        }